- Datenmodell Property/Season/Extra (Beträge in Cent), Seeder mit Preisliste 2026 - PriceCalculator: Saison-Splitting, Mindestaufenthalt, Zusatzperson, Endreinigung, Extras, Anzahlung/Restzahlung - Filament-Verwaltung: Wohnungen, Saisons (Überschneidungsprüfung, Lückenwarnung, Kopie ins Folgejahr, Preisrechner), Zusatzleistungen - Tests für Preisberechnung und Saisonverwaltung Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.3 KiB
PHP
41 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('properties', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name');
|
|
$table->string('slug')->unique();
|
|
$table->string('address')->nullable();
|
|
$table->unsignedSmallInteger('size_sqm')->nullable();
|
|
$table->unsignedTinyInteger('max_guests');
|
|
$table->unsignedTinyInteger('included_guests');
|
|
$table->unsignedInteger('extra_guest_fee_per_night')->default(0);
|
|
$table->unsignedInteger('cleaning_fee')->default(0);
|
|
$table->unsignedTinyInteger('deposit_percent')->default(35);
|
|
$table->unsignedSmallInteger('balance_due_days_before_arrival')->default(28);
|
|
$table->time('check_in_time')->nullable();
|
|
$table->time('check_out_time')->nullable();
|
|
$table->boolean('is_active')->default(true);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('properties');
|
|
}
|
|
};
|