adding current revision information
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
class SignBase(BaseModel):
|
||||
name: str
|
||||
icon: str
|
||||
|
||||
class Sign(SignBase):
|
||||
id: int
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
class UserBase(BaseModel):
|
||||
username: str
|
||||
|
||||
class UserCreate(UserBase):
|
||||
password: str
|
||||
|
||||
class User(UserBase):
|
||||
id: int
|
||||
is_active: bool
|
||||
is_admin: bool
|
||||
signs: List[Sign] = []
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
class Token(BaseModel):
|
||||
access_token: str
|
||||
token_type: str
|
||||
|
||||
class TokenData(BaseModel):
|
||||
username: Optional[str] = None
|
||||
Reference in New Issue
Block a user