<?php

namespace App\Models;

use CodeIgniter\Model;

class CompetitionModel extends Model
{
    protected $table          = 'competitions';
    protected $primaryKey     = 'id';
    protected $useSoftDeletes = true;

    protected $allowedFields = [
        'title',
        'semester',
        'school_year',
        'class_section_id',
        'start_date',
        'end_date',
        'winners_count',
        'prize_per_point',
        'is_published',
        'published_at',
        'is_locked',
        'locked_at',
        'locked_by',
        'created_by',
    ];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
    protected $deletedField  = 'deleted_at';
}
