reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
+30 -3
View File
@@ -2,11 +2,15 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class PrintRequest extends Model
class PrintRequest extends BaseModel
{
protected $table = 'print_requests';
// ✅ CI: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
protected $fillable = [
'teacher_id',
'admin_id',
@@ -20,5 +24,28 @@ class PrintRequest extends Model
'created_at',
'updated_at',
];
public $timestamps = true;
protected $casts = [
'teacher_id' => 'integer',
'admin_id' => 'integer',
'class_id' => 'integer',
'num_copies' => 'integer',
'required_by' => 'datetime', // if stored as DATETIME
];
/* Optional relationships */
public function teacher()
{
return $this->belongsTo(User::class, 'teacher_id');
}
public function admin()
{
return $this->belongsTo(User::class, 'admin_id');
}
public function schoolClass()
{
return $this->belongsTo(SchoolClass::class, 'class_id');
}
}