diff --git a/app/Models/Stand/StandReservationPlan.php b/app/Models/Stand/StandReservationPlan.php new file mode 100644 index 000000000..0cbcda7b9 --- /dev/null +++ b/app/Models/Stand/StandReservationPlan.php @@ -0,0 +1,42 @@ + 'array', + 'submitted_by' => 'integer', + 'submitted_at' => 'datetime', + 'approved_by' => 'integer', + 'approved_at' => 'datetime', + 'status' => StandReservationPlanStatus::class, + 'imported_reservations' => 'array', + ]; + + public function submittedBy(): BelongsTo + { + return $this->belongsTo(User::class, 'submitted_by'); + } + + public function approvedBy(): BelongsTo + { + return $this->belongsTo(User::class, 'approved_by'); + } +} diff --git a/app/Models/Stand/StandReservationPlanStatus.php b/app/Models/Stand/StandReservationPlanStatus.php new file mode 100644 index 000000000..6cf172da4 --- /dev/null +++ b/app/Models/Stand/StandReservationPlanStatus.php @@ -0,0 +1,12 @@ +id(); + $table->string('name'); + $table->string('contact_email'); + $table->json('payload'); + $table->unsignedInteger('submitted_by')->nullable(); + $table->timestamp('submitted_at')->nullable(); + $table->unsignedInteger('approved_by')->nullable(); + $table->timestamp('approved_at')->nullable(); + $table->string('status')->default(StandReservationPlanStatus::DRAFT->value); + $table->json('imported_reservations')->nullable(); + $table->timestamps(); + + $table->foreign('submitted_by')->references('id')->on('user')->nullOnDelete(); + $table->foreign('approved_by')->references('id')->on('user')->nullOnDelete(); + }); + } + + public function down(): void + { + Schema::dropIfExists('stand_reservation_plans'); + } +}; diff --git a/database/migrations/2026_04_08_000100_add_vaa_role.php b/database/migrations/2026_04_08_000100_add_vaa_role.php new file mode 100644 index 000000000..9da2e56ad --- /dev/null +++ b/database/migrations/2026_04_08_000100_add_vaa_role.php @@ -0,0 +1,20 @@ + RoleKeys::VAA->value, + 'description' => 'Virtual Airline Administration', + ]); + } + + public function down(): void + { + Role::where('key', RoleKeys::VAA->value)->delete(); + } +};