mini-rbac/backend/models/user.py

20 lines
519 B
Python
Raw Normal View History

2022-09-11 10:34:18 +00:00
from core.enums import UserType
from core.table import Table, fields
class UserModel(Table):
"""
用户模型类 > user table
"""
username = fields.CharField(max_length=16, description="账号", unique=True)
nickname = fields.CharField(max_length=20, description="姓名", null=True)
password = fields.CharField(max_length=128, description="密码")
class Meta:
table = "sys_user"
table_description = "用户表"
# 索引
unique_together = ("username",)