2026-09-21 10:22:04 +08:00
from sqlalchemy import *
2026-09-21 19:55:51 +08:00
from sqlalchemy.dialects.mysql import TINYINT
2026-09-21 10:22:04 +08:00
from datetime import datetime
from core.database import Base
class Consultant ( Base ):
2026-09-21 16:19:44 +08:00
__tablename__ = "consultant_info_detail"
2026-09-21 10:22:04 +08:00
id = Column ( Integer , primary_key = True , autoincrement = True , comment = "主键" )
consultant_no = Column ( String ( 50 ), unique = True , nullable = False , comment = "顾问编号" )
consultant_name = Column ( String ( 50 ), nullable = False , comment = "顾问姓名" )
2026-09-21 19:55:51 +08:00
phone = Column ( String ( 20 ), nullable = True , comment = "联系电话" )
2026-09-21 10:22:04 +08:00
email = Column ( String ( 100 ), nullable = True , comment = "邮箱" )
remark = Column ( String ( 255 ), nullable = True , comment = "备注" )
2026-09-21 19:55:51 +08:00
created_at = Column ( DateTime , default = datetime . now , server_default = text ( "CURRENT_TIMESTAMP" ), nullable = False , comment = "创建时间" )
updated_at = Column ( DateTime , default = datetime . now , onupdate = datetime . now , server_default = text ( "CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" ), nullable = False , comment = "更新时间" )
is_deleted = Column ( TINYINT , default = 0 , server_default = text ( "0" ), nullable = False , comment = "逻辑删除:0正常,1删除" )