<?php

namespace Database\Seeders\RenderService;

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

class RenderServiceContractObligationsTableSeeder extends Seeder
{
    

    public function run()
    {
        DB::table('contract_obligations')->insert([
            [
                'id' => 10,
                'user_id' => 6,
                'contract_id' => 3,
                'contract_template_obligation_id' => 10,
                'contract_entity_id' => 5,
                'name' => 'Customer select book (borrow) & show membership card',
                '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' => 11,
                'user_id' => 6,
                'contract_id' => 3,
                'contract_template_obligation_id' => 11,
                'contract_entity_id' => 6,
                'name' => 'Librarian verify customer membership and book',
                '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' => 12,
                'user_id' => 6,
                'contract_id' => 3,
                'contract_template_obligation_id' => 12,
                'contract_entity_id' => 5,
                'name' => 'Customer Get the book',
                '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' => 13,
                'user_id' => 6,
                'contract_id' =>3,
                'contract_template_obligation_id' => 13,
                'contract_entity_id' => 5,
                'name' => 'Customer Return book',
                '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' =>14,
                'user_id' => 6,
                'contract_id' => 3,
                'contract_template_obligation_id' => 14,
                'contract_entity_id' => 6,
                'name' => 'Librarian check the book',
                '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' => 15,
                'user_id' => 6,
                'contract_id' => 3,
                'contract_template_obligation_id' => 15,
                'contract_entity_id' => 6,
                'name' => 'Librarian update customer borrow record',
                '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')
            ]
        ]);
    }
}