Guest User

Untitled

a guest
Apr 13th, 2012
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.67 KB | None | 0 0
  1. <?php
  2. namespace Tracker\MembersBundle\Entity;
  3.  
  4. use FOS\UserBundle\Entity\User as BaseUser;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7.  
  8.  
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="fos_user")
  12.  */
  13. class User extends BaseUser
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     protected $id;
  21.  
  22.     /**
  23.      * @ORM\ManyToMany(targetEntity="Tracker\MembersBundle\Entity\Group")
  24.      * @ORM\JoinTable(name="fos_user_user_group",
  25.      *      joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")},
  26.      *      inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")}
  27.      * )
  28.      */
  29.     protected $groups;
  30.  
  31.     /**
  32.      * @var integer $torrentPassVersion
  33.      *
  34.      * @ORM\Column(name="torrent_pass_version", type="integer", nullable=false)
  35.      */
  36.     private $torrentPassVersion = 0;
  37.  
  38.     /**
  39.      * @var string $torrentPass
  40.      *
  41.      * @ORM\Column(name="torrent_pass", type="string", nullable=false)
  42.      */
  43.     private $torrentPass;
  44.  
  45.     /**
  46.      * @var bigint $downloaded
  47.      *
  48.      * @ORM\Column(name="downloaded", type="bigint", nullable=false)
  49.      */
  50.     private $downloaded = 0;
  51.  
  52.     /**
  53.      * @var bigint $uploaded
  54.      *
  55.      * @ORM\Column(name="uploaded", type="bigint", nullable=false)
  56.      */
  57.     private $uploaded = 0;
  58.    
  59.    
  60.     /**
  61.      * @ORM\OneToMany(targetEntity="XbtFiles", mappedBy="uploader")
  62.      */
  63.     protected $uploads;
  64.     /**
  65.      * @ORM\OneToMany(targetEntity="Comment", mappedBy="user")
  66.      */
  67.     protected $comments;
  68.  
  69.     public function __construct()
  70.     {
  71.         parent::__construct();
  72.         $this->uploads =  new  ArrayCollection();
  73.         $this->comments = new  ArrayCollection();
  74.         //$this->groups =   new  ArrayCollection();
  75.     }
  76.  
  77.     /**
  78.      * Get id
  79.      *
  80.      * @return integer
  81.      */
  82.     public function getId()
  83.     {
  84.         return $this->id;
  85.     }
  86.  
  87.     /**
  88.      * Set torrentPassVersion
  89.      *
  90.      * @param integer $torrentPassVersion
  91.      */
  92.     public function setTorrentPassVersion($torrentPassVersion)
  93.     {
  94.         $this->torrentPassVersion = $torrentPassVersion;
  95.     }
  96.  
  97.     /**
  98.      * Get torrentPassVersion
  99.      *
  100.      * @return integer
  101.      */
  102.     public function getTorrentPassVersion()
  103.     {
  104.         return $this->torrentPassVersion;
  105.     }
  106.  
  107.     /**
  108.      * Set torrentPass
  109.      *
  110.      * @param string $torrentPass
  111.      */
  112.     public function setTorrentPass($torrentPass)
  113.     {
  114.         $this->torrentPass = $torrentPass;
  115.     }
  116.  
  117.     /**
  118.      * Get torrentPass
  119.      *
  120.      * @return string
  121.      */
  122.     public function getTorrentPass()
  123.     {
  124.         return $this->torrentPass;
  125.     }
  126.  
  127.     /**
  128.      * Set downloaded
  129.      *
  130.      * @param bigint $downloaded
  131.      */
  132.     public function setDownloaded($downloaded)
  133.     {
  134.         $this->downloaded = $downloaded;
  135.     }
  136.  
  137.     /**
  138.      * Get downloaded
  139.      *
  140.      * @return bigint
  141.      */
  142.     public function getDownloaded()
  143.     {
  144.         return $this->downloaded;
  145.     }
  146.  
  147.     /**
  148.      * Set uploaded
  149.      *
  150.      * @param bigint $uploaded
  151.      */
  152.     public function setUploaded($uploaded)
  153.     {
  154.         $this->uploaded = $uploaded;
  155.     }
  156.  
  157.     /**
  158.      * Get uploaded
  159.      *
  160.      * @return bigint
  161.      */
  162.     public function getUploaded()
  163.     {
  164.         return $this->uploaded;
  165.     }
  166.  
  167.     /**
  168.      * Add uploads
  169.      *
  170.      * @param Tracker\MembersBundle\Entity\XbtFiles $uploads
  171.      */
  172.     public function addXbtFiles(\Tracker\MembersBundle\Entity\XbtFiles $uploads)
  173.     {
  174.         $this->uploads[] = $uploads;
  175.     }
  176.  
  177.     /**
  178.      * Get uploads
  179.      *
  180.      * @return Doctrine\Common\Collections\Collection
  181.      */
  182.     public function getUploads()
  183.     {
  184.         return $this->uploads;
  185.     }
  186.  
  187.     /**
  188.      * Add comments
  189.      *
  190.      * @param Tracker\MembersBundle\Entity\Comment $comments
  191.      */
  192.     public function addComment(\Tracker\MembersBundle\Entity\Comment $comments)
  193.     {
  194.         $this->comments[] = $comments;
  195.     }
  196.  
  197.     /**
  198.      * Get comments
  199.      *
  200.      * @return Doctrine\Common\Collections\Collection
  201.      */
  202.     public function getComments()
  203.     {
  204.         return $this->comments;
  205.     }
  206.  
  207.  
  208.  
  209.     /**
  210.      * Get groups
  211.      *
  212.      * @return Doctrine\Common\Collections\Collection
  213.      */
  214.     public function getGroups()
  215.     {
  216.         return $this->groups;
  217.     }
  218.  
  219.  
  220.  
  221.     /**
  222.      * Add groups
  223.      *
  224.      * @param Tracker\MembersBundle\Entity\Group $groups
  225.      */
  226.     public function addGroup(\Tracker\MembersBundle\Entity\Group $groups)
  227.     {
  228.         $this->groups[] = $groups;
  229.     }
  230. }
Advertisement
Add Comment
Please, Sign In to add comment