29 lines
649 B
PHP
29 lines
649 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class NotificationDetails extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = "notification_details";
|
|
protected $fillable = [
|
|
'id',
|
|
'principal_xid', 'type', 'description', 'image', 'date_added','is_schedule','delivery_schedule','is_active', 'user_type', 'state_ids'
|
|
];
|
|
|
|
protected $guarded = [];
|
|
|
|
public function Notification()
|
|
{
|
|
return $this->belongsTo(IamPrincipal::class, 'principal_xid', 'id');
|
|
}
|
|
|
|
protected $casts = [
|
|
'state_ids' => 'array',
|
|
];
|
|
|
|
}
|