src/MDS/EventsBundle/Entity/ProposalDocument.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\MDS\EventsBundle\Entity;
  3. use App\Entity\Card;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * ProposalDocument
  7.  *
  8.  * @ORM\Table(name="proposals_document")
  9.  * @ORM\Entity(repositoryClass="App\MDS\EventsBundle\Repository\ProposalDocumentRepository")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class ProposalDocument
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var int
  24.      *
  25.      * @ORM\Column(name="proposal_id", type="integer")
  26.      */
  27.     private $proposalId;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="file", type="string", length=255)
  32.      */
  33.     private $file;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="extension", type="string", length=255)
  38.      */
  39.     private $extension;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="title", type="string", length=255)
  44.      */
  45.     private $title;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="category", type="string", length=255, nullable=true)
  50.      */
  51.     private $category;
  52.     /**
  53.      * @var int
  54.      *
  55.      * @ORM\Column(name="created_id", type="integer")
  56.      */
  57.     private $createdId;
  58.     /**
  59.      * @var \DateTime
  60.      *
  61.      * @ORM\Column(name="created_at", type="datetime")
  62.      */
  63.     private $createdAt;
  64.     /**
  65.      * @var int
  66.      *
  67.      * @ORM\Column(name="updated_id", type="integer")
  68.      */
  69.     private $updatedId;
  70.     /**
  71.      * @var \DateTime
  72.      *
  73.      * @ORM\Column(name="updated_at", type="datetime")
  74.      */
  75.     private $updatedAt;
  76.     /**
  77.      * @var int
  78.      *
  79.      * @ORM\Column(name="disabled", type="integer", nullable=true)
  80.      */
  81.     private $disabled '0';
  82.     /**
  83.      * @var string
  84.      *
  85.      * @ORM\Column(name="price", type="float", nullable=true)
  86.      */
  87.     private $price;
  88.     /**
  89.      * @var string
  90.      *
  91.      * @ORM\Column(name="description", type="text", length=255, nullable=true)
  92.      */
  93.     private $description;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity=Card::class, inversedBy="proposalDocuments")
  96.      */
  97.     private $card;
  98.     /**
  99.      * @ORM\Column(type="date", nullable=true)
  100.      */
  101.     private $buyDate;
  102.     /**
  103.      * Get id
  104.      *
  105.      * @return int
  106.      */
  107.     public function getId()
  108.     {
  109.         return $this->id;
  110.     }
  111.     /**
  112.      * Set proposalId
  113.      *
  114.      * @param integer $proposalId
  115.      *
  116.      * @return ProposalDocument
  117.      */
  118.     public function setProposalId($proposalId)
  119.     {
  120.         $this->proposalId $proposalId;
  121.         return $this;
  122.     }
  123.     /**
  124.      * Get proposalId
  125.      *
  126.      * @return int
  127.      */
  128.     public function getProposalId()
  129.     {
  130.         return $this->proposalId;
  131.     }
  132.     /**
  133.      * Set file
  134.      *
  135.      * @param string $file
  136.      *
  137.      * @return ProposalDocument
  138.      */
  139.     public function setFile($file)
  140.     {
  141.         $this->file $file;
  142.         return $this;
  143.     }
  144.     /**
  145.      * Get file
  146.      *
  147.      * @return string
  148.      */
  149.     public function getFile()
  150.     {
  151.         return $this->file;
  152.     }
  153.     /**
  154.      * Set extension
  155.      *
  156.      * @param string $extension
  157.      *
  158.      * @return ProposalDocument
  159.      */
  160.     public function setExtension($extension)
  161.     {
  162.         $this->extension $extension;
  163.         return $this;
  164.     }
  165.     /**
  166.      * Get extension
  167.      *
  168.      * @return string
  169.      */
  170.     public function getExtension()
  171.     {
  172.         return $this->extension;
  173.     }
  174.     /**
  175.      * Set title
  176.      *
  177.      * @param string $title
  178.      *
  179.      * @return ProposalDocument
  180.      */
  181.     public function setTitle($title)
  182.     {
  183.         $this->title $title;
  184.         return $this;
  185.     }
  186.     /**
  187.      * Get title
  188.      *
  189.      * @return string
  190.      */
  191.     public function getTitle()
  192.     {
  193.         return $this->title;
  194.     }
  195.     /**
  196.      * Set createdId
  197.      *
  198.      * @param integer $createdId
  199.      *
  200.      * @return ProposalDocument
  201.      */
  202.     public function setCreatedId($createdId)
  203.     {
  204.         $this->createdId $createdId;
  205.         return $this;
  206.     }
  207.     /**
  208.      * Get createdId
  209.      *
  210.      * @return integer
  211.      */
  212.     public function getCreatedId()
  213.     {
  214.         return $this->createdId;
  215.     }
  216.     /**
  217.      * Set createdAt
  218.      *
  219.      * @param \DateTime $createdAt
  220.      *
  221.      * @return ProposalDocument
  222.      */
  223.     public function setCreatedAt(\Datetime $createdAt)
  224.     {
  225.         $this->createdAt $createdAt;
  226.         return $this;
  227.     }
  228.     /**
  229.      * Get createdAt
  230.      *
  231.      * @return \DateTime
  232.      */
  233.     public function getCreatedAt()
  234.     {
  235.         return $this->createdAt;
  236.     }
  237.     /**
  238.      * Set updatedId
  239.      *
  240.      * @param integer $updatedId
  241.      *
  242.      * @return ProposalDocument
  243.      */
  244.     public function setUpdatedId($updatedId)
  245.     {
  246.         $this->updatedId $updatedId;
  247.         return $this;
  248.     }
  249.     /**
  250.      * Get updatedId
  251.      *
  252.      * @return integer
  253.      */
  254.     public function getUpdatedId()
  255.     {
  256.         return $this->updatedId;
  257.     }
  258.     /**
  259.      * Set updatedAt
  260.      *
  261.      * @param \DateTime $updatedAt
  262.      *
  263.      * @return ProposalDocument
  264.      */
  265.     public function setUpdatedAt(\Datetime $updatedAt)
  266.     {
  267.         $this->updatedAt $updatedAt;
  268.         return $this;
  269.     }
  270.     /**
  271.      * Get updatedAt
  272.      *
  273.      * @return \DateTime
  274.      */
  275.     public function getUpdatedAt()
  276.     {
  277.         return $this->updatedAt;
  278.     }
  279.     
  280.     /**
  281.      * @ORM\PrePersist
  282.      */
  283.     public function setCreatedAtValue()
  284.     {
  285.         $this->createdAt = new \Datetime();
  286.     }
  287.     /**
  288.      * @ORM\PrePersist
  289.      * @ORM\PreUpdate
  290.      */
  291.     public function setUpdatedAtValue()
  292.     {
  293.         $this->updatedAt = new \Datetime();
  294.     }
  295.     /**
  296.      * Set category
  297.      *
  298.      * @param string $category
  299.      *
  300.      * @return ProposalDocument
  301.      */
  302.     public function setCategory($category)
  303.     {
  304.         $this->category $category;
  305.         return $this;
  306.     }
  307.     /**
  308.      * Get category
  309.      *
  310.      * @return string
  311.      */
  312.     public function getCategory()
  313.     {
  314.         return $this->category;
  315.     }
  316.     /**
  317.      * @return int
  318.      */
  319.     public function getDisabled()
  320.     {
  321.         return $this->disabled;
  322.     }
  323.     /**
  324.      * @param int $disabled
  325.      */
  326.     public function setDisabled($disabled)
  327.     {
  328.         $this->disabled $disabled;
  329.     }
  330.     /**
  331.      * Set price
  332.      *
  333.      * @param float $price
  334.      *
  335.      * @return ProposalDocument
  336.      */
  337.     public function setPrice($price)
  338.     {
  339.         $this->price $price;
  340.         return $this;
  341.     }
  342.     /**
  343.      * Get price
  344.      *
  345.      * @return float
  346.      */
  347.     public function getPrice()
  348.     {
  349.         return $this->price;
  350.     }
  351.     /**
  352.      * Set description
  353.      *
  354.      * @param string $description
  355.      *
  356.      * @return ProposalDocument
  357.      */
  358.     public function setDescription($description)
  359.     {
  360.         $this->description $description;
  361.         return $this;
  362.     }
  363.     /**
  364.      * Get description
  365.      *
  366.      * @return string
  367.      */
  368.     public function getDescription()
  369.     {
  370.         return $this->description;
  371.     }
  372.     public function getCard(): ?Card
  373.     {
  374.         return $this->card;
  375.     }
  376.     public function setCard(?Card $card): self
  377.     {
  378.         $this->card $card;
  379.         return $this;
  380.     }
  381.     public function getBuyDate(): ?\DateTimeInterface
  382.     {
  383.         return $this->buyDate;
  384.     }
  385.     public function setBuyDate(\DateTimeInterface $buyDate): self
  386.     {
  387.         $this->buyDate $buyDate;
  388.         return $this;
  389.     }
  390. }