Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.04 KB | None | 0 0
  1. <?php
  2.  
  3. namespace GameShelf\UsersBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8.  * Own
  9.  *
  10.  * @ORM\Table(name="ownership")
  11.  * @ORM\Entity(repositoryClass="GameShelf\UsersBundle\Entity\OwnRepository")
  12.  */
  13. class Own
  14. {
  15.     /**
  16.      * @var integer
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.  
  24.     /** @ORM\ManyToOne(targetEntity="OwnState") */
  25.     private $typo;
  26.  
  27.     /** @ORM\ManyToOne(targetEntity="GameShelf\GamesBundle\Entity\Platforms") */
  28.     private $platforms;
  29.  
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="updated", type="string", length=30)
  34.      */
  35.     private $updated;
  36.  
  37.  
  38.     /**
  39.      * Get id
  40.      *
  41.      * @return integer
  42.      */
  43.     public function getId()
  44.     {
  45.         return $this->id;
  46.     }
  47.  
  48.     /////////////////////
  49.  
  50.     /** @ORM\ManyToOne(targetEntity="User") */
  51.     private $user;
  52.  
  53.     /** @ORM\ManyToOne(targetEntity="GameShelf\GamesBundle\Entity\Game") */
  54.     private $game;
  55.  
  56.     /** @ORM\ManyToOne(targetEntity="Rates") */
  57.     private $rate;
  58.  
  59.     /**
  60.      * Set user
  61.      *
  62.      * @param \GameShelf\UsersBundle\Entity\User $user
  63.      * @return Own
  64.      */
  65.     public function setUser(\GameShelf\UsersBundle\Entity\User $user = null)
  66.     {
  67.         $this->user = $user;
  68.    
  69.         return $this;
  70.     }
  71.  
  72.     /**
  73.      * Get user
  74.      *
  75.      * @return \GameShelf\UsersBundle\Entity\User
  76.      */
  77.     public function getUser()
  78.     {
  79.         return $this->user;
  80.     }
  81.  
  82.     /**
  83.      * Set game
  84.      *
  85.      * @param \GameShelf\GamesBundle\Entity\Game $game
  86.      * @return Own
  87.      */
  88.     public function setGame(\GameShelf\GamesBundle\Entity\Game $game = null)
  89.     {
  90.         $this->game = $game;
  91.    
  92.         return $this;
  93.     }
  94.  
  95.     /**
  96.      * Get game
  97.      *
  98.      * @return \GameShelf\GamesBundle\Entity\Game
  99.      */
  100.     public function getGame()
  101.     {
  102.         return $this->game;
  103.     }
  104.  
  105.     /**
  106.      * Set rate
  107.      *
  108.      * @param \GameShelf\UsersBundle\Entity\Rates $rate
  109.      * @return Own
  110.      */
  111.     public function setRate(\GameShelf\UsersBundle\Entity\Rates $rate = null)
  112.     {
  113.         $this->rate = $rate;
  114.    
  115.         return $this;
  116.     }
  117.  
  118.     /**
  119.      * Get rate
  120.      *
  121.      * @return \GameShelf\UsersBundle\Entity\Rates
  122.      */
  123.     public function getRate()
  124.     {
  125.         return $this->rate;
  126.     }
  127.  
  128.     /**
  129.      * Set platform
  130.      *
  131.      * @param integer $platform
  132.      * @return Own
  133.      */
  134.     public function setPlatform($platform)
  135.     {
  136.         $this->platform = $platform;
  137.    
  138.         return $this;
  139.     }
  140.  
  141.     /**
  142.      * Get platform
  143.      *
  144.      * @return integer
  145.      */
  146.     public function getPlatform()
  147.     {
  148.         return $this->platform;
  149.     }
  150.  
  151.     /**
  152.      * Set type
  153.      *
  154.      * @param integer $type
  155.      * @return Own
  156.      */
  157.     public function setType($type)
  158.     {
  159.         $this->type = $type;
  160.    
  161.         return $this;
  162.     }
  163.  
  164.     /**
  165.      * Get type
  166.      *
  167.      * @return integer
  168.      */
  169.     public function getType()
  170.     {
  171.         return $this->type;
  172.     }
  173.     /**
  174.      * Constructor
  175.      */
  176.     public function __construct()
  177.     {
  178.         $this->typo = new \Doctrine\Common\Collections\ArrayCollection();
  179.     }
  180.    
  181.     /**
  182.      * Add typo
  183.      *
  184.      * @param \GameShelf\UsersBundle\Entity\OwnState $typo
  185.      * @return Own
  186.      */
  187.     public function addTypo(\GameShelf\UsersBundle\Entity\OwnState $typo)
  188.     {
  189.         $this->typo[] = $typo;
  190.    
  191.         return $this;
  192.     }
  193.  
  194.     /**
  195.      * Remove typo
  196.      *
  197.      * @param \GameShelf\UsersBundle\Entity\OwnState $typo
  198.      */
  199.     public function removeTypo(\GameShelf\UsersBundle\Entity\OwnState $typo)
  200.     {
  201.         $this->typo->removeElement($typo);
  202.     }
  203.  
  204.     /**
  205.      * Get typo
  206.      *
  207.      * @return \Doctrine\Common\Collections\Collection
  208.      */
  209.     public function getTypo()
  210.     {
  211.         return $this->typo;
  212.     }
  213.  
  214.     /**
  215.      * Set typo
  216.      *
  217.      * @param \GameShelf\UsersBundle\Entity\OwnState $typo
  218.      * @return Own
  219.      */
  220.     public function setTypo(\GameShelf\UsersBundle\Entity\OwnState $typo = null)
  221.     {
  222.         $this->typo = $typo;
  223.    
  224.         return $this;
  225.     }
  226.  
  227.     /**
  228.      * Set platforms
  229.      *
  230.      * @param \GameShelf\GamesBundle\Entity\Platforms $platforms
  231.      * @return Own
  232.      */
  233.     public function setPlatforms(\GameShelf\GamesBundle\Entity\Platforms $platforms = null)
  234.     {
  235.         $this->platforms = $platforms;
  236.    
  237.         return $this;
  238.     }
  239.  
  240.     /**
  241.      * Get platforms
  242.      *
  243.      * @return \GameShelf\GamesBundle\Entity\Platforms
  244.      */
  245.     public function getPlatforms()
  246.     {
  247.         return $this->platforms;
  248.     }
  249.  
  250.     /**
  251.      * Set updated
  252.      *
  253.      * @param string $updated
  254.      * @return Own
  255.      */
  256.     public function setUpdated($updated)
  257.     {
  258.         $this->updated = $updated;
  259.    
  260.         return $this;
  261.     }
  262.  
  263.     /**
  264.      * Get updated
  265.      *
  266.      * @return string
  267.      */
  268.     public function getUpdated()
  269.     {
  270.         return $this->updated;
  271.     }
  272. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement