Customer Mail, Mails, Views Lead Customer

This commit is contained in:
Kevin Adametz 2020-03-12 09:37:01 +01:00
parent f1e0900a7a
commit f53f17f9c1
46 changed files with 2217 additions and 1489 deletions

View file

@ -0,0 +1,61 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomerMailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customer_mails', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id');
$table->bigInteger('customer_id');
$table->bigInteger('lead_id')->nullable();
$table->string('email', 255);
$table->string('subject', 255);
$table->text('message')->nullable();
$table->boolean('send')->default(false);
$table->boolean('fail')->default(false);
$table->text('error')->nullable();
$table->timestamp('sent_at')->nullable();
$table->timestamp('scheduled_at')->nullable();
$table->timestamp('delivered_at')->nullable();
$table->timestamps();
$table->foreign('booking_id')
->references('id')
->on('booking');
$table->foreign('customer_id')
->references('id')
->on('customer');
$table->foreign('lead_id')
->references('id')
->on('lead');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customer_mails');
}
}