src/Entity/SupplierCustomerLinkRequest.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Classes\linkRequestStatus;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Class SupplierCustomer
  8.  *
  9.  * @ORM\Entity
  10.  * @ORM\Entity(repositoryClass="App\Repository\SupplierCustomerLinkRequestRepository")
  11.  * @ORM\Table(name="malys_supplier_customer_link_request")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  * @package App\Entity
  14.  */
  15. class SupplierCustomerLinkRequest
  16. {
  17.     /**
  18.      * @var integer
  19.      *
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     protected $id;
  25.     /**
  26.      * @var Customer
  27.      * @ORM\ManyToOne(targetEntity="Customer")
  28.      * @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  29.      */
  30.     protected $customer;
  31.     /**
  32.      * @var Supplier
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="Supplier")
  35.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  36.      */
  37.     protected $supplier;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="comment", type="string", length=255, nullable=true)
  42.      */
  43.     protected $comment;
  44.     /**
  45.      * @var DateTime
  46.      *
  47.      * @ORM\Column(name="createdAt", type="datetime", nullable=false)
  48.      */
  49.     protected $createdAt;
  50.     /**
  51.      * @var DateTime
  52.      *
  53.      * @ORM\Column(name="updatedAt", type="datetime", nullable=true)
  54.      */
  55.     protected $updatedAt;
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(name="status", type="string", length=255, nullable=false)
  60.      */
  61.     protected $status;
  62.     /**
  63.      * SupplierCustomer constructor.
  64.      */
  65.     public function __construct()
  66.     {
  67.         $this->status linkRequestStatus::WAITING;
  68.     }
  69.     /**
  70.      * @return int
  71.      */
  72.     public function getId()
  73.     {
  74.         return $this->id;
  75.     }
  76.     /**
  77.      * @param int $id
  78.      */
  79.     public function setId($id)
  80.     {
  81.         $this->id $id;
  82.     }
  83.     /**
  84.      * @return Customer
  85.      */
  86.     public function getCustomer()
  87.     {
  88.         return $this->customer;
  89.     }
  90.     /**
  91.      * @param Customer $customer
  92.      */
  93.     public function setCustomer($customer)
  94.     {
  95.         $this->customer $customer;
  96.     }
  97.     /**
  98.      * @return Supplier
  99.      */
  100.     public function getSupplier()
  101.     {
  102.         return $this->supplier;
  103.     }
  104.     /**
  105.      * @param Supplier $supplier
  106.      */
  107.     public function setSupplier($supplier)
  108.     {
  109.         $this->supplier $supplier;
  110.     }
  111.     /**
  112.      * @return DateTime
  113.      */
  114.     public function getCreatedAt()
  115.     {
  116.         return $this->createdAt;
  117.     }
  118.     /**
  119.      * Set createdAt
  120.      *
  121.      * @return SupplierCustomer
  122.      * @ORM\PrePersist
  123.      */
  124.     public function setCreatedAt()
  125.     {
  126.         $this->createdAt = new DateTime();
  127.         $this->updatedAt = new DateTime();
  128.         return $this;
  129.     }
  130.     /**
  131.      * @return DateTime
  132.      */
  133.     public function getUpdatedAt()
  134.     {
  135.         return $this->updatedAt;
  136.     }
  137.     /**
  138.      * Set updatedAt
  139.      *
  140.      * @return SupplierCustomer
  141.      * @ORM\PreUpdate
  142.      */
  143.     public function setUpdatedAt()
  144.     {
  145.         $this->updatedAt = new DateTime();
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return string
  150.      */
  151.     public function getStatus()
  152.     {
  153.         return $this->status;
  154.     }
  155.     /**
  156.      * @param string $status
  157.      */
  158.     public function setStatus($status)
  159.     {
  160.         $this->status $status;
  161.     }
  162.     /**
  163.      * @return string
  164.      */
  165.     public function getComment()
  166.     {
  167.         return $this->comment;
  168.     }
  169.     /**
  170.      * @param string $comment
  171.      */
  172.     public function setComment($comment)
  173.     {
  174.         $this->comment $comment;
  175.     }
  176. }