src/Entity/Gos/UserTerms.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * UserTerms
  7.  *
  8.  * @ORM\Table(name="user_terms")
  9.  * @ORM\Entity(repositoryClass="App\Repository\UserTermsRepository")
  10.  * @ORM\HasLifecycleCallbacks
  11.  */
  12. class UserTerms
  13. {
  14.     /**
  15.      * @var int
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var
  23.      * @ORM\Column(type="string")
  24.      */
  25.     private $userIp;
  26.     /**
  27.      * @var
  28.      * @ORM\Column(type="string")
  29.      */
  30.     private $userHost;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\User", inversedBy="userTerms")
  33.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="cascade")
  34.      */
  35.     private $user;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\TermText", inversedBy="userTerms")
  38.      * @ORM\JoinColumn(name="term_text_id", referencedColumnName="id", onDelete="cascade")
  39.      */
  40.     private $termText;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Orders", inversedBy="userTerms")
  43.      * @ORM\JoinColumn()
  44.      */
  45.     private $orders;
  46.     /**
  47.      * @ORM\Column(type="datetime")
  48.      */
  49.     private $createdAt;
  50.     /**
  51.      * @ORM\Column(type="datetime", nullable=true)
  52.      */
  53.     private $updatedAt;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $deletedAt;
  58.     /**
  59.      * @ORM\Column(type="text", nullable=true)
  60.      */
  61.     private $currentCooperators;
  62.     /** @ORM\PrePersist() */
  63.     public function prePersist()
  64.     {
  65.         $this->createdAt = new \DateTime();
  66.     }
  67.     /** @ORM\PreUpdate() */
  68.     public function preUpdate()
  69.     {
  70.         $this->updatedAt = new \DateTime();
  71.     }
  72.     //-----------------------------------------------------------------
  73.     /**
  74.      * Get id
  75.      *
  76.      * @return integer
  77.      */
  78.     public function getId()
  79.     {
  80.         return $this->id;
  81.     }
  82.     /**
  83.      * Set userIp
  84.      *
  85.      * @param string $userIp
  86.      *
  87.      * @return UserTerms
  88.      */
  89.     public function setUserIp($userIp)
  90.     {
  91.         $this->userIp $userIp;
  92.         return $this;
  93.     }
  94.     /**
  95.      * Get userIp
  96.      *
  97.      * @return string
  98.      */
  99.     public function getUserIp()
  100.     {
  101.         return $this->userIp;
  102.     }
  103.     /**
  104.      * Set userHost
  105.      *
  106.      * @param string $userHost
  107.      *
  108.      * @return UserTerms
  109.      */
  110.     public function setUserHost($userHost)
  111.     {
  112.         $this->userHost $userHost;
  113.         return $this;
  114.     }
  115.     /**
  116.      * Get userHost
  117.      *
  118.      * @return string
  119.      */
  120.     public function getUserHost()
  121.     {
  122.         return $this->userHost;
  123.     }
  124.     /**
  125.      * Set createdAt
  126.      *
  127.      * @param \DateTime $createdAt
  128.      *
  129.      * @return UserTerms
  130.      */
  131.     public function setCreatedAt($createdAt)
  132.     {
  133.         $this->createdAt $createdAt;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Get createdAt
  138.      *
  139.      * @return \DateTime
  140.      */
  141.     public function getCreatedAt()
  142.     {
  143.         return $this->createdAt;
  144.     }
  145.     /**
  146.      * Set updatedAt
  147.      *
  148.      * @param \DateTime $updatedAt
  149.      *
  150.      * @return UserTerms
  151.      */
  152.     public function setUpdatedAt($updatedAt)
  153.     {
  154.         $this->updatedAt $updatedAt;
  155.         return $this;
  156.     }
  157.     /**
  158.      * Get updatedAt
  159.      *
  160.      * @return \DateTime
  161.      */
  162.     public function getUpdatedAt()
  163.     {
  164.         return $this->updatedAt;
  165.     }
  166.     /**
  167.      * Set deletedAt
  168.      *
  169.      * @param \DateTime $deletedAt
  170.      *
  171.      * @return UserTerms
  172.      */
  173.     public function setDeletedAt($deletedAt)
  174.     {
  175.         $this->deletedAt $deletedAt;
  176.         return $this;
  177.     }
  178.     /**
  179.      * Get deletedAt
  180.      *
  181.      * @return \DateTime
  182.      */
  183.     public function getDeletedAt()
  184.     {
  185.         return $this->deletedAt;
  186.     }
  187.     /**
  188.      * Set user
  189.      *
  190.      * @param \App\Entity\Gos\User $user
  191.      *
  192.      * @return UserTerms
  193.      */
  194.     public function setUser(\App\Entity\Gos\User $user null)
  195.     {
  196.         $this->user $user;
  197.         return $this;
  198.     }
  199.     /**
  200.      * Get user
  201.      *
  202.      * @return \App\Entity\Gos\User
  203.      */
  204.     public function getUser()
  205.     {
  206.         return $this->user;
  207.     }
  208.     /**
  209.      * Set termText
  210.      *
  211.      * @param \App\Entity\Gos\TermText $termText
  212.      *
  213.      * @return UserTerms
  214.      */
  215.     public function setTermText(\App\Entity\Gos\TermText $termText null)
  216.     {
  217.         $this->termText $termText;
  218.         return $this;
  219.     }
  220.     /**
  221.      * Get termText
  222.      *
  223.      * @return \App\Entity\Gos\TermText
  224.      */
  225.     public function getTermText()
  226.     {
  227.         return $this->termText;
  228.     }
  229.     /**
  230.      * Set orders
  231.      *
  232.      * @param \App\Entity\Gos\Orders $orders
  233.      *
  234.      * @return UserTerms
  235.      */
  236.     public function setOrders(\App\Entity\Gos\Orders $orders null)
  237.     {
  238.         $this->orders $orders;
  239.         return $this;
  240.     }
  241.     /**
  242.      * Get orders
  243.      *
  244.      * @return \App\Entity\Gos\Orders
  245.      */
  246.     public function getOrders()
  247.     {
  248.         return $this->orders;
  249.     }
  250.     public function getCurrentCooperators(): ?string
  251.     {
  252.         return $this->currentCooperators;
  253.     }
  254.     public function setCurrentCooperators(?string $currentCooperators): self
  255.     {
  256.         $this->currentCooperators $currentCooperators;
  257.         return $this;
  258.     }
  259. }