← Back
Editing: AgentFrequency.php
<?php namespace App\Entity; use App\Repository\AgentFrequencyRepository; use App\Solution\Annotation\SolutionAware; use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping\UniqueConstraint; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @SolutionAware(solutionFieldName="solution_id") */ #[ORM\Table] #[UniqueConstraint(name: 'frequency_idx', columns: ['agent_id', 'solution_id'])] #[ORM\Entity(repositoryClass: AgentFrequencyRepository::class)] #[UniqueEntity(fields: ['agent', 'solution'])] class AgentFrequency { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private ?int $id = null; #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'agentFrequencies')] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private ?User $agent = null; #[ORM\ManyToOne(targetEntity: Solution::class, inversedBy: 'agentFrequencies')] #[ORM\JoinColumn(nullable: false)] private ?Solution $solution = null; #[ORM\ManyToOne(targetEntity: Periode::class)] #[ORM\JoinColumn(nullable: false)] private ?Periode $frequencyPeriod = null; #[ORM\Column(type: 'integer')] private ?int $frequencyValue = null; public function getId(): ?int { return $this->id; } public function getAgent(): ?User { return $this->agent; } public function setAgent(?User $agent): self { $this->agent = $agent; return $this; } public function getSolution(): ?Solution { return $this->solution; } public function setSolution(?Solution $solution): self { $this->solution = $solution; return $this; } public function getFrequencyPeriod(): ?Periode { return $this->frequencyPeriod; } public function setFrequencyPeriod(?Periode $frequencyPeriod): self { $this->frequencyPeriod = $frequencyPeriod; return $this; } public function getFrequencyValue(): ?int { return $this->frequencyValue; } public function setFrequencyValue(int $frequencyValue): self { $this->frequencyValue = $frequencyValue; return $this; } }
Save File
Cancel