Guest User

Untitled

a guest
Oct 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.23 KB | None | 0 0
  1. <?php
  2.  
  3. namespace VisualFoodLog\LogBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7.  
  8. /**
  9.  * VisualFoodLog\LogBundle\Entity\LogItem
  10.  *
  11.  * @ORM\Table(name="log_items")
  12.  * @ORM\Entity(repositoryClass="VisualFoodLog\LogBundle\Entity\LogItemRepository")
  13.  */
  14. class LogItem
  15. {
  16.     /**
  17.      * @var integer $id
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.  
  25.     /**
  26.      * @var string $title
  27.      *
  28.      * @ORM\Column(name="title", type="string", length=255)
  29.      */
  30.     private $title;
  31.  
  32.     /**
  33.      * @var text $description
  34.      *
  35.      * @ORM\Column(name="description", type="text")
  36.      */
  37.     private $description;
  38.    
  39.     /**
  40.      * @ORM/OneToMany(targetEntity="LogItemMedia", mappedBy="logItem")
  41.      */
  42.     private $media;
  43.  
  44.     /**
  45.      * @var integer $user
  46.      * @ORM/ManyToOne(targetEntity="User", inversedBy="log_items")
  47.      * @ORM\JoinColumn(name="user", referencedColumnName="id")
  48.      */
  49.     private $user;
  50.  
  51.     /**
  52.      * @var datetime $created_at
  53.      *
  54.      * @ORM\Column(name="created_at", type="datetime")
  55.      */
  56.     private $created_at;
  57.  
  58.     /**
  59.      * @var datetime $updated_at
  60.      *
  61.      * @ORM\Column(name="updated_at", type="datetime")
  62.      */
  63.     private $updated_at;
  64.  
  65.  
  66.     /**
  67.      * Get id
  68.      *
  69.      * @return integer
  70.      */
  71.     public function getId()
  72.     {
  73.         return $this->id;
  74.     }
  75.  
  76.     /**
  77.      * Set title
  78.      *
  79.      * @param string $title
  80.      */
  81.     public function setTitle($title)
  82.     {
  83.         $this->title = $title;
  84.     }
  85.  
  86.     /**
  87.      * Get title
  88.      *
  89.      * @return string
  90.      */
  91.     public function getTitle()
  92.     {
  93.         return $this->title;
  94.     }
  95.  
  96.     /**
  97.      * Set description
  98.      *
  99.      * @param text $description
  100.      */
  101.     public function setDescription($description)
  102.     {
  103.         $this->description = $description;
  104.     }
  105.  
  106.     /**
  107.      * Get description
  108.      *
  109.      * @return text
  110.      */
  111.     public function getDescription()
  112.     {
  113.         return $this->description;
  114.     }
  115.  
  116.     /**
  117.      * Set user_id
  118.      *
  119.      * @param integer $userId
  120.      */
  121.     public function setUserId($userId)
  122.     {
  123.         $this->user_id = $userId;
  124.     }
  125.  
  126.     /**
  127.      * Get user_id
  128.      *
  129.      * @return integer
  130.      */
  131.     public function getUserId()
  132.     {
  133.         return $this->user_id;
  134.     }
  135.  
  136.     /**
  137.      * Set created_at
  138.      *
  139.      * @param datetime $createdAt
  140.      */
  141.     public function setCreatedAt($createdAt)
  142.     {
  143.         $this->created_at = $createdAt;
  144.     }
  145.  
  146.     /**
  147.      * Get created_at
  148.      *
  149.      * @return datetime
  150.      */
  151.     public function getCreatedAt()
  152.     {
  153.         return $this->created_at;
  154.     }
  155.  
  156.     /**
  157.      * Set updated_at
  158.      *
  159.      * @param datetime $updatedAt
  160.      */
  161.     public function setUpdatedAt($updatedAt)
  162.     {
  163.         $this->updated_at = $updatedAt;
  164.     }
  165.  
  166.     /**
  167.      * Get updated_at
  168.      *
  169.      * @return datetime
  170.      */
  171.     public function getUpdatedAt()
  172.     {
  173.         return $this->updated_at;
  174.     }
  175.    
  176.     public function __construct()
  177.     {
  178.       $this->media = new ArrayCollection();
  179.     }
  180. }
Add Comment
Please, Sign In to add comment