latest update
This commit is contained in:
1 parent
7a7ed16830
commit
026a23ade1
17 files changed
+2739
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?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('guest_notes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('guest_id')->constrained()->onDelete('cascade');
|
||||
$table->text('note_text');
|
||||
$table->foreignId('staff_id')->constrained('users')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('guest_notes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('vouchers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('code')->unique();
|
||||
$table->string('name');
|
||||
$table->text('description')->nullable();
|
||||
$table->decimal('discount_amount', 10, 2)->nullable();
|
||||
$table->integer('discount_percentage')->nullable();
|
||||
$table->date('valid_from');
|
||||
$table->date('valid_until');
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('vouchers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('loyalty_tiers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('min_visits');
|
||||
$table->integer('min_spend');
|
||||
$table->decimal('discount_percentage', 5, 2);
|
||||
$table->text('benefits')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('loyalty_tiers');
|
||||
}
|
||||
};
|
||||
@@ -13,6 +13,11 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('campaigns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->json('segment_rules');
|
||||
$table->text('offer_text');
|
||||
$table->foreignId('voucher_id')->constrained()->onDelete('cascade');
|
||||
$table->enum('status', ['active', 'inactive', 'draft'])->default('draft');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user