20 lines
678 B
Python
20 lines
678 B
Python
|
from sqlalchemy.orm import relationship
|
||
|
from Context.common import common_db
|
||
|
from sqlalchemy import Column, Integer, String, ForeignKey, Text, DateTime, func, Date, Double
|
||
|
|
||
|
|
||
|
class CompanySubmit(common_db.Base):
|
||
|
"""
|
||
|
公司提交数据表
|
||
|
"""
|
||
|
__tablename__ = "company_submit"
|
||
|
|
||
|
id = Column(Integer, primary_key=True, comment="id")
|
||
|
company_name = Column(String(255), comment="公司名称")
|
||
|
file_md = Column(String(255), comment="文件路径")
|
||
|
create_time = Column(DateTime, comment="创建时间", server_default=func.now())
|
||
|
|
||
|
def to_dict(self):
|
||
|
data = {c.name: getattr(self, c.name) for c in self.__table__.columns}
|
||
|
return data
|