finish for init core
This commit is contained in:
1
fuware/schemas/user/__init__.py
Normal file
1
fuware/schemas/user/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .user import *
|
24
fuware/schemas/user/user.py
Normal file
24
fuware/schemas/user/user.py
Normal file
@ -0,0 +1,24 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from fastapi import Form
|
||||
|
||||
from fuware.schemas.fuware_model import FuwareModel
|
||||
|
||||
class UserBase(FuwareModel):
|
||||
username: str = Form(...)
|
||||
|
||||
class UserRequest(UserBase):
|
||||
password: str = Form(...)
|
||||
|
||||
class UserCreate(UserRequest):
|
||||
password: str = Form(...)
|
||||
name: str
|
||||
|
||||
class PrivateUser(UserBase):
|
||||
id: str
|
||||
name: str
|
||||
is_admin: bool
|
||||
is_lock: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
model_config = ConfigDict(from_attributes=True)
|
Reference in New Issue
Block a user