Files
bogazici-api/app/Models/Faq.php
2026-03-27 10:41:54 +03:00

38 lines
710 B
PHP

<?php
namespace App\Models;
use App\Enums\FaqCategory;
use Database\Factories\FaqFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Faq extends Model
{
/** @use HasFactory<FaqFactory> */
use HasFactory;
/**
* @var list<string>
*/
protected $fillable = [
'category',
'question',
'answer',
'order_index',
'is_active',
];
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'category' => FaqCategory::class,
'order_index' => 'integer',
'is_active' => 'boolean',
];
}
}