mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-28 16:54:08 +00:00
Rental Service
Repair Service
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\RepairService;
|
||||
|
||||
use App\Models\ContractTemplate;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class RepairServiceContractsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$contract_template = ContractTemplate::find(2);
|
||||
|
||||
DB::table('contracts')->insert([
|
||||
[
|
||||
'id' => 2,
|
||||
'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')
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user