<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CharacterAchievement extends Model
{
    public $timestamps = false;

    protected $fillable = ['citizen_id', 'achievement_id', 'unlocked_at'];

    protected function casts(): array
    {
        return [
            'unlocked_at' => 'datetime',
        ];
    }

    public function achievement()
    {
        return $this->belongsTo(Achievement::class);
    }
}
