<?php

namespace Modules\Vrc\Entities;

use Illuminate\Database\Eloquent\Model;

class VrcIncident extends Model
{
    protected $table = 'vrc_incidents';

    protected $fillable = [
        'business_id', 'location_id', 'number', 'type', 'occurred_at', 'reported_by',
        'persons_involved', 'description', 'injury_details', 'immediate_action',
        'status', 'root_cause', 'investigation', 'capa_id', 'closed_at',
    ];

    protected $casts = [
        'occurred_at' => 'datetime',
        'closed_at'   => 'datetime',
    ];

    public const TYPES = ['accident', 'near_miss', 'illness', 'property_damage', 'environmental'];
    public const STATUSES = ['reported', 'investigating', 'action', 'closed'];
}
