Voici votre URL de partage https://sharemycode.io/c/7ef4ab5 (Cliquer pour copier) (Copié)
Nom du fichier : Entité Derogation
<?php
namespace App\Entity;
use App\Repository\DerogationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DerogationRepository::class)]
class Derogation
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#by default : creation Date is the Current time !
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, options: ['default' => 'CURRENT_TIMESTAMP'])]
private ?\DateTimeInterface $creationDate = null;
#[ORM\ManyToOne(inversedBy: 'derogationAsUser')]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\ManyToOne(inversedBy: 'derogationAsClaimant')]
#[ORM\JoinColumn(nullable: false)]
private ?User $claimant = null;
#[ORM\ManyToOne(inversedBy: 'derogationAsApprover')]
private ?User $approver = null;
#[ORM\ManyToMany(targetEntity: Company::class, inversedBy: 'derogationForClient')]
private Collection $client;
#[ORM\ManyToMany(targetEntity: Company::class)]
private Collection $concernedCompanies;
#[ORM\ManyToOne]
private ?RequestType $requestType = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $worksiteRef = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $startDate = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $endDate = null;
#[ORM\Column(length: 2)]
private ?string $idSoc = null;
#[ORM\Column(nullable: true)]
private ?int $expenseBudget = null;
#[ORM\ManyToOne(cascade: ['persist', 'remove'])]
private ?Reason $reason = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comment = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dispatchDate = null;
#[ORM\Column(nullable: true)]
private ?bool $isExcluededFromBackmargins = null;
#[ORM\ManyToOne]
private ?Family $family = null;
#[ORM\Column(nullable: true)]
private ?int $additionalDiscountEuros = null;
#[ORM\Column(nullable: true)]
private ?int $additionalDiscountPercent = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $products = null;
#[ORM\Column(nullable: true)]
private ?int $potentialRevenues = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $potentialAdditionalAmount = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $commentOnRejection = null;
#[ORM\Column]
private ?int $derogationStatus = null;
#[ORM\Column(nullable: true)]
private ?bool $needsValidation = null;
public function __construct()
{
$this->client = new ArrayCollection();
$this->concernedCompanies = new ArrayCollection();
$this->creationDate = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreationDate(): ?\DateTimeInterface
{
return $this->creationDate;
}
public function setCreationDate(\DateTimeInterface $creationDate): self
{
$this->creationDate = $creationDate;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getClaimant(): ?User
{
return $this->claimant;
}
public function setClaimant(?User $claimant): self
{
$this->claimant = $claimant;
return $this;
}
public function getApprover(): ?User
{
return $this->approver;
}
public function setApprover(?User $approver): self
{
$this->approver = $approver;
return $this;
}
public function getRequestType(): ?RequestType
{
return $this->requestType;
}
public function setRequestType(?RequestType $requestType): self
{
$this->requestType = $requestType;
return $this;
}
/**
* @return Collection<int, Company>
*/
public function getClient(): Collection
{
return $this->client;
}
public function addClient(Company $client): self
{
if (!$this->client->contains($client)) {
$this->client->add($client);
}
return $this;
}
public function removeClient(Company $client): self
{
$this->client->removeElement($client);
return $this;
}
public function getWorksiteRef(): ?string
{
return $this->worksiteRef;
}
public function setWorksiteRef(?string $worksiteRef): self
{
$this->worksiteRef = $worksiteRef;
return $this;
}
/**
* @return Collection<int, Company>
*/
public function getConcernedCompanies(): Collection
{
return $this->concernedCompanies;
}
public function addConcernedCompany(Company $concernedCompany): self
{
if (!$this->concernedCompanies->contains($concernedCompany)) {
$this->concernedCompanies->add($concernedCompany);
}
return $this;
}
public function removeConcernedCompany(Company $concernedCompany): self
{
$this->concernedCompanies->removeElement($concernedCompany);
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getIdSoc(): ?string
{
return $this->idSoc;
}
public function setIdSoc(string $idSoc): self
{
$this->idSoc = $idSoc;
return $this;
}
public function getExpenseBudget(): ?int
{
return $this->expenseBudget;
}
public function setExpenseBudget(?int $expenseBudget): self
{
$this->expenseBudget = $expenseBudget;
return $this;
}
public function getReason(): ?Reason
{
return $this->reason;
}
public function setReason(?Reason $reason): self
{
$this->reason = $reason;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getDispatchDate(): ?\DateTimeInterface
{
return $this->dispatchDate;
}
public function setDispatchDate(?\DateTimeInterface $dispatchDate): self
{
$this->dispatchDate = $dispatchDate;
return $this;
}
public function isIsExcluededFromBackmargins(): ?bool
{
return $this->isExcluededFromBackmargins;
}
public function setIsExcluededFromBackmargins(?bool $isExcluededFromBackmargins): self
{
$this->isExcluededFromBackmargins = $isExcluededFromBackmargins;
return $this;
}
public function getFamily(): ?Family
{
return $this->family;
}
public function setFamily(?Family $family): self
{
$this->family = $family;
return $this;
}
public function getAdditionalDiscountEuros(): ?int
{
return $this->additionalDiscountEuros;
}
public function setAdditionalDiscountEuros(?int $additionalDiscountEuros): self
{
$this->additionalDiscountEuros = $additionalDiscountEuros;
return $this;
}
public function getAdditionalDiscountPercent(): ?int
{
return $this->additionalDiscountPercent;
}
public function setAdditionalDiscountPercent(?int $additionalDiscountPercent): self
{
$this->additionalDiscountPercent = $additionalDiscountPercent;
return $this;
}
public function getProducts(): ?string
{
return $this->products;
}
public function setProducts(?string $products): self
{
$this->products = $products;
return $this;
}
public function getPotentialRevenues(): ?int
{
return $this->potentialRevenues;
}
public function setPotentialRevenues(?int $potentialRevenues): self
{
$this->potentialRevenues = $potentialRevenues;
return $this;
}
public function getPotentialAdditionalAmount(): ?string
{
return $this->potentialAdditionalAmount;
}
public function setPotentialAdditionalAmount(?string $potentialAdditionalAmount): self
{
$this->potentialAdditionalAmount = $potentialAdditionalAmount;
return $this;
}
public function getCommentOnRejection(): ?string
{
return $this->commentOnRejection;
}
public function setCommentOnRejection(?string $commentOnRejection): self
{
$this->commentOnRejection = $commentOnRejection;
return $this;
}
public function getDerogationStatus(): ?int
{
return $this->derogationStatus;
}
public function setDerogationStatus(int $derogationStatus): self
{
$this->derogationStatus = $derogationStatus;
return $this;
}
public function isNeedsValidation(): ?bool
{
return $this->needsValidation;
}
public function setNeedsValidation(bool $needsValidation): self
{
$this->needsValidation = $needsValidation;
return $this;
}
}
Informations
Cet extrait a été créé le 25 mai 2023 à 13:51:08
Cet extrait expire le 24 juin 2023 à 13:51:08
Langage : php
Link
Voici votre URL de partage : https://sharemycode.io/c/7ef4ab5 Copié
Demander la suppression