init
This commit is contained in:
19
model/user.py
Normal file
19
model/user.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from sqlmodel import Field, ARRAY
|
||||
|
||||
from .bot_entity import BotEntity
|
||||
from .bot_enum import EnumType
|
||||
from .language import LanguageBase
|
||||
from .role import RoleBase
|
||||
|
||||
from .settings import DbSettings as DbSettings
|
||||
from .fsm_storage import FSMStorage as FSMStorage
|
||||
|
||||
|
||||
class UserBase(BotEntity, table = False):
|
||||
|
||||
__tablename__ = "user"
|
||||
|
||||
lang: LanguageBase = Field(sa_type = EnumType(LanguageBase), default = LanguageBase.DEFAULT)
|
||||
is_active: bool = True
|
||||
|
||||
roles: list[RoleBase] = Field(sa_type=ARRAY(EnumType(RoleBase)), default = [RoleBase.DEFAULT_USER])
|
||||
Reference in New Issue
Block a user