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