<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\IncotermRepository") */class Incoterm
{
/**
* @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id;
/**
* @ORM\Column(type="string", length=255) */ private $name;
/**
* @ORM\Column(type="datetime", nullable=true) */ private $created_at;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Appariement", mappedBy="base") */ private $appariements;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AdminDonneurOrdre", mappedBy="base") */ private $adminDonneurOrdres;
/**
* @ORM\OneToMany(targetEntity="App\Entity\AppelDeMarge", mappedBy="base") */ private $appelDeMarges;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Operation", mappedBy="base") */ private $operations;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Quotation", mappedBy="incoterm") */ private $quotaions;
/**
* @ORM\Column(type="text", nullable=true) */ private $description;
public function __construct(){
$this->created_at = new \DateTime('now');
$this->appariements = new ArrayCollection();
$this->adminDonneurOrdres = new ArrayCollection();
$this->appelDeMarges = new ArrayCollection();
$this->operations = new ArrayCollection();
$this->quotaions = new ArrayCollection();
} public function getId(): ?int
{
return $this->id;
} public function getName(): ?string
{
return $this->name;
} public function setName(string $name): self
{
$this->name = $name;
return $this;
} public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
} public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
} /**
* @return Collection|Appariement[] */ public function getAppariements(): Collection
{
return $this->appariements;
} public function addAppariement(Appariement $appariement): self
{
if (!$this->appariements->contains($appariement)) {
$this->appariements[] = $appariement;
$appariement->setBase($this);
} return $this;
} public function removeAppariement(Appariement $appariement): self
{
if ($this->appariements->contains($appariement)) {
$this->appariements->removeElement($appariement);
// set the owning side to null (unless already changed)
if ($appariement->getBase() === $this) {
$appariement->setBase(null);
} } return $this;
} /**
* @return Collection|Quotation[] */ public function getQuotations(): Collection {
return $this->quotaions;
} public function addQuotation(Quotation $quotation): self{
if (!$this->quotaions->contains($quotation)) {
$this->quotaions[] = $quotation;
$quotation->setIncoterm($this);
} return $this;
} public function removeQuotation(Quotation $quotation): self{
if ($this->quotaions->contains($quotation)) {
$this->quotaions->removeElement($quotation);
// set the owning side to null (unless already changed)
if ($quotation->getIncoterm() === $this) {
$quotation->setIncoterm(null);
} } return $this;
} /**
* @return Collection|AdminDonneurOrdre[] */ public function getAdminDonneurOrdres(): Collection
{
return $this->adminDonneurOrdres;
} public function addAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
{
if (!$this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
$this->adminDonneurOrdres[] = $adminDonneurOrdre;
$adminDonneurOrdre->setBase($this);
} return $this;
} public function removeAdminDonneurOrdre(AdminDonneurOrdre $adminDonneurOrdre): self
{
if ($this->adminDonneurOrdres->contains($adminDonneurOrdre)) {
$this->adminDonneurOrdres->removeElement($adminDonneurOrdre);
// set the owning side to null (unless already changed)
if ($adminDonneurOrdre->getBase() === $this) {
$adminDonneurOrdre->setBase(null);
} } return $this;
} public function __toString(): string
{
return $this->name;
} /**
* @return Collection|AppelDeMarge[] */ public function getAppelDeMarges(): Collection
{
return $this->appelDeMarges;
} public function addAppelDeMarge(AppelDeMarge $appelDeMarge): self
{
if (!$this->appelDeMarges->contains($appelDeMarge)) {
$this->appelDeMarges[] = $appelDeMarge;
$appelDeMarge->setBase($this);
} return $this;
} public function removeAppelDeMarge(AppelDeMarge $appelDeMarge): self
{
if ($this->appelDeMarges->contains($appelDeMarge)) {
$this->appelDeMarges->removeElement($appelDeMarge);
// set the owning side to null (unless already changed)
if ($appelDeMarge->getBase() === $this) {
$appelDeMarge->setBase(null);
} } return $this;
} /**
* @return Collection|Operation[] */ public function getOperations(): Collection
{
return $this->operations;
} public function addOperation(Operation $operation): self
{
if (!$this->operations->contains($operation)) {
$this->operations[] = $operation;
$operation->setBase($this);
} return $this;
} public function removeOperation(Operation $operation): self
{
if ($this->operations->contains($operation)) {
$this->operations->removeElement($operation);
// set the owning side to null (unless already changed)
if ($operation->getBase() === $this) {
$operation->setBase(null);
} } return $this;
} public function getDescription(): ?string
{
return $this->description;
} public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}}