17 lines
757 B
Python
17 lines
757 B
Python
"""Table postes."""
|
|
import uuid
|
|
from sqlalchemy import String, Text, Integer, Interval, Enum as SAEnum
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from app.core.database import Base
|
|
|
|
|
|
class Poste(Base):
|
|
__tablename__ = "postes"
|
|
|
|
id: Mapped[uuid.UUID] = mapped_column(primary_key=True, default=uuid.uuid4)
|
|
nom: Mapped[str] = mapped_column(String(100), nullable=False)
|
|
categorie: Mapped[str] = mapped_column(SAEnum("executif", "service", "physique", name="categorie_poste"), nullable=False)
|
|
description: Mapped[str | None] = mapped_column(Text)
|
|
duree_recommandee: Mapped[str | None] = mapped_column(Interval)
|
|
prerequis: Mapped[str | None] = mapped_column(Text)
|
|
ordre_affichage: Mapped[int | None] = mapped_column(Integer)
|