2024-05-15 09:14:26 +00:00

26 lines
532 B
Python

from datetime import datetime
from uuid import UUID
from pydantic import 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: UUID
name: str
is_admin: bool
is_lock: bool
created_at: datetime
updated_at: datetime
model_config = ConfigDict(from_attributes=True)