<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CustomerQualityFlag extends Model
{
    protected $guarded = ['id'];

    protected $casts = [
        'is_blacklisted' => 'boolean',
        'is_fake' => 'boolean',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

    public function customer()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function createdByAdmin()
    {
        return $this->belongsTo(Admin::class, 'created_by_admin_id');
    }

    public function updatedByAdmin()
    {
        return $this->belongsTo(Admin::class, 'updated_by_admin_id');
    }
}
