<?php

declare(strict_types=1);

namespace App\Models;

use App\Models\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ShowcaseSite extends Model
{
    use BelongsToTenant;
    use HasUuids;
    use SoftDeletes;

    protected $fillable = [
        'tenant_id', 'slug', 'title', 'description', 'url', 'thumbnail_url',
        'gallery', 'industry', 'used_theme', 'used_blocks', 'tech_stack',
        'company_name', 'launch_date', 'view_count', 'like_count', 'status',
    ];

    protected function casts(): array
    {
        return [
            'gallery' => 'array',
            'used_blocks' => 'array',
            'tech_stack' => 'array',
            'launch_date' => 'date',
            'view_count' => 'integer',
            'like_count' => 'integer',
        ];
    }
}
