<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

/**
 * @mixin IdeHelperFaq
 */
class Faq extends Model
{
    use HasTranslations;

    public const STATUS_DRAFT = 'draft';
    public const STATUS_PUBLISHED = 'published';

    // Sitedeki diğer içerikler gibi iki dilli: {tr, en} JSON olarak saklanır.
    protected $translatable = [
        'question',
        'answer',
    ];

    protected $fillable = [
        'question',
        'answer',
        'order',
        'status'
    ];

    protected $casts = [
        'order' => 'integer'
    ];
}
