add guest invitation read & valide with route

This commit is contained in:
2020-08-21 11:37:52 +02:00
parent 0a819fbadf
commit bddf4e5c09
12 changed files with 271 additions and 6 deletions

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEventNonUserGuestsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('event_non_user_guests', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id');
$table->string('email');
$table->uuid('token')->default(\Illuminate\Support\Str::uuid());
$table->timestamp('read_at')->nullable();
$table->timestamp('validated_at')->nullable();
$table->timestamps();
$table->foreign('event_id')
->references('id')
->on('events')
->onDelete('restrict')
->onUpdate('restrict');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('event_non_user_guests', function (Blueprint $table) {
$table->dropForeign(['event_id']);
});
Schema::dropIfExists('event_non_user_guests');
}
}