mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-09 22:00:18 -04:00
* Add create user endpoint and update model/entity * Add next route for adding user and add functionality for user table * Connect create item to backend and add associated frontend routes
19 lines
716 B
Python
19 lines
716 B
Python
from pydantic import BaseModel, Field
|
|
from enum import Enum
|
|
from typing import List
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
from .enum_for_models import UserTypeEnum, ProgramTypeEnum
|
|
|
|
|
|
class User(BaseModel):
|
|
id: int | None = None
|
|
username: str = Field(..., description="The username of the user")
|
|
email: str = Field(..., description="The e-mail of the user")
|
|
experience: int | None = Field(None, description="Years of Experience of the User")
|
|
group: str | None = Field(None, description="The group of the user")
|
|
program: List[ProgramTypeEnum] | None = None
|
|
role: UserTypeEnum | None = None
|
|
created_at: Optional[datetime] = datetime.now()
|
|
uuid: str | None = None
|