49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
"""Schémas Phase 3 — Gestion."""
|
|
from pydantic import BaseModel
|
|
from datetime import date, datetime
|
|
from uuid import UUID
|
|
from typing import Optional
|
|
|
|
|
|
# ── G5 Rotations ──
|
|
class RotationCreate(BaseModel):
|
|
date_reunion: date
|
|
poste_id: UUID
|
|
membre_id: UUID
|
|
note: Optional[str] = None
|
|
|
|
|
|
class RotationOut(BaseModel):
|
|
id: UUID
|
|
date_reunion: date
|
|
poste_nom: str
|
|
membre_prenom: str
|
|
note: Optional[str] = None
|
|
cree_le: datetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
# ── G9 Paramètres du groupe ──
|
|
class GroupeUpdate(BaseModel):
|
|
nom: Optional[str] = None
|
|
adresse_local: Optional[str] = None
|
|
jour_reunion: Optional[str] = None
|
|
heure_reunion: Optional[str] = None
|
|
format_reunion: Optional[str] = None
|
|
lien_aa87: Optional[str] = None
|
|
|
|
|
|
class GroupeDetail(BaseModel):
|
|
id: UUID
|
|
nom: str
|
|
district: str
|
|
region: str
|
|
adresse_local: Optional[str] = None
|
|
jour_reunion: Optional[str] = None
|
|
heure_reunion: Optional[str] = None
|
|
format_reunion: Optional[str] = None
|
|
lien_aa87: str
|
|
cree_le: datetime
|
|
|
|
model_config = {"from_attributes": True}
|