Files
F-r-ldraledigplannerare/backend/app/entities/workspace.py
T
jacobh2 b87ad0e7ad Let a household choose to be paid for the red days
Asking for a full week off never spent anything on the Saturday, the
Sunday or a holiday, and a test now says so outright rather than leaving
it to be rediscovered. Those days are free because vacation cannot be
taken on a day that is not a working day.

Parental benefit is a payment rather than a schedule, though, so it can
be drawn on a red day to turn an unpaid day off into a paid one — at the
cost of a day the family would otherwise keep. That is now a workspace
setting, off by default, and it never reaches for a vacation day. With it
off the planner behaves exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ei7gCZzdd751uZtPzb1Pep
2026-09-19 14:28:38 +02:00

19 lines
694 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Domain entity: Workspace (shared planning space for 1–2 parents)."""
from dataclasses import dataclass
from datetime import datetime
from uuid import UUID
@dataclass
class Workspace:
id: UUID
name: str
created_at: datetime | None = None
# §todo item 2 — per-workspace opt-in, default False: allow the planning
# engine to fund a free day (Saturday, Sunday, public holiday) with a
# parental-benefit day instead of leaving it unpaid. Never vacation (see
# `app.services.allocation_service.REASON_FP_RED_DAY`). Threaded into the
# allocator by `AllocationInputLoader.load` as `AllocationInput.take_pl_on_red_days`.
take_pl_on_red_days: bool = False