Minimum stay exceptions (gap filled, ends on changeover day, offers, absolute minimum); copy seasons aligned to a weekday

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 22:38:27 +02:00
1 parent 20235b9139
commit 70a8c5072b
9 files changed
+280 -15

No files matched your search

+19
View File
@@ -27,6 +27,10 @@
'hold_hours',
'check_in_time',
'check_out_time',
'changeover_weekday',
'min_stay_fill_gaps',
'min_stay_until_changeover',
'min_stay_absolute',
'is_active',
])]
class Property extends Model
@@ -39,10 +43,25 @@ class Property extends Model
*
* @return array<string, string>
*/
/**
* Defaults of the minimum stay rules (as in the migration), also before the model is reloaded.
*
* @var array<string, mixed>
*/
protected $attributes = [
'min_stay_fill_gaps' => true,
'min_stay_until_changeover' => false,
'min_stay_absolute' => 2,
];
protected function casts(): array
{
return [
'is_active' => 'boolean',
'min_stay_fill_gaps' => 'boolean',
'min_stay_until_changeover' => 'boolean',
'changeover_weekday' => 'integer',
'min_stay_absolute' => 'integer',
];
}