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
+25 -3
View File
@@ -2,11 +2,15 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class FamilyGuardian extends Model
class FamilyGuardian extends BaseModel
{
protected $table = 'family_guardians';
// CI model didn't specify timestamps
public $timestamps = true;
protected $fillable = [
'family_id',
'user_id',
@@ -18,5 +22,23 @@ class FamilyGuardian extends Model
'created_at',
'updated_at',
];
public $timestamps = true;
protected $casts = [
'family_id' => 'integer',
'user_id' => 'integer',
'is_primary' => 'boolean',
'receive_emails' => 'boolean',
'receive_sms' => 'boolean',
];
// Optional relationships
public function family()
{
return $this->belongsTo(Family::class, 'family_id');
}
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
}