← Back
Editing: HistoriqueAlerte.php
<?php namespace App\Entity; use App\Repository\HistoriqueAlerteRepository; use Doctrine\ORM\Mapping as ORM; /** * HistoriqueAlerte. */ #[ORM\Table(name: 'historique_alerte')] #[ORM\Index(columns: ['agency_id'], name: 'agency_id')] #[ORM\Index(columns: ['controle_id'], name: 'controle_id')] #[ORM\Index(columns: ['prestataire_id'], name: 'prestataire_id')] #[ORM\Entity(repositoryClass: HistoriqueAlerteRepository::class)] class HistoriqueAlerte { #[ORM\Id] #[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private ?int $id = null; #[ORM\Column(name: 'date', type: 'datetime', nullable: false)] private \DateTimeInterface $date; #[ORM\JoinColumn(onDelete: 'CASCADE')] #[ORM\ManyToOne(targetEntity: 'Controle', inversedBy: 'alertes')] private ?Controle $controle = null; #[ORM\JoinColumn(name: 'agency_id', referencedColumnName: 'id', onDelete: 'CASCADE')] #[ORM\ManyToOne(targetEntity: 'Agency')] private Agency $agency; #[ORM\JoinColumn(name: 'prestataire_id', referencedColumnName: 'id', onDelete: 'CASCADE')] #[ORM\ManyToOne(targetEntity: 'AgencyPrestataire', inversedBy: 'historiqueAlertes')] private ?AgencyPrestataire $prestataire = null; public function __construct() { $this->date = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getControle(): ?Controle { return $this->controle; } public function setControle(?Controle $controle): self { $this->controle = $controle; return $this; } public function getAgency(): ?Agency { return $this->agency; } public function setAgency(Agency $agency): self { $this->agency = $agency; return $this; } public function getPrestataire(): ?AgencyPrestataire { return $this->prestataire; } public function setPrestataire(?AgencyPrestataire $prestataire): self { $this->prestataire = $prestataire; return $this; } }
Save File
Cancel