<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SeoMeta extends Model
{
    use HasFactory;

    protected $table = 'seo_meta';

    protected $fillable = [
        'url_path',
        'title',
        'description',
        'keywords',
        'canonical_url',
        'og_title',
        'og_description',
        'og_image',
        'twitter_title',
        'twitter_description',
        'twitter_image',
        'schema_type',
        'custom_schema_json',
        'robots_index',
        'sitemap_priority',
    ];

    protected function casts(): array
    {
        return [
            'custom_schema_json' => 'array',
            'robots_index' => 'boolean',
            'sitemap_priority' => 'decimal:1',
        ];
    }
}
