@@ -26,22 +26,22 @@ class User(Base):
2626 id : Mapped [id_key ] = mapped_column (init = False )
2727 uuid : Mapped [str ] = mapped_column (String (50 ), init = False , default_factory = uuid4_str , unique = True )
2828 username : Mapped [str ] = mapped_column (String (20 ), unique = True , index = True , comment = '用户名' )
29- nickname : Mapped [str ] = mapped_column (String (20 ), unique = True , comment = '昵称' )
30- password : Mapped [str | None ] = mapped_column (String (255 ), comment = '密码' )
31- salt : Mapped [bytes | None ] = mapped_column (VARBINARY (255 ).with_variant (BYTEA (255 ), 'postgresql' ), comment = '加密盐' )
32- email : Mapped [str ] = mapped_column (String (50 ), unique = True , index = True , comment = '邮箱' )
29+ nickname : Mapped [str ] = mapped_column (String (20 ), comment = '昵称' )
30+ password : Mapped [str ] = mapped_column (String (255 ), comment = '密码' )
31+ salt : Mapped [bytes ] = mapped_column (VARBINARY (255 ).with_variant (BYTEA (255 ), 'postgresql' ), comment = '加密盐' )
32+ email : Mapped [str | None ] = mapped_column (String (50 ), default = None , unique = True , index = True , comment = '邮箱' )
33+ phone : Mapped [str | None ] = mapped_column (String (11 ), default = None , comment = '手机号' )
34+ avatar : Mapped [str | None ] = mapped_column (String (255 ), default = None , comment = '头像' )
35+ status : Mapped [int ] = mapped_column (default = 1 , index = True , comment = '用户账号状态(0停用 1正常)' )
3336 is_superuser : Mapped [bool ] = mapped_column (
3437 Boolean ().with_variant (INTEGER , 'postgresql' ), default = False , comment = '超级权限(0否 1是)'
3538 )
3639 is_staff : Mapped [bool ] = mapped_column (
3740 Boolean ().with_variant (INTEGER , 'postgresql' ), default = False , comment = '后台管理登陆(0否 1是)'
3841 )
39- status : Mapped [int ] = mapped_column (default = 1 , index = True , comment = '用户账号状态(0停用 1正常)' )
4042 is_multi_login : Mapped [bool ] = mapped_column (
4143 Boolean ().with_variant (INTEGER , 'postgresql' ), default = False , comment = '是否重复登陆(0否 1是)'
4244 )
43- avatar : Mapped [str | None ] = mapped_column (String (255 ), default = None , comment = '头像' )
44- phone : Mapped [str | None ] = mapped_column (String (11 ), default = None , comment = '手机号' )
4545 join_time : Mapped [datetime ] = mapped_column (
4646 DateTime (timezone = True ), init = False , default_factory = timezone .now , comment = '注册时间'
4747 )
0 commit comments