mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 12:24:01 +00:00
seed plumber service
This commit is contained in:
+38
@@ -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');
|
||||
}
|
||||
}
|
||||
+38
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call(SodaVendorMachine\SodaVendorContractObligationsTableSeeder::class);
|
||||
$this->call(SodaVendorMachine\SodaVendorContractObligationDependenciesTableSeeder::class);
|
||||
|
||||
// Courier Deliver Servive
|
||||
// Courier Deliver Service
|
||||
$this->call(CourierDeliverService\CourierDeliverServiceContractTemplateTableSeeder::class);
|
||||
$this->call(CourierDeliverService\CourierDeliverServiceContractTemplateObligationsTableSeeder::class);
|
||||
$this->call(CourierDeliverService\CourierDeliverServiceContractTemplateObligationDependenciesTableSeeder::class);
|
||||
@@ -46,6 +46,19 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call(CourierDeliverService\CourierDeliverServiceContractObligationsTableSeeder::class);
|
||||
$this->call(CourierDeliverService\CourierDeliverServiceContractObligationDependenciesTableSeeder::class);
|
||||
|
||||
// Plumber Service
|
||||
$this->call(PlumberService\PlumberServiceContractTemplateTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractTemplateObligationsTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractTemplateObligationDependenciesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractTemplateObligationContractDependenciesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceEntitiesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceEntitySignaturesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServicesContractTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractEntitiesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractObligationsTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractObligationDependenciesTableSeeder::class);
|
||||
$this->call(PlumberService\PlumberServiceContractObligationContractDependenciesTableSeeder::class);
|
||||
|
||||
DB::commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractEntitiesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_entities')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 201,
|
||||
'entity_id' => 201,
|
||||
'entity_signature_id' => 201,
|
||||
'type' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 201,
|
||||
'entity_id' => 203,
|
||||
'entity_signature_id' => 203,
|
||||
'type' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'entity_id' => 203,
|
||||
'entity_signature_id' => 203,
|
||||
'type' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 204,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'entity_id' => 202,
|
||||
'entity_signature_id' => 202,
|
||||
'type' => 1,
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractObligationContractDependenciesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_obligation_contract_dependencies')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 4,
|
||||
'contract_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'depend_contract_id' => 202, // Plumber Mario Service
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractObligationDependenciesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_obligation_dependencies')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 4,
|
||||
'contract_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'depend_contract_obligation_id' => 201, // mushroom kingdom request service from plumber hero company to rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 4,
|
||||
'contract_obligation_id' => 203, // plumber hero company get reward
|
||||
'depend_contract_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 3,
|
||||
'contract_obligation_id' => 205, // plumber hero accept rescue mission
|
||||
'depend_contract_obligation_id' => 204, // plumber hero company request plumber rescue mission service
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 204,
|
||||
'user_id' => 3,
|
||||
'contract_obligation_id' => 206, // plumber hero complete castle level
|
||||
'depend_contract_obligation_id' => 205, // plumber hero accept rescue mission
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 205,
|
||||
'user_id' => 3,
|
||||
'contract_obligation_id' => 207, // plumber hero defeat bowser
|
||||
'depend_contract_obligation_id' => 206, // plumber hero complete castle level
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 206,
|
||||
'user_id' => 3,
|
||||
'contract_obligation_id' => 208, // plumber hero rescue princess peach
|
||||
'depend_contract_obligation_id' => 207, // plumber hero defeat bowser
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 207,
|
||||
'user_id' => 3,
|
||||
'contract_obligation_id' => 209, // plumber hero get reward
|
||||
'depend_contract_obligation_id' => 208, // plumber hero rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class PlumberServiceContractObligationsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
// mushroom kingdom request service from plumber hero company to rescue princess peach
|
||||
// plumber hero company rescue princess peach
|
||||
// plumber hero company get reward
|
||||
|
||||
// plumber hero company request plumber rescue mission service
|
||||
// plumber hero accept rescue mission
|
||||
// plumber hero complete castle level
|
||||
// plumber hero defeat bowser
|
||||
// plumber hero rescue princess peach
|
||||
// plumber hero get reward
|
||||
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_obligations')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 201,
|
||||
'contract_template_obligation_id' => 201,
|
||||
'contract_entity_id' => 201,
|
||||
'name' => 'mushroom kingdom request service from plumber hero company to rescue princess peach',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.request_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 201,
|
||||
'contract_template_obligation_id' => 202,
|
||||
'contract_entity_id' => 203,
|
||||
'name' => 'plumber hero company rescue princess peach',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 201,
|
||||
'contract_template_obligation_id' => 203,
|
||||
'contract_entity_id' => 203,
|
||||
'name' => 'plumber hero company get reward',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 204,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 204,
|
||||
'contract_entity_id' => 203,
|
||||
'name' => 'plumber hero company request plumber rescue mission service',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.request_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 205,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 205,
|
||||
'contract_entity_id' => 202,
|
||||
'name' => 'plumber hero accept rescue mission',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.request_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 206,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 206,
|
||||
'contract_entity_id' => 202,
|
||||
'name' => 'plumber hero complete castle level',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 207,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 207,
|
||||
'contract_entity_id' => 202,
|
||||
'name' => 'plumber hero defeat bowser',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 208,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 208,
|
||||
'contract_entity_id' => 202,
|
||||
'name' => 'plumber hero rescue princess peach',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 209,
|
||||
'user_id' => 3,
|
||||
'contract_id' => 202,
|
||||
'contract_template_obligation_id' => 209,
|
||||
'contract_entity_id' => 202,
|
||||
'name' => 'plumber hero get reward',
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_status' => config('constants.contract_obligation.complete_status.pending'),
|
||||
'accept_status' => config('constants.contract_obligation.accept_status.pending'),
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'in_time_contract_obligation_template' => json_encode([]),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays(1),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractTemplateObligationContractDependenciesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_template_obligation_contract_template_dependencies')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 4,
|
||||
'contract_template_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'depend_contract_template_id' => 202, // Plumber Mario Service
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractTemplateObligationDependenciesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_template_obligation_dependencies')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'depend_contract_template_obligation_id' => 201, // mushroom kingdom request service from plumber hero company to rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 203, // plumber hero company get reward
|
||||
'depend_contract_template_obligation_id' => 202, // plumber hero company rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 205, // plumber hero accept rescue mission
|
||||
'depend_contract_template_obligation_id' => 204, // plumber hero company request plumber rescue mission service
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 204,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 206, // plumber hero complete castle level
|
||||
'depend_contract_template_obligation_id' => 205, // plumber hero accept rescue mission
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 205,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 207, // plumber hero defeat bowser
|
||||
'depend_contract_template_obligation_id' => 206, // plumber hero complete castle level
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 206,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 208, // plumber hero rescue princess peach
|
||||
'depend_contract_template_obligation_id' => 207, // plumber hero defeat bowser
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 207,
|
||||
'user_id' => 3,
|
||||
'contract_template_obligation_id' => 209, // plumber hero get reward
|
||||
'depend_contract_template_obligation_id' => 208, // plumber hero rescue princess peach
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceContractTemplateTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_templates')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 3,
|
||||
'name' => 'Mushroom Kingdom Service',
|
||||
'complete_day_range' => 1,
|
||||
'status' => config('constants.contact.status.active'),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 3,
|
||||
'name' => 'Plumber Mario Service',
|
||||
'complete_day_range' => 1,
|
||||
'status' => config('constants.contact.status.active'),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceEntitiesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('entities')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 4,
|
||||
'name' => 'Mushroom Kingdom',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 4,
|
||||
'name' => 'Mario',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 4,
|
||||
'name' => 'Plumber Hero Company',
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PlumberServiceEntitySignaturesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('entity_signatures')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'entity_id' => 201,
|
||||
'type' => config('constants.entity.signature.master_key'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'entity_id' => 202,
|
||||
'type' => config('constants.entity.signature.master_key'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 203,
|
||||
'entity_id' => 203,
|
||||
'type' => config('constants.entity.signature.master_key'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use App\Models\ContractTemplate;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class PlumberServicesContractTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$contract_template = ContractTemplate::find(201);
|
||||
|
||||
DB::table('contracts')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => $contract_template->user_id,
|
||||
'contract_template_id' => $contract_template->id,
|
||||
'name' => $contract_template->name,
|
||||
'in_time_contract_template' => json_encode($contract_template),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays($contract_template->complete_day_range),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
|
||||
$contract_template = ContractTemplate::find(202);
|
||||
|
||||
DB::table('contracts')->insert([
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => $contract_template->user_id,
|
||||
'contract_template_id' => $contract_template->id,
|
||||
'name' => $contract_template->name,
|
||||
'in_time_contract_template' => json_encode($contract_template),
|
||||
'status' => 1,
|
||||
'completed_at' => null,
|
||||
'failed_at' => null,
|
||||
'start_at' => Carbon::now(),
|
||||
'end_at' => Carbon::now()->addDays($contract_template->complete_day_range),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\PlumberService;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class PlumberServiceContractTemplateObligationsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
// mushroom kingdom request service from plumber hero company to rescue princess peach
|
||||
// plumber hero company rescue princess peach
|
||||
// plumber hero company get reward
|
||||
|
||||
// plumber hero company request plumber hero rescue mission service
|
||||
// plumber hero accept rescue mission
|
||||
// plumber hero complete castle level
|
||||
// plumber hero defeat bowser
|
||||
// plumber hero rescue princess peach
|
||||
// plumber hero get reward
|
||||
|
||||
public function run()
|
||||
{
|
||||
DB::table('contract_template_obligations')->insert([
|
||||
[
|
||||
'id' => 201,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 201,
|
||||
'name' => 'mushroom kingdom request service from plumber hero company to rescue princess peach',
|
||||
'sequence' => 1.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.request_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 202,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 201,
|
||||
'name' => 'plumber hero rescue princess peach',
|
||||
'sequence' => 2.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 203,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 201,
|
||||
'name' => 'plumber hero company get reward',
|
||||
'sequence' => 3.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.money'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 204,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero company request plumber hero rescue mission service',
|
||||
'sequence' => 1.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.request_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 205,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero accept rescue mission',
|
||||
'sequence' => 2.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.accept_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 206,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero complete castle level',
|
||||
'sequence' => 3.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 207,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero defeat bowser',
|
||||
'sequence' => 4.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 208,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero rescue princess peach',
|
||||
'sequence' => 4.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.offer_service'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 209,
|
||||
'user_id' => 3,
|
||||
'contract_template_id' => 202,
|
||||
'name' => 'plumber hero get reward',
|
||||
'sequence' => 4.0,
|
||||
'reference' => null,
|
||||
'content' => null,
|
||||
'must_complete' => 1,
|
||||
'must_accept' => 1,
|
||||
'complete_day_range' => 1,
|
||||
'type' => config('constants.contract_obligation.type.money'),
|
||||
'status' => 1,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'updated_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class UsersTableSeeder extends Seeder
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'first_name' => 'plumber service',
|
||||
'first_name' => 'Plumber Service',
|
||||
'last_name' => 'project',
|
||||
'username' => 'user 2',
|
||||
'email' => 'one@plumber-service.com',
|
||||
|
||||
Reference in New Issue
Block a user