<?php

namespace App\Models;

use CodeIgniter\Model;

class CounselingTicketModel extends Model
{
    protected $table            = 'counseling_tickets';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';
    protected $protectFields    = true;
    protected $allowedFields    = [
        'student_id',
        'academic_period_id',
        'student_name_fallback',
        'assigned_teacher_id',
        'subject',
        'category',
        'type',
        'status',
        'is_anonymous',
        'internal_notes',
        'created_at',
        'updated_at'
    ];

    // Dates
    protected $useTimestamps = true;
    protected $dateFormat    = 'datetime';
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
}
