<?php

namespace App\Modules\Pilkades\Models;

use App\Core\Concerns\HasUuid;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class CandidateGallery extends Model
{
    use HasUuid, SoftDeletes;

    protected $table = 'candidate_gallery';

    protected $fillable = [
        'candidate_id',
        'media_id',
        'caption',
        'urutan',
    ];

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

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