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
+36 -3
View File
@@ -2,11 +2,16 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class CurrentFlag extends Model
class CurrentFlag extends BaseModel
{
protected $table = 'current_flag';
// CI model didn't specify timestamps. Since the table has created_at/updated_at columns,
// you can enable auto-management. If your table does NOT actually have them, set false.
public $timestamps = true;
protected $fillable = [
'student_id',
'student_name',
@@ -26,5 +31,33 @@ class CurrentFlag extends Model
'created_at',
'updated_at',
];
public $timestamps = true;
protected $casts = [
'student_id' => 'integer',
'updated_by_open' => 'integer',
'updated_by_closed' => 'integer',
'updated_by_canceled'=> 'integer',
'flag_datetime' => 'datetime',
];
/* Optional relationships */
public function student()
{
return $this->belongsTo(Student::class, 'student_id');
}
public function openedBy()
{
return $this->belongsTo(User::class, 'updated_by_open');
}
public function closedBy()
{
return $this->belongsTo(User::class, 'updated_by_closed');
}
public function canceledBy()
{
return $this->belongsTo(User::class, 'updated_by_canceled');
}
}