<?php

namespace App\Modules\Frontend\Models;

use CodeIgniter\Model;

class TourModel extends Model
{
    protected $table            = 'tours';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';
    protected $useSoftDeletes   = false;
    protected $allowedFields    = [
        'title',
        'slug',
        'description',
        'route',
        'duration_days',
        'difficulty',
        'price_usd',
        'images',
        'is_active',
        'meta_title',
        'meta_desc'
    ];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    // No validation rules here — we'll handle validation in controller safely
}