Files
sysops 1fedd683e0 Initial commit – TimeMaster Zeiterfassung & HR-Tool
Stand: agent-06 (Audit-Log), agent-05 (Krankmeldung), agent-07 Phase 1 (Personalnummer),
Busylight-Pull-Integration, TOTP/2FA, Abwesenheiten, Zeiterfassung, Kiosk-Grundgerüst.
Migrations 0001–0023 deployed auf 192.168.1.137 + .164.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 20:03:27 +02:00

27 lines
1.1 KiB
Python

import uuid
from datetime import date
from sqlalchemy import Boolean, Date, Integer, String, UniqueConstraint
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class PublicHoliday(Base):
__tablename__ = "public_holidays"
__table_args__ = (
UniqueConstraint("country", "state", "date", name="uq_public_holiday"),
)
id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
country: Mapped[str] = mapped_column(String(10), nullable=False)
state: Mapped[str | None] = mapped_column(String(10)) # z.B. "BY", "NW" für Bundesländer
date: Mapped[date] = mapped_column(Date, nullable=False, index=True)
name: Mapped[str] = mapped_column(String(255), nullable=False)
year: Mapped[int] = mapped_column(Integer, nullable=False, index=True)
is_high_rate: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)
def __repr__(self) -> str:
return f"<PublicHoliday {self.name} {self.date}>"