add open position system
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m29s

This commit is contained in:
root
2026-09-02 00:53:55 -04:00
parent 5b11e2d859
commit dbfd72c2f9
24 changed files with 1627 additions and 47 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class JobPositionModel extends Model
{
protected $table = 'job_positions';
protected $primaryKey = 'position_id';
protected $useAutoIncrement = false;
protected $returnType = 'array';
protected $allowedFields = [
'position_id',
'template_id',
'title',
'description',
'department',
'location',
'employment_type',
'requirements',
'status',
'posted_by',
'created_at',
'updated_at',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
public function openPositions(): array
{
return $this->where('status', 'open')->orderBy('created_at', 'DESC')->findAll();
}
}