<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Sub_In_Charge extends Model
{
    use HasFactory;

    protected $table = 'tbl_sub_in_charge';
    protected $guarded = array();

    protected $hidden = [
        'password',
    ];

    protected $casts = [
        'id' => 'integer',
        'department_id' => 'integer',
        'service_id' => 'string',
        'user_name' => 'string',
        'full_name' => 'string',
        'email' => 'string',
        'password' => 'string',
        'country_code' => 'string',
        'mobile_number' => 'string',
        'image' => 'string',
        'bio' => 'string',
        'device_type' => 'integer',
        'device_token' => 'string',
        'status' => 'integer',
    ];

    public function department()
    {
        return $this->belongsTo(Department::class, 'department_id');
    }
    public function service()
    {
        return $this->belongsTo(Service::class, 'service_id');
    }
}
