from sqlalchemy import Column, String, Boolean from domain.models.base_model import CreateModelBase class SysPermissionModel(CreateModelBase): """权限表""" __tablename__ = "sys_permission" name = Column(String(100), nullable=False, comment="权限名称") master = Column( String(1), nullable=False, default="R", comment="权限主体类型(U用户 R角色)" ) master_value = Column(String(100), nullable=False, comment="主体值") is_granted = Column(Boolean, nullable=False, default=True, comment="是否授权") def __repr__(self): return f""