src/Entity/SimulationLine.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Product\ConfirmedProduct;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * SimulationLine
  8.  *
  9.  * @ORM\Table(name="simulation_line")
  10.  * @ORM\Entity(repositoryClass="App\Repository\SimulationLineRepository")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class SimulationLine
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="productName", type="string", length=255)
  27.      */
  28.     private $productName;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="fsa", type="string", length=10, nullable=true)
  33.      */
  34.     private $fsa;
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="code", type="string", length=255, nullable=true)
  39.      */
  40.     private $code;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="supplierName", type="string", length=255, nullable=true)
  45.      */
  46.     private $supplierName;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="invoiceUnit", type="string", length=255, nullable=true)
  51.      */
  52.     private $invoiceUnit;
  53.     /**
  54.      * @var float
  55.      *
  56.      * @ORM\Column(name="customerPrice", type="float", nullable=true)
  57.      */
  58.     private $customerPrice;
  59.     /**
  60.      * @var float
  61.      *
  62.      * @ORM\Column(name="malysPrice", type="float", nullable=true)
  63.      */
  64.     private $malysPrice;
  65.     /**
  66.      * @var float
  67.      *
  68.      * @ORM\Column(name="negoPrice", type="float", nullable=true)
  69.      */
  70.     private $negoPrice;
  71.     /**
  72.      * @var bool
  73.      *
  74.      * @ORM\Column(name="selected", type="boolean", nullable=true)
  75.      */
  76.     private $selected;
  77.     /**
  78.      * @var DateTime
  79.      *
  80.      * @ORM\Column(name="createdAt", type="datetime")
  81.      */
  82.     private $createdAt;
  83.     /**
  84.      * @var DateTime
  85.      *
  86.      * @ORM\Column(name="updatedAt", type="datetime")
  87.      */
  88.     private $updatedAt;
  89.     /**
  90.      * @var Simulation
  91.      *
  92.      * @ORM\ManyToOne(targetEntity="Simulation", inversedBy="lines")
  93.      * @ORM\JoinColumn(name="simulation_id", referencedColumnName="id")
  94.      */
  95.     protected $simulation;
  96.     /**
  97.      * @var ConfirmedProduct
  98.      *
  99.      * @ORM\ManyToOne(targetEntity="App\Entity\Product\ConfirmedProduct")
  100.      * @ORM\JoinColumn(name="product_id", referencedColumnName="id", onDelete="SET NULL")
  101.      */
  102.     protected $product;
  103.     /**
  104.      * @var Supplier
  105.      *
  106.      * @ORM\ManyToOne(targetEntity="Supplier")
  107.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  108.      */
  109.     protected $supplier;
  110.     public function __construct()
  111.     {
  112.         $this->setSelected(true);
  113.     }
  114.     /**
  115.      * @var int
  116.      *
  117.      * @ORM\Column(name="priority", type="integer", nullable=true)
  118.      */
  119.     private $priority;
  120.     /**
  121.      * @var string
  122.      *
  123.      * @ORM\Column(name="promotion_type", type="string", length=255, nullable=true)
  124.      */
  125.     private $promotionType;
  126.     /**
  127.      * Get id
  128.      *
  129.      * @return int
  130.      */
  131.     public function getId()
  132.     {
  133.         return $this->id;
  134.     }
  135.     /**
  136.      * Set productName
  137.      *
  138.      * @param string $productName
  139.      *
  140.      * @return SimulationLine
  141.      */
  142.     public function setProductName($productName)
  143.     {
  144.         $this->productName $productName;
  145.         return $this;
  146.     }
  147.     /**
  148.      * Get productName
  149.      *
  150.      * @return string
  151.      */
  152.     public function getProductName()
  153.     {
  154.         return $this->productName;
  155.     }
  156.     /**
  157.      * Set fsa
  158.      *
  159.      * @param string $fsa
  160.      *
  161.      * @return SimulationLine
  162.      */
  163.     public function setFsa($fsa)
  164.     {
  165.         $this->fsa $fsa;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get fsa
  170.      *
  171.      * @return string
  172.      */
  173.     public function getFsa()
  174.     {
  175.         return $this->fsa;
  176.     }
  177.     /**
  178.      * Set code
  179.      *
  180.      * @param string $code
  181.      *
  182.      * @return SimulationLine
  183.      */
  184.     public function setCode($code)
  185.     {
  186.         $this->code $code;
  187.         return $this;
  188.     }
  189.     /**
  190.      * Get code
  191.      *
  192.      * @return string
  193.      */
  194.     public function getCode()
  195.     {
  196.         return $this->code;
  197.     }
  198.     /**
  199.      * Set supplierName
  200.      *
  201.      * @param string $supplierName
  202.      *
  203.      * @return SimulationLine
  204.      */
  205.     public function setSupplierName($supplierName)
  206.     {
  207.         $this->supplierName $supplierName;
  208.         return $this;
  209.     }
  210.     /**
  211.      * Get supplierName
  212.      *
  213.      * @return string
  214.      */
  215.     public function getSupplierName()
  216.     {
  217.         return $this->supplierName;
  218.     }
  219.     /**
  220.      * Set customerPrice
  221.      *
  222.      * @param float $customerPrice
  223.      *
  224.      * @return SimulationLine
  225.      */
  226.     public function setCustomerPrice($customerPrice)
  227.     {
  228.         $this->customerPrice $customerPrice;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Get customerPrice
  233.      *
  234.      * @return float
  235.      */
  236.     public function getCustomerPrice()
  237.     {
  238.         return $this->customerPrice;
  239.     }
  240.     /**
  241.      * Set malysPrice
  242.      *
  243.      * @param float $malysPrice
  244.      *
  245.      * @return SimulationLine
  246.      */
  247.     public function setMalysPrice($malysPrice)
  248.     {
  249.         $this->malysPrice $malysPrice;
  250.         return $this;
  251.     }
  252.     /**
  253.      * Get malysPrice
  254.      *
  255.      * @return float
  256.      */
  257.     public function getMalysPrice()
  258.     {
  259.         return $this->malysPrice;
  260.     }
  261.     /**
  262.      * Set negoPrice
  263.      *
  264.      * @param float $negoPrice
  265.      *
  266.      * @return SimulationLine
  267.      */
  268.     public function setNegoPrice($negoPrice)
  269.     {
  270.         $this->negoPrice $negoPrice;
  271.         return $this;
  272.     }
  273.     /**
  274.      * Get negoPrice
  275.      *
  276.      * @return float
  277.      */
  278.     public function getNegoPrice()
  279.     {
  280.         return $this->negoPrice;
  281.     }
  282.     /**
  283.      * Set selected
  284.      *
  285.      * @param boolean $selected
  286.      *
  287.      * @return SimulationLine
  288.      */
  289.     public function setSelected($selected)
  290.     {
  291.         $this->selected $selected;
  292.         return $this;
  293.     }
  294.     /**
  295.      * Get selected
  296.      *
  297.      * @return bool
  298.      */
  299.     public function getSelected()
  300.     {
  301.         return $this->selected;
  302.     }
  303.     /**
  304.      * @ORM\PrePersist
  305.      */
  306.     public function setCreatedAt()
  307.     {
  308.         $this->createdAt = new DateTime();
  309.         $this->updatedAt = new DateTime();
  310.         return $this;
  311.     }
  312.     /**
  313.      * Get createdAt
  314.      *
  315.      * @return DateTime
  316.      */
  317.     public function getCreatedAt()
  318.     {
  319.         return $this->createdAt;
  320.     }
  321.     /**
  322.      * Set updatedAt
  323.      * @ORM\PreUpdate
  324.      */
  325.     public function setUpdatedAt()
  326.     {
  327.         $this->updatedAt = new DateTime();
  328.         return $this;
  329.     }
  330.     /**
  331.      * Get updatedAt
  332.      *
  333.      * @return DateTime
  334.      */
  335.     public function getUpdatedAt()
  336.     {
  337.         return $this->updatedAt;
  338.     }
  339.     /**
  340.      * @return Simulation
  341.      */
  342.     public function getSimulation()
  343.     {
  344.         return $this->simulation;
  345.     }
  346.     /**
  347.      * @param Simulation $simulation
  348.      */
  349.     public function setSimulation($simulation)
  350.     {
  351.         $this->simulation $simulation;
  352.     }
  353.     /**
  354.      * @return ConfirmedProduct
  355.      */
  356.     public function getProduct()
  357.     {
  358.         return $this->product;
  359.     }
  360.     /**
  361.      * @param ConfirmedProduct $product
  362.      */
  363.     public function setProduct($product)
  364.     {
  365.         $this->product $product;
  366.     }
  367.     /**
  368.      * @return int
  369.      */
  370.     public function getPriority()
  371.     {
  372.         return $this->priority;
  373.     }
  374.     /**
  375.      * @param int $priority
  376.      */
  377.     public function setPriority($priority)
  378.     {
  379.         $this->priority $priority;
  380.     }
  381.     /**
  382.      * @return Supplier
  383.      */
  384.     public function getSupplier()
  385.     {
  386.         return $this->supplier;
  387.     }
  388.     /**
  389.      * @param Supplier $supplier
  390.      */
  391.     public function setSupplier($supplier)
  392.     {
  393.         $this->supplier $supplier;
  394.     }
  395.     /**
  396.      * @return string
  397.      */
  398.     public function getInvoiceUnit()
  399.     {
  400.         return $this->invoiceUnit;
  401.     }
  402.     /**
  403.      * @param string $invoiceUnit
  404.      */
  405.     public function setInvoiceUnit($invoiceUnit)
  406.     {
  407.         $this->invoiceUnit $invoiceUnit;
  408.     }
  409.     /**
  410.      * @return string
  411.      */
  412.     public function getPromotionType()
  413.     {
  414.         return $this->promotionType;
  415.     }
  416.     /**
  417.      * @param string $promotionType
  418.      */
  419.     public function setPromotionType($promotionType)
  420.     {
  421.         $this->promotionType $promotionType;
  422.     }
  423. }