<?php

namespace App\Models;

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

class Department extends Model
{
    use HasFactory;

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

    protected $casts = [
        'id' => 'integer',
        'name' => 'string',
        'description' => 'string',
        'country_code' => 'string',
        'mobile_number' => 'string',
        'telephone_number' => "string",
        'department_color' => 'string',
        'department_icon' => 'string',
        'address' => 'string',
        'area' => 'string',
        'city' => 'string',
        'state' => 'string',
        'country' => 'string',
        'pincode' => 'string',
        'latitude' => 'string',
        'longitude' => 'string',
        'sort_order' => 'integer',
        'status' => 'integer',
    ];

    public function complaints()
    {
        return $this->hasMany(Complaint::class);
    }
}
