src/Entity/Order.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrderRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: OrderRepository::class)]
  6. #[ORM\Table(name: '`order`')]
  7. class Order
  8. {
  9.     const DEVISE = 'eur';
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type: 'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'orders')]
  15.     private $user;
  16.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  17.     private $reference;
  18.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  19.     private $stripe_token;
  20.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  21.     private $brand_stripe;
  22.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  23.     private $last4_stripe;
  24.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  25.     private $id_charge_stripe;
  26.     #[ORM\Column(type: 'string', length: 255, nullable: true)]
  27.     private $status_stripe;
  28.     #[ORM\Column(type: 'datetime', nullable: true)]
  29.     private $created_at;
  30.     #[ORM\Column(type: 'datetime', nullable: true)]
  31.     private $updated_at;
  32.     #[ORM\Column(type: 'float', nullable: true)]
  33.     private $price;
  34.     #[ORM\ManyToOne(targetEntity: Package::class, inversedBy: 'orders')]
  35.     private $package;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getUser(): ?User
  41.     {
  42.         return $this->user;
  43.     }
  44.     public function setUser(?User $user): self
  45.     {
  46.         $this->user = $user;
  47.         return $this;
  48.     }
  49.     public function getReference(): ?string
  50.     {
  51.         return $this->reference;
  52.     }
  53.     public function setReference(?string $reference): self
  54.     {
  55.         $this->reference = $reference;
  56.         return $this;
  57.     }
  58.     public function getStripeToken(): ?string
  59.     {
  60.         return $this->stripe_token;
  61.     }
  62.     public function setStripeToken(?string $stripe_token): self
  63.     {
  64.         $this->stripe_token = $stripe_token;
  65.         return $this;
  66.     }
  67.     public function getBrandStripe(): ?string
  68.     {
  69.         return $this->brand_stripe;
  70.     }
  71.     public function setBrandStripe(?string $brand_stripe): self
  72.     {
  73.         $this->brand_stripe = $brand_stripe;
  74.         return $this;
  75.     }
  76.     public function getLast4Stripe(): ?string
  77.     {
  78.         return $this->last4_stripe;
  79.     }
  80.     public function setLast4Stripe(?string $last4_stripe): self
  81.     {
  82.         $this->last4_stripe = $last4_stripe;
  83.         return $this;
  84.     }
  85.     public function getIdChargeStripe(): ?string
  86.     {
  87.         return $this->id_charge_stripe;
  88.     }
  89.     public function setIdChargeStripe(?string $id_charge_stripe): self
  90.     {
  91.         $this->id_charge_stripe = $id_charge_stripe;
  92.         return $this;
  93.     }
  94.     public function getStatusStripe(): ?string
  95.     {
  96.         return $this->status_stripe;
  97.     }
  98.     public function setStatusStripe(?string $status_stripe): self
  99.     {
  100.         $this->status_stripe = $status_stripe;
  101.         return $this;
  102.     }
  103.     public function getCreatedAt(): ?\DateTimeInterface
  104.     {
  105.         return $this->created_at;
  106.     }
  107.     public function setCreatedAt(?\DateTimeInterface $created_at): self
  108.     {
  109.         $this->created_at = $created_at;
  110.         return $this;
  111.     }
  112.     public function getUpdatedAt(): ?\DateTimeInterface
  113.     {
  114.         return $this->updated_at;
  115.     }
  116.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  117.     {
  118.         $this->updated_at = $updated_at;
  119.         return $this;
  120.     }
  121.     public function getPrice(): ?float
  122.     {
  123.         return $this->price;
  124.     }
  125.     public function setPrice(?float $price): self
  126.     {
  127.         $this->price = $price;
  128.         return $this;
  129.     }
  130.     public function getPackage(): ?Package
  131.     {
  132.         return $this->package;
  133.     }
  134.     public function setPackage(?Package $package): self
  135.     {
  136.         $this->package = $package;
  137.         return $this;
  138.     }
  139. }