feat: extend event toolkit and polish guest pwa
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasTable('tenant_packages') || ! Schema::hasTable('packages')) {
|
||||
return;
|
||||
}
|
||||
|
||||
DB::table('tenant_packages')
|
||||
->whereIn('package_id', function ($query) {
|
||||
$query->select('id')
|
||||
->from('packages')
|
||||
->where('type', 'endcustomer');
|
||||
})
|
||||
->update([
|
||||
'expires_at' => now()->addCentury(),
|
||||
'active' => true,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// No rollback – endcustomer packages should remain non-expiring.
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('invite_layouts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('slug')->unique();
|
||||
$table->string('name');
|
||||
$table->string('subtitle')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->string('paper')->default('a4');
|
||||
$table->string('orientation')->default('portrait');
|
||||
$table->json('preview')->nullable();
|
||||
$table->json('layout_options')->nullable();
|
||||
$table->json('instructions')->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->unsignedBigInteger('created_by')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('created_by')->references('id')->on('users')->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('invite_layouts');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tenant_feedback', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('tenant_id');
|
||||
$table->unsignedBigInteger('event_id')->nullable();
|
||||
$table->string('category', 80);
|
||||
$table->string('sentiment', 20)->nullable();
|
||||
$table->unsignedTinyInteger('rating')->nullable();
|
||||
$table->string('title')->nullable();
|
||||
$table->text('message')->nullable();
|
||||
$table->json('metadata')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('tenant_id')->references('id')->on('tenants')->cascadeOnDelete();
|
||||
$table->foreign('event_id')->references('id')->on('events')->cascadeOnDelete();
|
||||
$table->index(['tenant_id', 'category']);
|
||||
$table->index(['event_id', 'category']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tenant_feedback');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user