e13df69885
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
33 lines
790 B
PHP
33 lines
790 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class FamilyGuardian extends BaseModel
|
|
{
|
|
protected $table = 'family_guardians';
|
|
|
|
// legacy model didn't specify timestamps
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = ['family_id', 'user_id', 'relation', 'is_primary', 'receive_emails', 'receive_sms', 'custody_notes', 'created_at', 'updated_at'];
|
|
|
|
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');
|
|
}
|
|
}
|