This commit is contained in:
resonate
2022-01-23 12:35:48 +08:00
parent 28d503eb8b
commit 4eeb2cfec9
13 changed files with 179 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
import datetime
from common.model import BaseModel, Column, Integer, String, Text, DateTime
class Dept(BaseModel):
__tablename__ = 'admin_dept'
id = Column(Integer, primary_key=True, comment="部门ID")
parent_id = Column(Integer, comment="父级编号")
dept_name = Column(String(50), comment="部门名称")
sort = Column(Integer, comment="排序")
leader = Column(String(50), comment="负责人")
phone = Column(String(20), comment="联系方式")
email = Column(String(50), comment="邮箱")
status = Column(Integer, comment='状态(1开启,0关闭)')
remark = Column(Text, comment="备注")
address = Column(String(255), comment="详细地址")
create_at = Column(DateTime, default=datetime.datetime.now, comment='创建时间')
update_at = Column(DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now, comment='创建时间')