# coding: utf-8
from sqlalchemy import Column, DECIMAL, DateTime, String
from sqlalchemy.dialects.mysql import INTEGER

from config.mysql import Base


class ZxIeCostDetail(Base):
    __tablename__ = 'zx_ie_cost_detail'

    pk_ie_cost_detail = Column(INTEGER(11), primary_key=True, comment='费用明细详情主键')
    pk_ie_cost = Column(INTEGER(11), nullable=False, comment='费用明细信息抽取主键')
    pk_phhd = Column(INTEGER(11), nullable=False, comment='报销案子主键')
    _class = Column('class', String(255), comment='类别')
    name = Column(String(255), comment='名称')
    specification = Column(String(255), comment='规格')
    price = Column(DECIMAL(18, 2), comment='单价')
    quantity = Column(INTEGER(11), comment='数量')
    amount = Column(DECIMAL(18, 2), comment='金额(单价 * 数量)')
    create_time = Column(DateTime, comment='创建时间')
    creator = Column(String(30), comment='创建人')
    update_time = Column(DateTime, comment='修改时间')
    updater = Column(String(30), comment='修改人')
