class UserProject(db.Model): __tablename__ = 'user_project' id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.ForeignKey('user.id')) project_id = db.Column(db.ForeignKey('project.id')) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column( db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) project = db.relationship('Project') user = db.relationship('User')
class Bespoke(db.Model): __tablename__ = 'bespoke' id = db.Column(UUID(as_uuid=True), primary_key=True) type = db.Column(db.Integer) project_id = db.Column(db.ForeignKey('project.id')) questionnaire_id = db.Column(db.ForeignKey('questionnaire.id')) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) project = db.relationship('Project') questionnaire = db.relationship('Questionnaire')
class User(db.Model): __tablename__ = "user" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(20)) password = db.Column(db.String(100), nullable=False) roles = db.relationship("Role", secondary=user_role, back_populates="users") role_names = key_ids = association_proxy("roles", "name")
class QuestionnaireGovernance(db.Model): __tablename__ = 'questionnaire_governance' id = db.Column(UUID(as_uuid=True), primary_key=True) questionnaire_id = db.Column(db.ForeignKey('questionnaire.id')) governance_id = db.Column(db.ForeignKey('governance.id')) is_governance_minute = db.Column(db.Integer) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) governance = db.relationship('Governance') questionnaire = db.relationship('Questionnaire')
class Milestone(db.Model): __tablename__ = 'milestone' id = db.Column(db.Integer, primary_key=True) type = db.Column(db.Integer) project_id = db.Column(db.ForeignKey('project.id')) is_payment = db.Column(db.Integer) completion_date = db.Column(db.DateTime(255)) charges = db.Column(db.Numeric) is_paied = db.Column(db.ForeignKey('questionnaire.id')) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column( db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) questionnaire = db.relationship('Questionnaire') project = db.relationship('Project')
class Questionnaire(db.Model): __tablename__ = 'questionnaire' id = db.Column(db.Integer, primary_key=True) project_id = db.Column(db.ForeignKey('project.id')) user_filler = db.Column(db.ForeignKey('user.id')) to_date = db.Column(db.DateTime(255)) is_transition_completed = db.Column(db.Integer) is_transition_charges_paied = db.Column(db.Integer) is_transformation_completed = db.Column(db.Integer) missed_kpi = db.Column(db.Integer) missed_service_level = db.Column(db.Integer) moved_service_level = db.Column(db.Integer) payable_service_credits = db.Column(db.Integer) paied_service_credits = db.Column(db.Integer) is_paied_passed = db.Column(db.Integer) pay_back = db.Column(db.Numeric) is_customer_satisfaction_report = db.Column(db.Integer) customer_satisfaction_result = db.Column(db.Integer) is_governance = db.Column(db.Integer) is_governance_minute = db.Column(db.Integer) is_additional_governance = db.Column(db.Integer) additional_governance_cause = db.Column(db.Integer) is_formal_notices = db.Column(db.Integer) formal_notices_about = db.Column(db.Integer) formal_notices_type = db.Column(db.Integer) initiated_CCNs = db.Column(db.Integer) signed_CCNs = db.Column(db.Integer) signed_CCNs_type = db.Column(db.Integer) key_personnel_changed = db.Column(db.Integer) supplier_personnel_changed = db.Column(db.Integer) customer_personnel_changed = db.Column(db.Integer) invoiced_charges_usd = db.Column(db.Numeric) is_not_invoiced = db.Column(db.Integer) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) project = db.relationship('Project') user = db.relationship('User')
class ContractValue(db.Model): __tablename__ = 'contract_value' id = db.Column(db.Integer, primary_key=True) year = db.Column(db.Integer) contract_value_usd = db.Column(db.Numeric) project_id = db.Column(db.ForeignKey('project.id')) estimated_cost_usd = db.Column(db.Numeric) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) project = db.relationship('Project')
class Dispute(db.Model): __tablename__ = 'dispute' id = db.Column(UUID(as_uuid=True), primary_key=True) subject = db.Column(db.Integer) questionnaire_id = db.Column(db.ForeignKey('questionnaire.id')) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) questionnaire = db.relationship('Questionnaire')
class Governance(db.Model): __tablename__ = 'governance' id = db.Column(UUID(as_uuid=True), primary_key=True) type = db.Column(db.Integer) how_often = db.Column(db.Integer) project_id = db.Column(db.ForeignKey('project.id')) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) project = db.relationship('Project')
class Charge(db.Model): __tablename__ = 'charges' id = db.Column(UUID(as_uuid=True), primary_key=True) invoiced_charges = db.Column(db.Integer) questionnaire_id = db.Column(db.ForeignKey('questionnaire.id')) invoice_date = db.Column(db.DateTime) amount = db.Column(db.Numeric) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) questionnaire = db.relationship('Questionnaire')
class Change(db.Model): __tablename__ = 'changes' id = db.Column(UUID(as_uuid=True), primary_key=True) subject = db.Column(db.Integer) questionnaire_id = db.Column(db.ForeignKey('questionnaire.id')) month_impact = db.Column(db.Integer) charges_impact = db.Column(db.Numeric) effective_date = db.Column(db.DateTime) CREATED_BY = db.Column(db.Integer) UPDATED_BY = db.Column(db.Integer) UPDATED_AT = db.Column(db.DateTime, server_default=db.func.now()) CREATED_AT = db.Column(db.DateTime, server_default=db.func.now(), server_onupdate=db.func.now()) questionnaire = db.relationship('Questionnaire')
class Role(db.Model): __tablename__ = "role" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) users = db.relationship("User", secondary=user_role, back_populates="roles")