13 lines
220 B
Python
13 lines
220 B
Python
from sqlmodel import Field, SQLModel
|
|
|
|
|
|
class User(SQLModel, table=True):
|
|
id: int | None = Field(default=None, primary_key=True)
|
|
|
|
username: str
|
|
|
|
authority: int
|
|
|
|
|
|
class UserInDB(User):
|
|
hashed_password: str
|