<?php

namespace App\Traits;

use App\Models\FileCategory;
use App\Models\User;
use App\Models\UserRoleMaster;
trait SeederTrait
{

    public function seedFileCategory()
    {

        $model = FileCategory::updateOrCreate(['id' => 1], ['name' => "Others", 'file_name_prefix' => 'others_']);
        $model = FileCategory::updateOrCreate(['id' => 2], ['name' => "Staff", 'file_name_prefix' => 'staff_']);

    }
    public function seedUserRoleMaster()
    {

        $model = UserRoleMaster::updateOrCreate(['id' => 1], ['name' => "Super Admin"]);
        $model = UserRoleMaster::updateOrCreate(['id' => 2], ['name' => "Sub Admin"]);
        $model = UserRoleMaster::updateOrCreate(['id' => 3], ['name' => "End User"]);

    }

    public function seedUser()
    {

        $model = User::updateOrCreate(
            ['id' => 1],
            ['first_name' => "Super"
                , 'last_name' => "Admin"
                , 'email' => 'admin@admin.com'
                , 'password' => '123456'
                , 'phone_number' => '1234567890'
                , 'role_id' => '1',
            ]);

    }

}
