diff --git a/application/models/job.php b/application/models/job.php index b41f906..c1dd4cb 100644 --- a/application/models/job.php +++ b/application/models/job.php @@ -5,6 +5,25 @@ */ class Job extends CI_Model { + /** + * Create a new job. + * + * @param array $data the data of the new job + * @return bool was the insert successful + */ + public function create($data) { + return $this->db->insert('jobs', $data); + } + + /** + * Delete a job. + * @param string the job id to delete + * @return bool was the deletion successful + */ + public function delete($job_id) { + return $this->db->delete('jobs', array('id' => $job_id)); + } + /** * Update the progress of a given job. *