Files
root 716cc8b8d3
Tests / PHPUnit (push) Failing after 1m20s
fix school year for all tables
2026-07-18 14:45:38 -04:00

42 lines
932 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
use App\Models\Concerns\SchoolYearAutoFillTrait;
class CompetitionModel extends Model
{
use SchoolYearAutoFillTrait;
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 $validationRules = [
'school_year' => 'required|string|max_length[9]',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
}