src/Entity/Order.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\OrderRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table(name:"order")]
  7. #[ORM\Entity(repositoryClass:OrderRepository::class)]
  8. class Order
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(name:"id"type:"integer")]
  13.     private ?int $id;
  14.     #[ORM\Column(name:"date"type:"datetime_immutable"nullable:true)]
  15.     private ?\DateTimeImmutable $date;
  16.     #[ORM\Column(name:"produits"type:"array"length:1000nullable:true)]
  17.     private ?array $produits = [];
  18.     #[ORM\Column(name:"nom_client"type:"string"length:30)]
  19.     private ?string $nomClient;
  20.     #[ORM\Column(name:"prenom_client"type:"string"length:50)]
  21.     private ?string $prenomClient;
  22.     #[ORM\Column(name:"adresse_client"type:"string"length:500)]
  23.     private ?string $adresseClient;
  24.     #[ORM\Column(name:"tel_client"type:"string"length:20)]
  25.     private ?string $telClient;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getDate(): ?\DateTimeImmutable
  31.     {
  32.         return $this->date;
  33.     }
  34.     public function setDate(\DateTimeImmutable $date): self
  35.     {
  36.         $this->date $date;
  37.         return $this;
  38.     }
  39.     
  40.     public function getProduits(): ?array
  41.     {
  42.         return $this->produits;
  43.     }
  44.     public function setProduits(array $produits): self
  45.     {
  46.         $this->produits $produits;
  47.         return $this;
  48.     }
  49.     public function getNomClient(): ?string
  50.     {
  51.         return $this->nomClient;
  52.     }
  53.     public function setNomClient(string $nomClient): self
  54.     {
  55.         $this->nomClient $nomClient;
  56.         return $this;
  57.     }
  58.     public function getPrenomClient(): ?string
  59.     {
  60.         return $this->prenomClient;
  61.     }
  62.     public function setPrenomClient(string $prenomClient): self
  63.     {
  64.         $this->prenomClient $prenomClient;
  65.         return $this;
  66.     }
  67.     public function getAdresseClient(): ?string
  68.     {
  69.         return $this->adresseClient;
  70.     }
  71.     public function setAdresseClient(string $adresseClient): self
  72.     {
  73.         $this->adresseClient $adresseClient;
  74.         return $this;
  75.     }
  76.     public function getTelClient(): ?string
  77.     {
  78.         return $this->telClient;
  79.     }
  80.     public function setTelClient(string $telClient): self
  81.     {
  82.         $this->telClient $telClient;
  83.         return $this;
  84.     }
  85. }