<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\ContractProduct;
use App\Entity\RDV;
/**
* Contrat client
*
* @ORM\Table(name="contract")
* @ORM\Entity
*/
class Contract
{
const TYPE_COIFFURE = 'coiffure';
const TYPE_ESTHETIQUE = 'esthetique';
const TYPE_RDV_PERIODIQUE = 'periodique';
const TYPE_RDV_FAMILLE = 'famille';
const TYPE_RDV_RESIDENT = 'resident';
const RECURRENCE_1_SUR_2 = 0;
const RECURRENCE_1_SUR_3 = 1;
const RECURRENCE_1_SUR_4 = 2;
const RECURRENCE_1_SUR_8 = 3;
const RECURRENCE_1_SUR_12 = 4;
const RECURRENCE_1_SUR_5 = 5;
const RECURRENCE_1_SUR_6 = 6;
const RECURRENCE_1_SUR_2_MONTH = 7; // 2 mois
const RECURRENCE_1_SUR_TRIM = 8;
const RECURRENCE_1_SUR_6_MONTH = 9;
const RECURRENCE_1_SUR_SEMAINE = 10;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string|null
*
* @ORM\Column(name="date_debut_relation", type="string", nullable=true)
*/
private $dateDebutRelation;
/**
* @var string|null
*
* @ORM\Column(name="date_fin_relation", type="string", nullable=true)
*/
private $dateFinRelation;
/**
* @var string|null
*
* @ORM\Column(name="date_debut", type="string", nullable=true)
*/
private $dateDebut;
/**
* @var string|null
*
* @ORM\Column(name="date_fin", type="string", nullable=true)
*/
private $dateFin;
/**
* @var string|null
*
* @ORM\Column(name="type_prestation", type="string", nullable=true)
*/
private $typePrestation;
/**
* @var string|null
*
* @ORM\Column(name="type_rdv", type="string", nullable=true)
*/
private $typeRDV;
/**
* @var string|null
*
* @ORM\Column(name="libelle_prestation", type="string", nullable=true)
*/
private $libellePrestation;
/**
* @var string|null
*
* @ORM\Column(name="recurrence", type="string", nullable=true)
*/
private $recurrence;
/**
* @var string|null
*
* @ORM\Column(name="variable", type="string", nullable=true)
*/
private $variable;
/**
* @var string|null
*
* @ORM\Column(name="horaires", type="text", nullable=true)
*/
private $horaires;
/**
* @var string|null
*
* @ORM\Column(name="remarque", type="text", nullable=true)
*/
private $remarque;
/**
* @var string|null
*
* @ORM\Column(name="recurrence_generated", type="boolean")
*/
private $recurrenceGenerated = false;
// produit
/**
* @var ContractProduct ArrayCollection
* @ORM\OneToMany(targetEntity=ContractProduct::class, mappedBy="contract")
*/
protected $contractProducts;
/**
* @var \App\Entity\RDV[] ArrayCollection
* @ORM\OneToMany(targetEntity=RDV::class, mappedBy="contract")
*/
protected $rdvs;
/**
* @var Contact
*
* @ORM\ManyToOne(targetEntity="Client")
* @ORM\JoinColumn(name="client_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $client;
/**
* @var string|null
* @ORM\Column(name="priorite", type="string", nullable=true)
*/
private $priorite = null;
/**
* @var string|null
* @ORM\Column(name="foumulaireReservation", type="boolean", nullable=true)
*/
private $foumulaireReservation;
/**
* @var string|null
*
* @ORM\Column(name="heure", type="text", nullable=true)
*/
private $heure;
public function __construct()
{
$this->recurrenceGenerated = false;
$this->contractProducts = new ArrayCollection();
$this->rdvs = new ArrayCollection();
}
public function __toString()
{
return (string) $this->id;
}
// pdf
public function getId(): ?int
{
return $this->id;
}
/**
* @return string|null
*/
public function getDateDebutRelation(): ?string
{
return $this->dateDebutRelation;
}
/**
* @param string|null $dateDebutRelation
*/
public function setDateDebutRelation(?string $dateDebutRelation): void
{
$this->dateDebutRelation = $dateDebutRelation;
}
/**
* @return string|null
*/
public function getDateFinRelation(): ?string
{
return $this->dateFinRelation;
}
/**
* @param string|null $dateFinRelation
*/
public function setDateFinRelation(?string $dateFinRelation): void
{
$this->dateFinRelation = $dateFinRelation;
}
/**
* @return string|null
*/
public function getDateDebut(): ?string
{
return $this->dateDebut;
}
/**
* @param string|null $dateDebut
*/
public function setDateDebut(?string $dateDebut): void
{
$this->dateDebut = $dateDebut;
}
/**
* @return string|null
*/
public function getDateFin(): ?string
{
return $this->dateFin;
}
/**
* @param string|null $dateFin
*/
public function setDateFin(?string $dateFin): void
{
$this->dateFin = $dateFin;
}
/**
* @return string|null
*/
public function getTypePrestation(): ?string
{
return $this->typePrestation;
}
/**
* @param string|null $typePrestation
*/
public function setTypePrestation(?string $typePrestation): void
{
$this->typePrestation = $typePrestation;
}
/**
* @return string|null
*/
public function getLibellePrestation(): ?string
{
return $this->libellePrestation;
}
/**
* @param string|null $libellePrestation
*/
public function setLibellePrestation(?string $libellePrestation): void
{
$this->libellePrestation = $libellePrestation;
}
/**
* @return string|null
*/
public function getTypeRDV(): ?string
{
return $this->typeRDV;
}
/**
* @param string|null $typeRDV
*/
public function setTypeRDV(?string $typeRDV): void
{
$this->typeRDV = $typeRDV;
}
/**
* @return string|null
*/
public function getRecurrence(): ?string
{
return $this->recurrence;
}
/**
* @param string|null $recurrence
*/
public function setRecurrence(?string $recurrence): void
{
$this->recurrence = $recurrence;
}
/**
* @return string|null
*/
public function getVariable(): ?string
{
return $this->variable;
}
/**
* @param string|null $variable
*/
public function setVariable(?string $variable): void
{
$this->variable = $variable;
}
/**
* @return Contact
*/
public function getClient(): ?Client
{
return $this->client;
}
/**
* @param Contact $client
*/
public function setClient(Client $client): void
{
$this->client = $client;
}
/**
* @return string|null
*/
public function getRecurrenceGenerated(): ?bool
{
return $this->recurrenceGenerated;
}
/**
* @param string|null $recurrenceGenerated
*/
public function setRecurrenceGenerated(?string $recurrenceGenerated): void
{
$this->recurrenceGenerated = $recurrenceGenerated;
}
/**
* @return string|null
*/
public function getHoraires(): ?string
{
return $this->horaires;
}
/**
* @param string|null $horaires
*/
public function setHoraires(?string $horaires): void
{
$this->horaires = $horaires;
}
/**
* @return \App\Entity\ContractProduct
*/
public function getContractProducts()
{
return $this->contractProducts;
}
/**
* @param \App\Entity\ContractProduct $contractProducts
*/
public function setContractProducts(ContractProduct $contractProducts): void
{
$this->contractProducts = $contractProducts;
}
/**
* @return RDVProduct
*/
public function getRdvs(): Collection
{
return $this->rdvs;
}
/**
* @param RDVProduct $rdvs
*/
public function setRdvs(RDVProduct $rdvs): void
{
$this->rdvs = $rdvs;
}
/**
* @return string|null
*/
public function getPriorite(): ?string
{
return $this->priorite;
}
/**
* @param string|null $priorite
*/
public function setPriorite(?string $priorite): void
{
$this->priorite = $priorite;
}
/**
* @return string|null
*/
public function getFoumulaireReservation(): ?string
{
return $this->foumulaireReservation;
}
/**
* @param string|null $foumulaireReservation
*/
public function setFoumulaireReservation(?string $foumulaireReservation): void
{
$this->foumulaireReservation = $foumulaireReservation;
}
/**
* @return string|null
*/
public function getHeure(): ?string
{
return $this->heure;
}
/**
* @param string|null $heure
*/
public function setHeure(?string $heure): void
{
$this->heure = $heure;
}
/**
* @return string|null
*/
public function getRemarque(): ?string
{
return $this->remarque;
}
/**
* @param string|null $remarque
*/
public function setRemarque(?string $remarque): void
{
$this->remarque = $remarque;
}
/*********/
/* REMVOE */
/********/
public function removeRDV(RDV $item)
{
$this->rdvs->removeElement($item);
}
}