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:
1 parent
20235b9139
commit
70a8c5072b
9 files changed
+280
-15
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Relaxations of the seasons' minimum stay (see Property::minimumStayRules / PriceCalculator).
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('properties', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('changeover_weekday')->nullable()->after('check_out_time');
|
||||
$table->boolean('min_stay_fill_gaps')->default(true)->after('changeover_weekday');
|
||||
$table->boolean('min_stay_until_changeover')->default(false)->after('min_stay_fill_gaps');
|
||||
$table->unsignedTinyInteger('min_stay_absolute')->default(2)->after('min_stay_until_changeover');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('properties', function (Blueprint $table) {
|
||||
$table->dropColumn(['changeover_weekday', 'min_stay_fill_gaps', 'min_stay_until_changeover', 'min_stay_absolute']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user