33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
from sqlalchemy import DateTime, Column, BigInteger, String
|
|
from config.database import Base
|
|
|
|
|
|
class RobotRolePairing(Base):
|
|
"""
|
|
角色-机器人-映射表
|
|
"""
|
|
|
|
__tablename__ = 'robot_role_pairing'
|
|
|
|
pairing_id = Column(BigInteger, primary_key=True, autoincrement=True, nullable=False, comment='主键ID')
|
|
robot_role_id = Column(BigInteger, nullable=False, comment='机器人角色ID')
|
|
robot_id = Column(BigInteger, nullable=False, comment='机器人ID')
|
|
status = Column(String(2), nullable=False, comment='使用情况(0停用,1使用)')
|
|
update_time = Column(DateTime, nullable=False, comment='更新时间')
|
|
update_by = Column(String(64), nullable=False, comment='修改者')
|
|
|
|
|
|
#
|
|
# class RolePairing(Base):
|
|
# """
|
|
# 角色-机器人-映射表对应pydantic模型, 查询角色-机器人结果的返回模型
|
|
# """
|
|
#
|
|
#
|
|
# pairing_id = Column(BigInteger, primary_key=True, autoincrement=True, nullable=False, comment='主键ID')
|
|
# rolename = Column(String(32), nullable=False, comment='角色名称')
|
|
# detail = Column(String(512), nullable=True, comment='角色介绍')
|
|
# status = Column(String(2), nullable=False, comment='使用情况(0停用,1使用)')
|
|
|
|
|