37 lines
684 B
PHP
37 lines
684 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TenantNotificationReceipt extends Model
|
|
{
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'notification_log_id',
|
|
'user_id',
|
|
'recipient',
|
|
'status',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
|
|
public function tenant()
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
|
|
public function notificationLog()
|
|
{
|
|
return $this->belongsTo(TenantNotificationLog::class, 'notification_log_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|