You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.6 KiB

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Date:2022/07/13 15:14:17
'''
# 已同步本地数据库
from sqlalchemy import Column, String, Text, Integer
from sqlalchemy.ext.declarative import declarative_base
class EntityUser(declarative_base()):
__tablename__ = "rms_user"
__table_args__ = (
{
"comment": "RMS用户表"
}
)
user_id = Column(String(50), primary_key=True, comment='用户ID') # 用户ID
customer_id = Column(String(50), comment='客户ID') # 客户ID
role_id = Column(String(50), comment='角色ID') # 角色ID
role_name = Column(String(50), comment='角色名称') # 角色名称
bar_code = Column(String(50), comment='条码') # 条码
user_code = Column(String(50), comment='用户编号') # 用户编号
account = Column(String(50), comment='账户') # 账户
password = Column(String(50), comment='密码') # 密码
real_name = Column(String(50), comment='真实名称') # 真实名称
avatar_url = Column(String(50), comment='头像地址') # 头像地址
avatar_base64 = Column(Text, comment='头像base64值') # 头像base64值
sex = Column(Integer, comment='性别') # 性别
birthday = Column(String(50), comment='生日') # 生日
mobile = Column(String(50), comment='手机号码') # 手机号码
email = Column(String(50), comment='Enail') # Enail
qq = Column(String(50), comment='QQ') # QQ
is_enabled = Column(Integer, comment='是否启用') # 是否启用
first_visit_date = Column(String(50), comment='首次登陆日期') # 首次登陆日期
last_visit_date = Column(String(50), comment='最后登陆日期') # 最后登陆日期
description = Column(String(50), comment='备注') # 备注
create_date = Column(String(50), comment='创建日期') # 创建日期
create_user_id = Column(String(50), comment='创建用户ID') # 创建用户ID
create_user_name = Column(String(50), comment='创建用户名称') # 创建用户名称
is_add = Column(Integer, comment='是否添加')
class EntityRole(declarative_base()):
__tablename__ = "rms_role"
__table_args__ = (
{
"comment": "用户角色实体类"
}
)
role_id = Column(String(50), primary_key=True, comment="角色ID")
role_code = Column(String(50), comment="角色编号")
role_name = Column(String(50), comment="角色名")
role_level = Column(Integer, comment="角色级别")
sort_index = Column(Integer, comment="排序序号")
is_enabled = Column(Integer, comment="是否启用")
description = Column(String(50), comment="备注")
is_add = Column(Integer, comment="")