"""Table groupes.""" import uuid from datetime import time, datetime, timezone from sqlalchemy import String, Text, Time, DateTime from sqlalchemy.orm import Mapped, mapped_column, relationship from app.core.database import Base class Groupe(Base): __tablename__ = "groupes" id: Mapped[uuid.UUID] = mapped_column(primary_key=True, default=uuid.uuid4) nom: Mapped[str] = mapped_column(String(100), nullable=False) tenant_schema: Mapped[str | None] = mapped_column(String(80), unique=True) district: Mapped[str] = mapped_column(String(20), default="87-16") region: Mapped[str] = mapped_column(String(20), default="87") adresse_local: Mapped[str | None] = mapped_column(Text) jour_reunion: Mapped[str | None] = mapped_column(String(10)) heure_reunion: Mapped[time | None] = mapped_column(Time) assemblee_affaires_ordre: Mapped[str] = mapped_column(String(20), default="premiere") format_reunion: Mapped[str | None] = mapped_column(Text) lien_aa87: Mapped[str] = mapped_column(String(255), default="https://aa87.org") cree_le: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)) membres = relationship("Membre", back_populates="groupe")