recreate project
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class AttendanceCommentTemplateModel extends Model
|
||||
{
|
||||
protected $table = 'attendance_comment_template';
|
||||
protected $primaryKey = 'id';
|
||||
protected $returnType = 'array';
|
||||
protected $useTimestamps = false;
|
||||
protected $allowedFields = [
|
||||
'min_score',
|
||||
'max_score',
|
||||
'template_text',
|
||||
'is_active',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function getActiveTemplates(): array
|
||||
{
|
||||
return $this->where('is_active', 1)
|
||||
->orderBy('min_score', 'DESC')
|
||||
->findAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user