<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\OffresinscritRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: OffresinscritRepository::class)]
#[ApiResource]
class Offresinscrit
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $zphone = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adresse = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $university = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $societeactuelle = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adressesociete = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\ManyToOne(inversedBy: 'offresinscrits')]
private ?User $relationus = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $Date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $vu = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $patente = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $carteetd = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $statut = null;
#[ORM\OneToMany(mappedBy: 'userinscrit', targetEntity: Voucher::class,cascade: ['remove'])]
private Collection $vouchers;
#[ORM\ManyToOne(inversedBy: 'inscrit')]
private ?Offres $offres = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $facture = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reffacture = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $datefacture = null;
public function __construct()
{
$this->vouchers = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getZphone(): ?string
{
return $this->zphone;
}
public function setZphone(?string $zphone): self
{
$this->zphone = $zphone;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getUniversity(): ?string
{
return $this->university;
}
public function setUniversity(?string $university): self
{
$this->university = $university;
return $this;
}
public function getSocieteactuelle(): ?string
{
return $this->societeactuelle;
}
public function setSocieteactuelle(?string $societeactuelle): self
{
$this->societeactuelle = $societeactuelle;
return $this;
}
public function getAdressesociete(): ?string
{
return $this->adressesociete;
}
public function setAdressesociete(?string $adressesociete): self
{
$this->adressesociete = $adressesociete;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getRelationus(): ?User
{
return $this->relationus;
}
public function setRelationus(?User $relationus): self
{
$this->relationus = $relationus;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->Date;
}
public function setDate(?\DateTimeInterface $Date): self
{
$this->Date = $Date;
return $this;
}
public function getVu(): ?string
{
return $this->vu;
}
public function setVu(?string $vu): self
{
$this->vu = $vu;
return $this;
}
public function getPatente(): ?string
{
return $this->patente;
}
public function setPatente(?string $patente): self
{
$this->patente = $patente;
return $this;
}
public function getCarteetd(): ?string
{
return $this->carteetd;
}
public function setCarteetd(?string $carteetd): self
{
$this->carteetd = $carteetd;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): self
{
$this->statut = $statut;
return $this;
}
/**
* @return Collection<int, Voucher>
*/
public function getVouchers(): Collection
{
return $this->vouchers;
}
public function addVoucher(Voucher $voucher): self
{
if (!$this->vouchers->contains($voucher)) {
$this->vouchers->add($voucher);
$voucher->setUserinscrit($this);
}
return $this;
}
public function removeVoucher(Voucher $voucher): self
{
if ($this->vouchers->removeElement($voucher)) {
// set the owning side to null (unless already changed)
if ($voucher->getUserinscrit() === $this) {
$voucher->setUserinscrit(null);
}
}
return $this;
}
public function getOffres(): ?Offres
{
return $this->offres;
}
public function setOffres(?Offres $offres): self
{
$this->offres = $offres;
return $this;
}
public function getFacture(): ?string
{
return $this->facture;
}
public function setFacture(?string $facture): self
{
$this->facture = $facture;
return $this;
}
public function getReffacture(): ?string
{
return $this->reffacture;
}
public function setReffacture(?string $reffacture): self
{
$this->reffacture = $reffacture;
return $this;
}
public function getDatefacture(): ?\DateTimeInterface
{
return $this->datefacture;
}
public function setDatefacture(?\DateTimeInterface $datefacture): self
{
$this->datefacture = $datefacture;
return $this;
}
}