src/Entity/Gos/SalesManagoEvent.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="salesmanago_event", indexes={@ORM\Index(name="id_cart", columns={"id_cart"})})
  6.  * @ORM\Entity(repositoryClass="App\Repository\SalesManagoEventRepository")
  7.  * @ORM\HasLifecycleCallbacks
  8.  */
  9. class SalesManagoEvent
  10. {
  11.     /**
  12.      * @ORM\Column(type="integer")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="IDENTITY")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", name="salesmanago_id", length=100, nullable=true)
  19.      */
  20.     private $salesManagoId;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\User", inversedBy="salesManagoEvent")
  23.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  24.      */
  25.     private $user;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Orders", inversedBy="salesManagoEvent")
  28.      * @ORM\JoinColumn()
  29.      */
  30.     private $orders;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\SalesManagoEventType", inversedBy="event")
  33.      * @ORM\JoinColumn()
  34.      */
  35.     private $eventType;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\SalesManagoActionType", inversedBy="event")
  38.      * @ORM\JoinColumn()
  39.      */
  40.     private $actionType;
  41.     /**
  42.      * @ORM\Column(type="text", nullable=true)
  43.      */
  44.     private $jsonToSend;
  45.     /**
  46.      * @ORM\Column(type="text", nullable=true)
  47.      */
  48.     private $sentResponse;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="integer", nullable=true)
  55.      */
  56.     private $idCart;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\PortalSettings", inversedBy="salesManagoEvents")
  59.      * @ORM\JoinColumn(name="portal_settings_id", referencedColumnName="id", onDelete="SET NULL")
  60.      */
  61.     private $portalSettings;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true)
  64.      */
  65.     private $updatedAt;
  66.     /**
  67.      * @ORM\Column(type="datetime", nullable=true)
  68.      */
  69.     private $updatedCartAt;
  70.     /**
  71.      * @ORM\Column(type="boolean", nullable=true)
  72.      */
  73.     private $isWaitingForNextInvoiceDate;
  74.     /** @ORM\PrePersist() */
  75.     public function prePersist()
  76.     {
  77.         $this->createdAt = new \DateTime();
  78.     }
  79.     /** @ORM\PreUpdate() */
  80.     public function preUpdate()
  81.     {
  82.         $this->updatedAt = new \DateTime();
  83.     }
  84.     /**
  85.      * Get id
  86.      *
  87.      * @return integer
  88.      */
  89.     public function getId()
  90.     {
  91.         return $this->id;
  92.     }
  93.     /**
  94.      * Set createdAt
  95.      *
  96.      * @param \DateTime $createdAt
  97.      *
  98.      * @return SalesManagoEvent
  99.      */
  100.     public function setCreatedAt($createdAt)
  101.     {
  102.         $this->createdAt $createdAt;
  103.         return $this;
  104.     }
  105.     /**
  106.      * Get createdAt
  107.      *
  108.      * @return \DateTime
  109.      */
  110.     public function getCreatedAt()
  111.     {
  112.         return $this->createdAt;
  113.     }
  114.     /**
  115.      * Set updatedAt
  116.      *
  117.      * @param \DateTime $updatedAt
  118.      *
  119.      * @return SalesManagoEvent
  120.      */
  121.     public function setUpdatedAt($updatedAt)
  122.     {
  123.         $this->updatedAt $updatedAt;
  124.         return $this;
  125.     }
  126.     /**
  127.      * Get updatedAt
  128.      *
  129.      * @return \DateTime
  130.      */
  131.     public function getUpdatedAt()
  132.     {
  133.         return $this->updatedAt;
  134.     }
  135.     /**
  136.      * Set updatedCartAt
  137.      *
  138.      * @param \DateTime $updatedCartAt
  139.      *
  140.      * @return SalesManagoEvent
  141.      */
  142.     public function setUpdatedCartAt($updatedCartAt)
  143.     {
  144.         $this->updatedCartAt $updatedCartAt;
  145.         return $this;
  146.     }
  147.     /**
  148.      * Get updatedCartAt
  149.      *
  150.      * @return \DateTime
  151.      */
  152.     public function getUpdatedCartAt()
  153.     {
  154.         return $this->updatedCartAt;
  155.     }
  156.     /**
  157.      * Constructor
  158.      */
  159.     public function __construct()
  160.     {
  161.         $this->orders = new \Doctrine\Common\Collections\ArrayCollection();
  162.     }
  163.     /**
  164.      * Set jsonToSend
  165.      *
  166.      * @param string $jsonToSend
  167.      *
  168.      * @return SalesManagoEvent
  169.      */
  170.     public function setJsonToSend($jsonToSend)
  171.     {
  172.         $this->jsonToSend $jsonToSend;
  173.         return $this;
  174.     }
  175.     /**
  176.      * Get jsonToSend
  177.      *
  178.      * @return string
  179.      */
  180.     public function getJsonToSend()
  181.     {
  182.         return $this->jsonToSend;
  183.     }
  184.     /**
  185.      * Set sentResponse
  186.      *
  187.      * @param string $sentResponse
  188.      *
  189.      * @return SalesManagoEvent
  190.      */
  191.     public function setSentResponse($sentResponse)
  192.     {
  193.         $this->sentResponse $sentResponse;
  194.         return $this;
  195.     }
  196.     /**
  197.      * Get sentResponse
  198.      *
  199.      * @return string
  200.      */
  201.     public function getSentResponse()
  202.     {
  203.         return $this->sentResponse;
  204.     }
  205.     /**
  206.      * Set user
  207.      *
  208.      * @param \App\Entity\Gos\User $user
  209.      *
  210.      * @return SalesManagoEvent
  211.      */
  212.     public function setUser(\App\Entity\Gos\User $user null)
  213.     {
  214.         $this->user $user;
  215.         return $this;
  216.     }
  217.     /**
  218.      * Get user
  219.      *
  220.      * @return \App\Entity\Gos\User
  221.      */
  222.     public function getUser()
  223.     {
  224.         return $this->user;
  225.     }
  226.     /**
  227.      * Set event
  228.      *
  229.      * @param string $event
  230.      *
  231.      * @return SalesManagoEvent
  232.      */
  233.     public function setEvent($event)
  234.     {
  235.         $this->event $event;
  236.         return $this;
  237.     }
  238.     /**
  239.      * Get event
  240.      *
  241.      * @return string
  242.      */
  243.     public function getEvent()
  244.     {
  245.         return $this->event;
  246.     }
  247.     /**
  248.      * Set eventType
  249.      *
  250.      * @param \App\Entity\Gos\SalesManagoEventType $eventType
  251.      *
  252.      * @return SalesManagoEvent
  253.      */
  254.     public function setEventType(\App\Entity\Gos\SalesManagoEventType $eventType null)
  255.     {
  256.         $this->eventType $eventType;
  257.         return $this;
  258.     }
  259.     /**
  260.      * Get eventType
  261.      *
  262.      * @return \App\Entity\Gos\SalesManagoEventType
  263.      */
  264.     public function getEventType()
  265.     {
  266.         return $this->eventType;
  267.     }
  268.     /**
  269.      * Set actionType
  270.      *
  271.      * @param \App\Entity\Gos\SalesManagoActionType $actionType
  272.      *
  273.      * @return SalesManagoEvent
  274.      */
  275.     public function setActionType(\App\Entity\Gos\SalesManagoActionType $actionType null)
  276.     {
  277.         $this->actionType $actionType;
  278.         return $this;
  279.     }
  280.     /**
  281.      * Get actionType
  282.      *
  283.      * @return \App\Entity\Gos\SalesManagoActionType
  284.      */
  285.     public function getActionType()
  286.     {
  287.         return $this->actionType;
  288.     }
  289.     /**
  290.      * Set orders
  291.      *
  292.      * @param \App\Entity\Gos\Orders $orders
  293.      *
  294.      * @return SalesManagoEvent
  295.      */
  296.     public function setOrders(\App\Entity\Gos\Orders $orders null)
  297.     {
  298.         $this->orders $orders;
  299.         return $this;
  300.     }
  301.     /**
  302.      * Get orders
  303.      *
  304.      * @return \App\Entity\Gos\Orders
  305.      */
  306.     public function getOrders()
  307.     {
  308.         return $this->orders;
  309.     }
  310.     /**
  311.      * Set salesManagoId
  312.      *
  313.      * @param string $salesManagoId
  314.      *
  315.      * @return SalesManagoEvent
  316.      */
  317.     public function setSalesManagoId($salesManagoId)
  318.     {
  319.         $this->salesManagoId $salesManagoId;
  320.         return $this;
  321.     }
  322.     /**
  323.      * Get salesManagoId
  324.      *
  325.      * @return string
  326.      */
  327.     public function getSalesManagoId()
  328.     {
  329.         return $this->salesManagoId;
  330.     }
  331.     /**
  332.      * Set portalSettings
  333.      *
  334.      * @param \App\Entity\Gos\PortalSettings $portalSettings
  335.      *
  336.      * @return SalesManagoEvent
  337.      */
  338.     public function setPortalSettings(\App\Entity\Gos\PortalSettings $portalSettings null)
  339.     {
  340.         $this->portalSettings $portalSettings;
  341.         return $this;
  342.     }
  343.     /**
  344.      * Get portalSettings
  345.      *
  346.      * @return \App\Entity\Gos\PortalSettings
  347.      */
  348.     public function getPortalSettings()
  349.     {
  350.         return $this->portalSettings;
  351.     }
  352.     public function __toString()
  353.     {
  354.         return (string)$this->getId();
  355.     }
  356.     /**
  357.      * Set idCart
  358.      *
  359.      *  @param integer $idCart
  360.      *
  361.      * @return SalesManagoEvent
  362.      */
  363.     public function setIdCart($idCart)
  364.     {
  365.         $this->idCart $idCart;
  366.         return $this;
  367.     }
  368.     /**
  369.      * Get idCart
  370.      *
  371.      * @return integer
  372.      */
  373.     public function getIdCart()
  374.     {
  375.         return $this->idCart;
  376.     }
  377.     public function getIsWaitingForNextInvoiceDate(): ?bool
  378.     {
  379.         return $this->isWaitingForNextInvoiceDate;
  380.     }
  381.     public function setIsWaitingForNextInvoiceDate(?bool $isWaitingForNextInvoiceDate): self
  382.     {
  383.         $this->isWaitingForNextInvoiceDate $isWaitingForNextInvoiceDate;
  384.         return $this;
  385.     }
  386. }