Exemple #1
0
class Finance(EntityModel):

    profit_ability = db.Column(db.String(100))
    debtpay_ability = db.Column(db.String(100))
    cashflow_ability = db.Column(db.String(100))
    company_id = db.Column(db.Integer)
    user_id = db.Column(db.Integer)
Exemple #2
0
class Operate(EntityModel):

    operate_statement = db.Column(db.String(500))
    purchase_statement = db.Column(db.String(500))
    production_statement = db.Column(db.String(500))
    market_statement = db.Column(db.String(500))
    company_id = db.Column(db.Integer)
    user_id = db.Column(db.Integer)
Exemple #3
0
class Supply(EntityModel):

    product_name = db.Column(db.String(100))
    supplier_name = db.Column(db.String(100))
    corporate_year = db.Column(db.Float)
    purchase_money = db.Column(db.Float)
    purchase_percentage = db.Column(db.Float)
    company_id = db.Column(db.Integer)
Exemple #4
0
class Sales(EntityModel):

    product_name = db.Column(db.String(100))
    buyer_name = db.Column(db.String(100))
    corporate_year = db.Column(db.Float)
    sales_money = db.Column(db.Float)
    sales_percentage = db.Column(db.Float)
    company_id = db.Column(db.Integer)
Exemple #5
0
class Revenue(EntityModel):

    year = db.Column(db.String(10))
    product_name = db.Column(db.String(100))
    income = db.Column(db.Float)
    percentage = db.Column(db.Float)
    gross = db.Column(db.Float)
    company_id = db.Column(db.Integer)
class ShareHolder(EntityModel):

    name = db.Column(db.String(120))
    id_num = db.Column(db.String(120))
    investment_method = db.Column(db.String(120))
    money = db.Column(db.Float)
    shareholding_ratio = db.Column(db.Float)
    relationship = db.Column(db.String(120))
    company_id = db.Column(db.Integer)
Exemple #7
0
class User(EntityWithNameModel):

    password = db.Column(db.String(120),
                         default='a13f7d4051bfcd2280f8848be893dc10')
    role_id = db.Column(db.Integer)
    real_name = db.Column(db.String(300))

    @classmethod
    def gen_password(cls, origin_password):
        return md5("{}{}".format(SALT, origin_password)).hexdigest()
Exemple #8
0
class Company(EntityModel):

    name = db.Column(db.String(120))
    credit_code = db.Column(db.Integer)
    register_addr = db.Column(db.String(120))
    register_capital = db.Column(db.String(120))
    representative = db.Column(db.String(120))
    establish_time = db.Column(db.String(120))
    business_scope = db.Column(db.Text)
    user_id = db.Column(db.Integer)
Exemple #9
0
class Industry(EntityModel):

    first_industry = db.Column(db.String(50))
    second_industry = db.Column(db.String(50))
    major_product = db.Column(db.String(100))
    technical_factor = db.Column(db.String(500))
    supdem_factor = db.Column(db.String(500))
    government_factor = db.Column(db.String(500))
    humanity_factor = db.Column(db.String(500))
    international_factor = db.Column(db.String(500))
    profit_factor = db.Column(db.String(500))
    other_factor = db.Column(db.String(500))
    company_id = db.Column(db.Integer)
    user_id = db.Column(db.Integer)
Exemple #10
0
class EntityWithNameModel(EntityModel):

    __abstract__ = True

    name = db.Column(db.String(100), nullable=False)

    def __repr__(self):
        return self.name

    def __unicode__(self):
        return self.name
Exemple #11
0
class User(db.Model, BaseModel):
    __tablename__ = 'user'

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String(50),
                     nullable=False,
                     server_default='',
                     comment='姓名')
    create_time = db.Column(db.TIMESTAMP,
                            nullable=False,
                            server_default=func.now())
    update_time = db.Column(
        db.TIMESTAMP,
        nullable=False,
        server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))
Exemple #12
0
class Role(EntityWithNameModel):

    commit = db.Column(db.String(120))
Exemple #13
0
class Credit(EntityModel):

    credict_info = db.Column(db.String(300))
    lawsuit_info = db.Column(db.String(300))
    company_id = db.Column(db.Integer)
    user_id = db.Column(db.Integer)