recreate project

This commit is contained in:
root
2026-02-10 22:11:06 -05:00
commit 663c0cdbda
10149 changed files with 1379710 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class ClassModel extends Model
{
protected $table = 'classes'; // The table name
protected $primaryKey = 'id'; // The correct primary key for the classes table
protected $allowedFields = [
'class_name',
'schedule',
'capacity'
]; // Fields that are allowed to be manipulated
protected $useTimestamps = false;
public function getAllClasses()
{
return $this->findAll();
}
public function getClassById($id)
{
return $this->find($id);
}
public function createClass($data)
{
return $this->insert($data);
}
public function updateClass($id, $data)
{
return $this->update($id, $data);
}
public function deleteClass($id)
{
return $this->delete($id);
}
}
?>