diff --git a/app/Models/Venue.php b/app/Models/Venue.php index e69de29..d246a19 100644 --- a/app/Models/Venue.php +++ b/app/Models/Venue.php @@ -0,0 +1,10 @@ +id(); + $table->string('loyalty_id')->unique(); + $table->string('first_name'); + $table->string('last_name'); + $table->string('email')->nullable(); + $table->string('phone')->nullable(); + $table->date('date_of_birth')->nullable(); + $table->enum('gender', ['male', 'female', 'other'])->nullable(); + $table->string('nationality')->nullable(); + $table->text('address')->nullable(); + $table->string('passport_number')->nullable(); + $table->date('passport_expiry')->nullable(); + $table->string('preferred_language')->default('en'); + $table->json('preferences')->nullable(); + $table->foreignId('loyalty_tier_id')->nullable()->constrained()->onDelete('set null'); + $table->integer('total_points')->default(0); + $table->decimal('total_spend', 12, 2)->default(0); + $table->integer('visit_count')->default(0); + $table->datetime('last_visit_at')->nullable(); + $table->datetime('first_visit_at')->nullable(); + $table->enum('status', ['active', 'inactive', 'blacklisted'])->default('active'); + $table->text('notes')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('guests'); + } +}; diff --git a/database/migrations/2026_01_28_112050_create_guest_visits_table.php b/database/migrations/2026_01_28_112050_create_guest_visits_table.php index 6cd8d7a..92054e7 100644 Binary files a/database/migrations/2026_01_28_112050_create_guest_visits_table.php and b/database/migrations/2026_01_28_112050_create_guest_visits_table.php differ diff --git a/database/migrations/2026_01_28_112057_create_issued_vouchers_table.php b/database/migrations/2026_01_28_112057_create_issued_vouchers_table.php index e69de29..9f2542c 100644 --- a/database/migrations/2026_01_28_112057_create_issued_vouchers_table.php +++ b/database/migrations/2026_01_28_112057_create_issued_vouchers_table.php @@ -0,0 +1,37 @@ +id(); + $table->foreignId('voucher_id')->constrained()->onDelete('cascade'); + $table->foreignId('guest_id')->constrained()->onDelete('cascade'); + $table->foreignId('issued_by')->constrained('users')->onDelete('cascade'); + $table->string('voucher_code')->unique(); + $table->decimal('value', 8, 2); + $table->datetime('issued_at'); + $table->datetime('expires_at')->nullable(); + $table->datetime('used_at')->nullable(); + $table->enum('status', ['active', 'used', 'expired', 'cancelled'])->default('active'); + $table->text('notes')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('issued_vouchers'); + } +}; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index c040f7b..b6e611a 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -251,10 +251,17 @@ + + + +
+