27 lines
569 B
PHP
27 lines
569 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class AppNotificationRecipient extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'app_notification_recipients';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'notification_id',
|
||
|
|
'customer_id',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function notification(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(AppNotification::class, 'notification_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function customer(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Customer::class, 'customer_id');
|
||
|
|
}
|
||
|
|
}
|