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
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class ApplicationModel extends Model
{
protected $table = 'applications';
protected $primaryKey = 'application_id';
protected $useAutoIncrement = false;
protected $returnType = 'array';
protected $allowedFields = [
'application_id',
'position_id',
'first_name',
'last_name',
'email',
'phone',
'resume_file_url',
'status',
'admin_notes',
'submitted_at',
];
protected $useTimestamps = false;
}
+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();
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class JobTemplateModel extends Model
{
protected $table = 'job_templates';
protected $primaryKey = 'template_id';
protected $useAutoIncrement = false;
protected $returnType = 'array';
protected $allowedFields = [
'template_id',
'title',
'description',
'department',
'location',
'employment_type',
'requirements',
'version',
'is_active',
'created_by',
'created_at',
'updated_at',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class JobTemplateVersionModel extends Model
{
protected $table = 'job_template_versions';
protected $primaryKey = 'version_id';
protected $useAutoIncrement = false;
protected $returnType = 'array';
protected $allowedFields = [
'version_id',
'template_id',
'version',
'title',
'description',
'department',
'location',
'employment_type',
'requirements',
'saved_by',
'saved_at',
];
protected $useTimestamps = false;
}