PaiGram/core/user/models.py

14 lines
381 B
Python
Raw Normal View History

from typing import Optional
2022-07-26 10:07:31 +00:00
from sqlmodel import SQLModel, Field, Enum, Column
from models.base import RegionEnum
2022-07-26 10:07:31 +00:00
class User(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
user_id: int = Field()
yuanshen_uid: int = Field()
genshin_uid: int = Field()
region: Optional[RegionEnum] = Field(sa_column=Column(Enum(RegionEnum)))