<?php

namespace App\Models\Fish;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class SpeciesRevision extends Model
{
    protected $table = 'species_revisions';

    public $timestamps = false;

    protected $fillable = [
        'species_id',
        'revision_no',
        'snapshot',
        'author',
        'change_note',
    ];

    protected $casts = [
        'snapshot' => 'array',
        'created_at' => 'datetime',
    ];

    public function species(): BelongsTo
    {
        return $this->belongsTo(Species::class);
    }
}
