<?php

namespace Database\Seeders\RepairService;

use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;

class RepairServiceContractObligationsTableSeeder extends Seeder
{
    

    public function run()
    {
        DB::table('contract_obligations')->insert([
            [
                'id' => 4,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 4,
                'contract_entity_id' => 3,
                'name' => 'Car Owner send car to workshop and explain/describe the problem to Repair Guy',
                '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.money'),
                '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' => 5,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 5,
                'contract_entity_id' => 4,
                'name' => 'Repair Guy check/analysis Car',
                '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' => null,
                'end_at' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s')
            ],
            [
                'id' => 6,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 6,
                'contract_entity_id' => 4,
                'name' => 'Repair Guy repair car',
                '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' => Carbon::now(),
                'failed_at' => null,
                'start_at' => null,
                'end_at' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s')
            ],
            [
                'id' => 7,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 7,
                'contract_entity_id' => 3,
                'name' => 'Car Owner pay repair fees',
                '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' => Carbon::now(),
                'failed_at' => null,
                'start_at' => null,
                'end_at' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s')
            ],
            [
                'id' => 8,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 8,
                'contract_entity_id' => 3,
                'name' => 'Car Owner check car',
                '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' => Carbon::now(),
                'failed_at' => null,
                'start_at' => null,
                'end_at' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s')
            ],
            [
                'id' => 9,
                'user_id' => 5,
                'contract_id' => 2,
                'contract_template_obligation_id' => 9,
                'contract_entity_id' => 3,
                'name' => 'Repair Service complete & Car Owner drive car back home',
                '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' => Carbon::now(),
                'failed_at' => null,
                'start_at' => null,
                'end_at' => null,
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s')
            ]
        ]);
    }
}