reconstruction of the project
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class FamilyCommPref extends Model
|
||||
class FamilyCommPref extends BaseModel
|
||||
{
|
||||
protected $table = 'family_comm_prefs';
|
||||
|
||||
// CI model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'family_id',
|
||||
'category',
|
||||
@@ -16,5 +20,17 @@ class FamilyCommPref extends Model
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
public $timestamps = true;
|
||||
|
||||
protected $casts = [
|
||||
'family_id' => 'integer',
|
||||
'via_email' => 'boolean',
|
||||
'via_sms' => 'boolean',
|
||||
'cc_all_guardians' => 'boolean',
|
||||
];
|
||||
|
||||
// Optional relationship
|
||||
public function family()
|
||||
{
|
||||
return $this->belongsTo(Family::class, 'family_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user