ajout de la fonctionnalité login et modification profil
This commit is contained in:
+36
-1
@@ -6,5 +6,40 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Activite extends Model
|
||||
{
|
||||
//
|
||||
protected $primaryKey = 'ID_Instance';
|
||||
protected $table = 'activites';
|
||||
public $incrementing = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'DateDebut',
|
||||
'DateFin',
|
||||
'ID_Utilisateur_Hote',
|
||||
'ID_Ressource',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'DateDebut' => 'datetime',
|
||||
'DateFin' => 'datetime',
|
||||
];
|
||||
|
||||
public function hote()
|
||||
{
|
||||
return $this->belongsTo(Utilisateur::class, 'ID_Utilisateur_Hote', 'ID_Utilisateur');
|
||||
}
|
||||
|
||||
public function ressource()
|
||||
{
|
||||
return $this->belongsTo(Ressource::class, 'ID_Ressource', 'ID_Ressource');
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return $this->hasMany(ActiviteMessage::class, 'ID_Instance', 'ID_Instance');
|
||||
}
|
||||
|
||||
public function participants()
|
||||
{
|
||||
return $this->belongsToMany(Utilisateur::class, 'activite_participants', 'ID_Instance', 'ID_Utilisateur_Participant', 'ID_Instance', 'ID_Utilisateur');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user