<?php

declare(strict_types=1);

namespace App\Models;

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

class AcademyPromptPackItem extends Model
{
    protected $fillable = [
        'pack_id',
        'prompt_template_id',
        'order_num',
    ];

    protected $casts = [
        'order_num' => 'integer',
    ];

    public function pack(): BelongsTo
    {
        return $this->belongsTo(AcademyPromptPack::class, 'pack_id');
    }

    public function promptTemplate(): BelongsTo
    {
        return $this->belongsTo(AcademyPromptTemplate::class, 'prompt_template_id');
    }
}