Add ignore_dates field to worker constraints and implement related tests
This commit is contained in:
@@ -146,6 +146,10 @@ class MaxDaysPerWeekBlockConstraint(BaseModel):
|
||||
ge=1,
|
||||
description="Length of the sliding week block (for example, 2 means every consecutive 2-week window).",
|
||||
)
|
||||
ignore_dates: list[datetime.date] = Field(
|
||||
default_factory=list,
|
||||
description="List of specific dates to exclude from this constraint.",
|
||||
)
|
||||
|
||||
|
||||
class MaxUniqueShiftsPerWeekBlockConstraint(BaseModel):
|
||||
@@ -159,6 +163,10 @@ class MaxUniqueShiftsPerWeekBlockConstraint(BaseModel):
|
||||
ge=1,
|
||||
description="Length of the sliding week block (for example, 2 means every consecutive 2-week window).",
|
||||
)
|
||||
ignore_dates: list[datetime.date] = Field(
|
||||
default_factory=list,
|
||||
description="List of specific dates to exclude from this constraint.",
|
||||
)
|
||||
|
||||
|
||||
class Worker(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user