src/Entity/DocContractModel.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocContractModelRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=DocContractModelRepository::class)
  7.  * @ORM\HasLifecycleCallbacks
  8.  */
  9. class DocContractModel
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="text", nullable=true)
  19.      */
  20.     private $contractualDocument;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      */
  24.     private $companyId;
  25.     /**
  26.      * @ORM\Column(type="integer", nullable=true)
  27.      */
  28.     private $modelId;
  29.     /**
  30.      * @var \DateTime
  31.      *
  32.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  33.      */
  34.     private $createdAt;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(name="created_id", type="integer", nullable=true)
  39.      */
  40.     private $createdId;
  41.     /**
  42.      * @var \DateTime
  43.      *
  44.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  45.      */
  46.     private $updatedAt;
  47.     /**
  48.      * @var int
  49.      *
  50.      * @ORM\Column(name="updated_id", type="integer", nullable=true)
  51.      */
  52.     private $updatedId;
  53.     /**
  54.      * @ORM\Column(type="integer")
  55.      */
  56.     private $language;
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getContractualDocument(): ?string
  62.     {
  63.         return $this->contractualDocument;
  64.     }
  65.     public function setContractualDocument(string $contractualDocument): self
  66.     {
  67.         $this->contractualDocument $contractualDocument;
  68.         return $this;
  69.     }
  70.     public function getCompanyId(): ?int
  71.     {
  72.         return $this->companyId;
  73.     }
  74.     public function setCompanyId(int $companyId): self
  75.     {
  76.         $this->companyId $companyId;
  77.         return $this;
  78.     }
  79.     public function getModelId(): ?int
  80.     {
  81.         return $this->modelId;
  82.     }
  83.     public function setModelId(int $modelId): self
  84.     {
  85.         $this->modelId $modelId;
  86.         return $this;
  87.     }
  88.     /**
  89.      * Set createdAt
  90.      *
  91.      * @param \Datetime $createdAt
  92.      *
  93.      * @return DocContractModel
  94.      */
  95.     public function setCreatedAt(\Datetime $createdAt)
  96.     {
  97.         $this->createdAt $createdAt;
  98.         return $this;
  99.     }
  100.     /**
  101.      * Get createdAt
  102.      *
  103.      * @return \Datetime
  104.      */
  105.     public function getCreatedAt()
  106.     {
  107.         return $this->createdAt;
  108.     }
  109.     /**
  110.      * Set createdId
  111.      *
  112.      * @param integer $createdId
  113.      *
  114.      * @return DocContractModel
  115.      */
  116.     public function setCreatedId($createdId)
  117.     {
  118.         $this->createdId $createdId;
  119.         return $this;
  120.     }
  121.     /**
  122.      * Get createdId
  123.      *
  124.      * @return int
  125.      */
  126.     public function getCreatedId()
  127.     {
  128.         return $this->createdId;
  129.     }
  130.     /**
  131.      * Set updatedAt
  132.      *
  133.      * @param \Datetime $updatedAt
  134.      *
  135.      * @return DocContractModel
  136.      */
  137.     public function setUpdatedAt(\Datetime $updatedAt)
  138.     {
  139.         $this->updatedAt $updatedAt;
  140.         return $this;
  141.     }
  142.     /**
  143.      * Get updatedAt
  144.      *
  145.      * @return \Datetime
  146.      */
  147.     public function getUpdatedAt()
  148.     {
  149.         return $this->updatedAt;
  150.     }
  151.     /**
  152.      * Set updatedId
  153.      *
  154.      * @param integer $updatedId
  155.      *
  156.      * @return DocContractModel
  157.      */
  158.     public function setUpdatedId($updatedId)
  159.     {
  160.         $this->updatedId $updatedId;
  161.         return $this;
  162.     }
  163.     /**
  164.      * Get updatedId
  165.      *
  166.      * @return int
  167.      */
  168.     public function getUpdatedId()
  169.     {
  170.         return $this->updatedId;
  171.     }
  172.     public function getLanguage(): ?int
  173.     {
  174.         return $this->language;
  175.     }
  176.     public function setLanguage(int $language): self
  177.     {
  178.         $this->language $language;
  179.         return $this;
  180.     }
  181.     /**
  182.      * @ORM\PrePersist
  183.      */
  184.     public function onPrePersist()
  185.     {
  186.         $this->createdAt = new \DateTime();
  187.         $this->updatedAt = new \DateTime();
  188.     }
  189.     /**
  190.      * @ORM\PreUpdate
  191.      */
  192.     public function onPreUpdate()
  193.     {
  194.         $this->updatedAt = new \DateTime();
  195.     }
  196. }