seed plumber service

This commit is contained in:
glovetleong
2021-07-17 11:23:01 +08:00
parent 8ec28de473
commit 3f804cbbc3
19 changed files with 1018 additions and 3 deletions
@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractTemplateObligationContractTemplateDependenciesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_template_obligation_contract_template_dependencies', function (Blueprint $table) {
$table->id();
$table->bigInteger('user_id')->unsigned()->nullable();
$table->foreign('user_id', 'ctoctd_u_id')->references('id')->on('users')->onDelete('cascade');
$table->bigInteger('contract_template_obligation_id')->unsigned()->nullable();
$table->foreign('contract_template_obligation_id', 'ctoctd_cto_id')->references('id')->on('contract_templates')->onDelete('cascade');
$table->bigInteger('depend_contract_template_id')->unsigned()->nullable();
$table->foreign('depend_contract_template_id', 'ctoctd_dct_id')->references('id')->on('contract_templates')->onDelete('cascade');
$table->integer('status')->nullable()->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_template_obligation_contract_template_dependencies');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateContractObligationContractDependenciesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contract_obligation_contract_dependencies', function (Blueprint $table) {
$table->id();
$table->bigInteger('user_id')->unsigned()->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->bigInteger('contract_obligation_id')->unsigned()->nullable();
$table->foreign('contract_obligation_id', 'codc_co_id')->references('id')->on('contract_obligations')->onDelete('cascade');
$table->bigInteger('depend_contract_id')->unsigned()->nullable();
$table->foreign('depend_contract_id', 'codc_dc_id')->references('id')->on('contracts')->onDelete('cascade');
$table->integer('status')->nullable()->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_obligation_contract_dependencies');
}
}