Initial commit: Базовая структура сайта
This commit is contained in:
27
backend/app/schemas/leave.py
Executable file
27
backend/app/schemas/leave.py
Executable file
@@ -0,0 +1,27 @@
|
||||
"""
|
||||
Схемы для модуля Отпуска/Больничные
|
||||
"""
|
||||
from pydantic import BaseModel
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class LeaveEventCreate(BaseModel):
|
||||
user_id: int
|
||||
start_date: date
|
||||
end_date: date
|
||||
leave_type: str # "Отпуск", "Больничный"
|
||||
|
||||
|
||||
class LeaveEventResponse(BaseModel):
|
||||
id: int
|
||||
user_id: int
|
||||
user_login: Optional[str] = None
|
||||
start_date: date
|
||||
end_date: date
|
||||
leave_type: str
|
||||
created_at: Optional[str] = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
Reference in New Issue
Block a user