<?php
namespace App\Entity;
use App\Entity\SpecialiteDocteur as SpecialiteDocteur;
use App\Entity\Symptome as Symptome;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Entity\Client;
use App\Repository\CommandeRepository;
/**
* Commande
*
* @ApiResource
* @ORM\Entity(repositoryClass=CommandeRepository::class)
* @ORM\Table()
*/
class Commande
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="nom", type="string", length=100, nullable=true)
*
* @Assert\NotBlank()
*/
private $nom;
/**
* @var string
*
* @ORM\Column(name="prenom", type="string", length=100, nullable=true)
*
* @Assert\NotBlank()
*/
private $prenom;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255)
*
* @Assert\NotBlank()
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="tel", type="string", length=20)
*
* @Assert\NotBlank()
*/
private $tel;
/**
* @var string
*
* @ORM\Column(name="sexe", type="string", length=20, nullable=true)
*/
private $sexe;
/**
* @var string
*
* @ORM\Column(name="age", type="integer", nullable=true)
*
* @Assert\NotBlank()
*/
private $age;
/**
* @var string
*
* @ORM\Column(name="adresse", type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @var string
*
* @ORM\Column(name="complement", type="string", length=255, nullable=true)
*/
private $complement;
/**
* @ORM\Column(name="codePostal", type="string", length=10, nullable=true)
*/
private $codePostal;
/**
* @ORM\Column(name="stripeCustomer", type="string", nullable=true)
*/
private $stripeCustomer;
/**
* @ORM\Column(name="paymentMethod", type="string", nullable=true)
*/
private $paymentMethod;
/**
* @var datetime
*
* @ORM\Column(name="horodateCreation", type="datetime")
*
* @Assert\NotBlank()
*/
private $horodateCreation;
/**
* @var SpecialiteDocteur
*
* @ORM\ManyToOne(targetEntity="App\Entity\SpecialiteDocteur")
* @ORM\JoinColumn(onDelete="SET NULL")
*/
private $specialite;
/**
* @var Symptome
*
* @ORM\ManyToOne(targetEntity="App\Entity\Symptome", cascade={"persist"})
* @ORM\JoinColumn(onDelete="SET NULL")
*/
private $symptome;
/**
* @var Client
*
* @ORM\ManyToOne(targetEntity=Client::class, cascade={"persist"})
* @ORM\JoinColumn(onDelete="SET NULL")
*/
private $client;
/**
* @var bool
*
* @ORM\Column(name="actif", type="boolean", nullable=true)
*/
private $actif;
/**
* @var bool
*
* @ORM\Column(name="traite", type="boolean")
*/
private $traite = false;
/**
* @var bool
*
* @ORM\Column(name="converted", type="boolean", nullable=true)
*/
private $converted = false;
/**
* @var bool
*
* @ORM\Column(name="reminderSended", type="boolean", nullable=true)
*/
private $reminderSended = false;
/**
* @var bool
*
* @ORM\Column(name="type", type="string", nullable=true)
*/
private $type;
/**
* @var string
*
* @ORM\Column(name="hubspotDealId", type="string", nullable=true)
*/
private $hubspotDealId;
/**
* @var string
*
* @ORM\Column(name="hubspot_contact_id", type="string", nullable=true)
*
*/
private $hubspotContactId;
/**
* Constructor of Commande Entity
*/
public function __construct()
{
$this->horodateCreation = new \DateTime;
// $this->age = 0;
$this->actif = true;
}
public function __toString()
{
return ($this->getNom()) ? $this->getNom() : '';
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set nom
*
* @param string $nom
*
* @return Commande
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get prenom
*
* @return string
*/
public function getPrenom()
{
return $this->prenom;
}
/**
* Set prenom
*
* @param string $prenom
*
* @return Commande
*/
public function setPrenom($prenom)
{
$this->prenom = $prenom;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set email
*
* @param string $email
*
* @return Commande
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get tel
*
* @return string
*/
public function getTel()
{
return $this->tel;
}
/**
* Set tel
*
* @param string $tel
*
* @return Commande
*/
public function setTel($tel)
{
$this->tel = $tel;
return $this;
}
/**
* Get adresse
*
* @return string
*/
public function getAdresse()
{
return $this->adresse;
}
/**
* Set adresse
*
* @param string $adresse
*
* @return Commande
*/
public function setAdresse($adresse)
{
$this->adresse = $adresse;
return $this;
}
/**
* Get complement
*
* @return string
*/
public function getComplement()
{
return $this->complement;
}
/**
* Set complement
*
* @param string $complement
*
* @return Commande
*/
public function setComplement($complement)
{
$this->complement = $complement;
return $this;
}
/**
* Get codePostal
*
* @return string
*/
public function getCodePostal()
{
return $this->codePostal;
}
/**
* Set codePostal
*
* @param string $codePostal
*
* @return Commande
*/
public function setCodePostal($codePostal)
{
$this->codePostal = $codePostal;
return $this;
}
/**
* Set sexe
*
* @param string $sexe
*
* @return Commande
*/
public function setSexe($sexe)
{
$this->sexe = $sexe;
return $this;
}
/**
* Get sexe
*
* @return string
*/
public function getSexe()
{
return $this->sexe;
}
/**
* Set age
*
* @param string $age
*
* @return Commande
*/
public function setAge($age)
{
$this->age = $age;
return $this;
}
/**
* Get age
*
* @return string
*/
public function getAge()
{
return $this->age;
}
/**
* Get horodateCreation
*
* @return datetime
*/
public function getHorodateCreation()
{
return $this->horodateCreation;
}
/**
* Set horodateCreation
*
* @param datetime $horodateCreation
*
* @return Commande
*/
public function setHorodateCreation($horodateCreation)
{
$this->horodateCreation = $horodateCreation;
return $this;
}
/**
* Get specialite
*
* @return SpecialiteDocteur
*/
public function getSpecialite()
{
return $this->specialite;
}
/**
* Set specialite
*
* @param SpecialiteDocteur $specialite
*
* @return Commande
*/
public function setSpecialite(SpecialiteDocteur $specialite)
{
$this->specialite = $specialite;
return $this;
}
/**
* Get symptome
*
* @return Symptome
*/
public function getSymptome()
{
return $this->symptome;
}
/**
* Set symptome
*
* @param Symptome $symptome
*
* @return Commande
*/
public function setSymptome($symptome)
{
$this->symptome = $symptome;
return $this;
}
/**
* Get actif
*
* @return boolean
*/
public function getActif()
{
return $this->actif;
}
/**
* Set actif
*
* @param bool $actif
*
* @return Commande
*/
public function setActif($actif)
{
$this->actif = $actif;
return $this;
}
/**
* @return mixed
*/
public function getStripeCustomer()
{
return $this->stripeCustomer;
}
/**
* @param mixed $stripeCustomer
*/
public function setStripeCustomer($stripeCustomer)
{
$this->stripeCustomer = $stripeCustomer;
}
/**
* @return mixed
*/
public function getPaymentMethod()
{
return $this->paymentMethod;
}
/**
* @param mixed $paymentMethod
*/
public function setPaymentMethod($paymentMethod)
{
$this->paymentMethod = $paymentMethod;
}
/**
* @return bool
*/
public function getType(): ?string
{
return $this->type;
}
/**
* @param string $type
*/
public function setType(string $type): void
{
$this->type = $type;
}
/**
* @return Client
*/
public function getClient(): ?Client
{
return $this->client;
}
/**
* @param Client $client
*/
public function setClient(Client $client): void
{
$this->client = $client;
}
/**
* @return ?string
*/
public function getHubspotDealId(): ?string
{
return $this->hubspotDealId;
}
/**
* @param ?string $hubspotDealId
*/
public function setHubspotDealId(?string $hubspotDealId): void
{
$this->hubspotDealId = $hubspotDealId;
}
/**
* @return bool
*/
public function isTraite(): bool
{
return $this->traite;
}
/**
* @param bool $traite
*/
public function setTraite(bool $traite): void
{
$this->traite = $traite;
}
/**
* @return bool
*/
public function isConverted(): bool
{
return $this->converted;
}
/**
* @param bool $converted
*/
public function setConverted(bool $converted): void
{
$this->converted = $converted;
}
/**
* @return bool
*/
public function isReminderSended(): bool
{
return $this->reminderSended;
}
/**
* @param bool $reminderSended
*/
public function setReminderSended(bool $reminderSended): void
{
$this->reminderSended = $reminderSended;
}
/**
* @return string
*/
public function getHubspotContactId(): ?string
{
return $this->hubspotContactId;
}
/**
* @param string $hubspotContactId
*/
public function setHubspotContactId(?string $hubspotContactId): void
{
$this->hubspotContactId = $hubspotContactId;
}
}