2019-01-15 14:17:15 +01:00
|
|
|
<?php
|
|
|
|
|
|
2025-11-12 16:35:16 +01:00
|
|
|
namespace App\Models;
|
2019-01-15 14:17:15 +01:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Notification extends Model
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $table = 'notification';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $primaryKey = 'notif_id';
|
|
|
|
|
|
|
|
|
|
/**
|
2025-04-03 09:30:16 +02:00
|
|
|
* @var boolean
|
2019-01-15 14:17:15 +01:00
|
|
|
*/
|
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
2025-08-05 14:47:02 +02:00
|
|
|
protected $fillable = ['notif_name', 'notif_email', 'notif_campId'];
|
|
|
|
|
|
2019-01-15 14:17:15 +01:00
|
|
|
/**
|
|
|
|
|
* ManyToOne
|
|
|
|
|
* Notification -> Campagne
|
|
|
|
|
*/
|
|
|
|
|
public function campagne()
|
|
|
|
|
{
|
2025-11-12 16:35:16 +01:00
|
|
|
return $this->belongsTo('App\Models\Campagne', 'notif_campId');
|
2019-01-15 14:17:15 +01:00
|
|
|
}
|
|
|
|
|
}
|