<?php

namespace App\Models;

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

class Complaint_Img extends Model
{
    use HasFactory;

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

    protected $casts = [
        'id' => 'integer',
        'complaint_id' => 'integer',
        'type' => 'integer',
        'content_type' => 'integer',
        'content_url' => 'string',
        'thumbnail_image' => 'string',
        'status' => 'integer',
    ];

    public function complaint()
    {
        return $this->belongsTo(Complaint::class, 'complaint_id');
    }
}
