src/Entity/ProjectOrderUndertakings.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectOrderUndertakingsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Doctrine\ORM\Mapping\UniqueConstraint;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProjectOrderUndertakingsRepository::class)
  9.  * @ORM\Table(name="project_order_undertakings", uniqueConstraints={
  10.  *          @UniqueConstraint(name="order_unique_invoice_nr", columns={"position_nr", "project_order_id"})
  11.  *     })
  12.  */
  13. class ProjectOrderUndertakings
  14. {
  15.    /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      * @Groups({
  20.      *          "project.order.undertaking.base",
  21.      * 
  22.      *          "project.details.orders",
  23.      *          "order.detail",
  24.      * 
  25.      * 
  26.      *          "vouchers.assigned.order.undertakings"
  27.      * })
  28.      */
  29.     private $id;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=ProjectOrders::class, inversedBy="project_order_undertakings")
  32.      * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
  33.      */
  34.     private $project_order;
  35.     /**
  36.      * @ORM\Column(type="datetime_immutable", nullable=true)
  37.      * @Groups({
  38.      *          "project.order.undertaking.base",
  39.      *          "project.details.orders",
  40.      *          "order.detail",
  41.      * 
  42.      * 
  43.      *          "vouchers.assigned.order.undertakings"
  44.      * })
  45.      */
  46.     private $created_at;
  47.     /**
  48.      * @ORM\Column(type="datetime_immutable", nullable=true)
  49.      * @Groups({
  50.      *          "project.order.undertaking.base",
  51.      *          "project.details.orders",
  52.      *          "order.detail",
  53.      * 
  54.      * 
  55.      *          "vouchers.assigned.order.undertakings"
  56.      * })
  57.      */
  58.     private $sent_at;
  59.     /**
  60.      * @ORM\Column(type="datetime_immutable", nullable=true)
  61.      * @Groups({
  62.      *          "project.order.undertaking.base",
  63.      *          "project.details.orders",
  64.      *          "order.detail",
  65.      * 
  66.      * 
  67.      *          "vouchers.assigned.order.undertakings"
  68.      * })
  69.      */
  70.     private $completed_at;
  71.     /**
  72.      * @ORM\Column(type="string", length=64, nullable=true, options={"comment":"Client undertaking via (Gutschrift) Position number"})
  73.      * @Groups({
  74.      *          "project.order.undertaking.base",
  75.      *          "project.details.orders",
  76.      *          "order.detail",
  77.      * 
  78.      * 
  79.      *          "vouchers.assigned.order.undertakings"
  80.      * })
  81.      */
  82.     private $position_nr;
  83.     /**
  84.      * @ORM\ManyToOne(targetEntity=Vouchers::class, inversedBy="project_order_undertakings")
  85.      * @ORM\JoinColumn(nullable=true)
  86.      * @Groups({
  87.      *          "project.order.undertaking.base",
  88.      *          "project.details.orders",
  89.      *          "order.detail"
  90.      * })
  91.      */
  92.     private $voucher;
  93.     /**
  94.      * @ORM\Column(type="float", precision=2, scale=2, nullable=true)
  95.      * @ORM\JoinColumn(nullable=true)
  96.      * @Groups({
  97.      *          "project.order.undertaking.base",
  98.      *          "project.details.orders",
  99.      *          "order.detail",
  100.      *          "vouchers.assigned.order.undertakings"
  101.      * })
  102.      */
  103.     private $price;
  104.     public function getId(): ?int
  105.     {
  106.         return $this->id;
  107.     }
  108.     public function getProjectOrder(): ?ProjectOrders
  109.     {
  110.         return $this->project_order;
  111.     }
  112.     public function setProjectOrder(?ProjectOrders $project_order): self
  113.     {
  114.         $this->project_order $project_order;
  115.         return $this;
  116.     }
  117.     public function getCreatedAt(): ?\DateTimeImmutable
  118.     {
  119.         return $this->created_at;
  120.     }
  121.     public function setCreatedAt(?\DateTimeImmutable $created_at): self
  122.     {
  123.         $this->created_at $created_at;
  124.         return $this;
  125.     }
  126.     public function getSentAt(): ?\DateTimeImmutable
  127.     {
  128.         return $this->sent_at;
  129.     }
  130.     public function setSentAt(?\DateTimeImmutable $sent_at): self
  131.     {
  132.         $this->sent_at $sent_at;
  133.         return $this;
  134.     }
  135.     public function getCompletedAt(): ?\DateTimeImmutable
  136.     {
  137.         return $this->completed_at;
  138.     }
  139.     public function setCompletedAt(?\DateTimeImmutable $completed_at): self
  140.     {
  141.         $this->completed_at $completed_at;
  142.         return $this;
  143.     }
  144.     public function getPositionNr(): ?string
  145.     {
  146.         return $this->position_nr;
  147.     }
  148.     public function setPositionNr(?string $position_nr): self
  149.     {
  150.         $this->position_nr $position_nr;
  151.         return $this;
  152.     }
  153.     public function getVoucher(): ?Vouchers
  154.     {
  155.         return $this->voucher;
  156.     }
  157.     public function setVoucher(?Vouchers $voucher): self
  158.     {
  159.         $this->voucher $voucher;
  160.         return $this;
  161.     }
  162.     public function getPrice(): ?float
  163.     {
  164.         return $this->price;
  165.     }
  166.     public function setPrice(?float $price): self
  167.     {
  168.         $this->price $price;
  169.         return $this;
  170.     }
  171. }