'ID', 'id_ticket' => 'Ticket', 'id_user' => 'Utilisateur', 'message' => 'Message', 'created_at' => 'Date de création', ]; } /* * Relations */ public function getUser() { return $this->hasOne(User::class, ['id' => 'id_user']); } public function getTicket() { return $this->hasOne(Ticket::class, ['id' => 'id_ticket']); } public function populateUser(User $user): void { $this->populateFieldObject('id_user', 'user', $user); } public function populateTicket(Ticket $ticket): void { $this->populateFieldObject('id_ticket', 'ticket', $ticket); } }