<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\OperationDeCourtageRepository")
*/
class OperationDeCourtage
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ref;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $sous_jacent;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $donnrut_d_ordre;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $date_livraison;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $destination;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $terme;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mode_de_transport;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $volume;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $unite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $statut;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $date_op;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\AdminDonneurOrdre", inversedBy="donneurOperation")
*/
private $donneur;
public function __construct(){
$this->createdAt = new \DateTime('now');
if (!isset($this->ref)){
$this->ref = 'OP'.random_int(1,99).date('s');
}else{
$this->ref = 'OP'.random_int(1,99).date('s');
}
}
public function getId(): ?int
{
return $this->id;
}
public function getDateOp():?\DateTimeInterface
{
return $this->date_op;
}
public function setDateOp(\DateTimeInterface $date_op): self
{
$this->date_op = $date_op;
return $this;
}
public function getRef(): ?string
{
return $this->ref;
}
public function setRef(string $ref): self
{
$this->ref = $ref;
return $this;
}
public function getSousJacent(): ?string
{
return $this->sous_jacent;
}
public function setSousJacent(string $sous_jacent): self
{
$this->sous_jacent = $sous_jacent;
return $this;
}
public function getDonnrutDOrdre(): ?string
{
return $this->donnrut_d_ordre;
}
public function setDonnrutDOrdre(string $donnrut_d_ordre): self
{
$this->donnrut_d_ordre = $donnrut_d_ordre;
return $this;
}
public function getDateLivraison(): ?string
{
return $this->date_livraison;
}
public function setDateLivraison(string $date_livraison): self
{
$this->date_livraison = $date_livraison;
return $this;
}
public function getDestination(): ?string
{
return $this->destination;
}
public function setDestination(string $destination): self
{
$this->destination = $destination;
return $this;
}
public function getTerme(): ?string
{
return $this->terme;
}
public function setTerme(string $terme): self
{
$this->terme = $terme;
return $this;
}
public function getModeDeTransport(): ?string
{
return $this->mode_de_transport;
}
public function setModeDeTransport(?string $mode_de_transport): self
{
$this->mode_de_transport = $mode_de_transport;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getVolume(): ?string
{
return $this->volume;
}
public function setVolume(?string $volume):self
{
$this->volume = $volume;
return $this;
}
public function getUnite(): ?string
{
return $this->unite;
}
public function setUnite(?string $unite):self
{
$this->unite = $unite;
return $this;
}
public function getDonneur(): ?AdminDonneurOrdre
{
return $this->donneur;
}
public function setDonneur(?AdminDonneurOrdre $donneur): self
{
$this->donneur = $donneur;
return $this;
}
public function __toString()
{
return $this->donneur;
}
}