Advertisement
Fyaskostyler

User entity

Mar 22nd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.87 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Entity;
  4.  
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Kdyby\Doctrine;
  8. use Nette\Security\Passwords;
  9.  
  10. /**
  11.  * @ORM\Entity
  12.  * @ORM\Table(name="users")
  13.  *
  14.  */
  15. class User extends Doctrine\Entities\BaseEntity
  16. {
  17.     const ROLE_ADMIN = 'admin';
  18.     const ROLE_GUEST = 'guest';
  19.  
  20.     use Doctrine\Entities\Attributes\Identifier;
  21.  
  22.     public $user;
  23.  
  24.     /** @ORM\Column(type="string", length=100) */
  25.     protected $password;
  26.  
  27.     /** @ORM\Column(unique=TRUE, type="string", length=100) */
  28.     protected $email;
  29.  
  30.     /** @ORM\Column(type="enum", columnDefinition="enum('admin','guest') NOT NULL") */
  31.     protected $role;
  32.  
  33.     /** @ORM\Column(unique=TRUE, type="string", length=100, nullable=true) */
  34.     protected $username;
  35.  
  36.     /** @ORM\Column(type="string", length=100, nullable=true) */
  37.     public $name;
  38.  
  39.     /** @ORM\Column(type="string", length=100, nullable=true) */
  40.     public $lastname;
  41.  
  42.     /** @ORM\Column(type="integer", nullable=true) */
  43.     public $realname_showed;
  44.  
  45.     /** @ORM\Column(type="string", length=100, nullable=true) */
  46.     public $avatar;
  47.  
  48.     /** @ORM\Column(type="integer", nullable=true) */
  49.     public $gender;
  50.  
  51.     /** @ORM\Column(type="integer", nullable=true) */
  52.     public $gender_showed;
  53.  
  54.     /** @ORM\Column(type="datetime") */
  55.     public $registered;
  56.  
  57.     /** @ORM\Column(type="datetime", nullable=true) */
  58.     public $last_login;
  59.  
  60.     /** @ORM\Column(type="integer", nullable=true) */
  61.     public $activated;
  62.  
  63.     /** @ORM\Column(type="datetime", nullable=true) */
  64.     public $birthday;
  65.  
  66.     /** @ORM\Column(type="integer", nullable=true) */
  67.     public $birthday_showed;
  68.  
  69.     /** @ORM\Column(type="integer", nullable=true) */
  70.     public $age_showed;
  71.  
  72.     /** @ORM\Column(type="string", length=100, nullable=true) */
  73.     public $state;
  74.  
  75.     /** @ORM\Column(type="string", length=100, nullable=true) */
  76.     public $city;
  77.  
  78.     /** @ORM\Column(type="integer", nullable=true) */
  79.     public $address_showed;
  80.  
  81.     /** @ORM\Column(type="string", length=250, nullable=true) */
  82.     public $about_me;
  83.  
  84.     /** @ORM\Column(type="string", length=64, nullable=true) */
  85.     public $token;
  86.  
  87.     /** @ORM\Column(type="string", length=100, nullable=true) */
  88.     public $mb;
  89.  
  90.     /** @ORM\Column(type="string", length=100, nullable=true) */
  91.     public $cpu;
  92.  
  93.     /** @ORM\Column(type="string", length=100, nullable=true) */
  94.     public $gpu;
  95.  
  96.     /** @ORM\Column(type="string", length=100, nullable=true) */
  97.     public $rams;
  98.  
  99.     /** @ORM\Column(type="string", length=100, nullable=true) */
  100.     public $monitors;
  101.  
  102.     /** @ORM\Column(type="string", length=100, nullable=true) */
  103.     public $keyboard;
  104.  
  105.     /** @ORM\Column(type="string", length=100, nullable=true) */
  106.     public $mouse;
  107.  
  108.     /** @ORM\Column(type="string", length=100, nullable=true) */
  109.     public $headset;
  110.  
  111.     /** @ORM\Column(type="string", length=100, nullable=true) */
  112.     public $os;
  113.  
  114.     /**
  115.      * @ORM\OneToMany(targetEntity="UserYoutubeVideo", mappedBy="user", orphanRemoval=true, cascade={"persist", "remove"})
  116.      */
  117.     public $video;
  118.  
  119.     /**
  120.      * @ORM\OneToMany(targetEntity="UserImage", mappedBy="user")
  121.      */
  122.     public $image;
  123.  
  124.     /** @ORM\Column(type="integer", nullable=true) */
  125.     public $images_showed;
  126.  
  127.     /** @ORM\Column(type="integer", nullable=true) */
  128.     public $videos_showed;
  129.  
  130.     /** @ORM\Column(type="integer", nullable=true) */
  131.     public $rating;
  132.  
  133.     /**
  134.      * @ORM\OneToMany(targetEntity="Friend", mappedBy="user", orphanRemoval=true, cascade={"persist", "remove"})
  135.      */
  136.     public $friendUser;
  137.  
  138.     /**
  139.      * @ORM\OneToMany(targetEntity="Friend", mappedBy="user", orphanRemoval=true, cascade={"persist", "remove"})
  140.      */
  141.     public $friendUserFriend;
  142.  
  143.     /**
  144.      * @ORM\OneToMany(targetEntity="Guestbook", mappedBy="user", orphanRemoval=true, cascade={"persist", "remove"})
  145.      */
  146.     public $from;
  147.  
  148.     /**
  149.      * @ORM\OneToMany(targetEntity="Guestbook", mappedBy="user", orphanRemoval=true, cascade={"persist", "remove"})
  150.      */
  151.     public $for;
  152.  
  153.     /** @ORM\Column(type="string", length=500, nullable=true) */
  154.     public $forum_sign;
  155.  
  156.     /**
  157.      * @return mixed
  158.      */
  159.     public function getUser()
  160.     {
  161.         return $this->user;
  162.     }
  163.  
  164.     /**
  165.      * @param mixed $user
  166.      */
  167.     public function setUser($user)
  168.     {
  169.         $this->user = $user;
  170.     }
  171.  
  172.     /**
  173.      * @return mixed
  174.      */
  175.     public function getPassword()
  176.     {
  177.         return $this->password;
  178.     }
  179.  
  180.     /**
  181.      * @param mixed $password
  182.      */
  183.     public function setPassword($password)
  184.     {
  185.         $this->password = $password;
  186.     }
  187.  
  188.     /**
  189.      * @return mixed
  190.      */
  191.     public function getEmail()
  192.     {
  193.         return $this->email;
  194.     }
  195.  
  196.     /**
  197.      * @param mixed $email
  198.      */
  199.     public function setEmail($email)
  200.     {
  201.         $this->email = $email;
  202.     }
  203.  
  204.     /**
  205.      * @return mixed
  206.      */
  207.     public function getRole()
  208.     {
  209.         return $this->role;
  210.     }
  211.  
  212.     /**
  213.      * @param mixed $role
  214.      */
  215.     public function setRole($role)
  216.     {
  217.         $this->role = $role;
  218.     }
  219.  
  220.     /**
  221.      * @return mixed
  222.      */
  223.     public function getUsername()
  224.     {
  225.         return $this->username;
  226.     }
  227.  
  228.     /**
  229.      * @param mixed $username
  230.      */
  231.     public function setUsername($username)
  232.     {
  233.         $this->username = $username;
  234.     }
  235.  
  236.     /**
  237.      * @return mixed
  238.      */
  239.     public function getName()
  240.     {
  241.         return $this->name;
  242.     }
  243.  
  244.     /**
  245.      * @param mixed $name
  246.      */
  247.     public function setName($name)
  248.     {
  249.         $this->name = $name;
  250.     }
  251.  
  252.     /**
  253.      * @return mixed
  254.      */
  255.     public function getLastname()
  256.     {
  257.         return $this->lastname;
  258.     }
  259.  
  260.     /**
  261.      * @param mixed $lastname
  262.      */
  263.     public function setLastname($lastname)
  264.     {
  265.         $this->lastname = $lastname;
  266.     }
  267.  
  268.     /**
  269.      * @return mixed
  270.      */
  271.     public function getRealnameShowed()
  272.     {
  273.         return $this->realname_showed;
  274.     }
  275.  
  276.     /**
  277.      * @param mixed $realname_showed
  278.      */
  279.     public function setRealnameShowed($realname_showed)
  280.     {
  281.         $this->realname_showed = $realname_showed;
  282.     }
  283.  
  284.     /**
  285.      * @return mixed
  286.      */
  287.     public function getAvatar()
  288.     {
  289.         return $this->avatar;
  290.     }
  291.  
  292.     /**
  293.      * @param mixed $avatar
  294.      */
  295.     public function setAvatar($avatar)
  296.     {
  297.         $this->avatar = $avatar;
  298.     }
  299.  
  300.     /**
  301.      * @return mixed
  302.      */
  303.     public function getGender()
  304.     {
  305.         return $this->gender;
  306.     }
  307.  
  308.     /**
  309.      * @param mixed $gender
  310.      */
  311.     public function setGender($gender)
  312.     {
  313.         $this->gender = $gender;
  314.     }
  315.  
  316.     /**
  317.      * @return mixed
  318.      */
  319.     public function getGenderShowed()
  320.     {
  321.         return $this->gender_showed;
  322.     }
  323.  
  324.     /**
  325.      * @param mixed $gender_showed
  326.      */
  327.     public function setGenderShowed($gender_showed)
  328.     {
  329.         $this->gender_showed = $gender_showed;
  330.     }
  331.  
  332.     /**
  333.      * @return mixed
  334.      */
  335.     public function getRegistered()
  336.     {
  337.         return $this->registered;
  338.     }
  339.  
  340.     /**
  341.      * @param mixed $registered
  342.      */
  343.     public function setRegistered($registered)
  344.     {
  345.         $this->registered = $registered;
  346.     }
  347.  
  348.     /**
  349.      * @return mixed
  350.      */
  351.     public function getLastLogin()
  352.     {
  353.         return $this->last_login;
  354.     }
  355.  
  356.     /**
  357.      * @param mixed $last_login
  358.      */
  359.     public function setLastLogin($last_login)
  360.     {
  361.         $this->last_login = $last_login;
  362.     }
  363.  
  364.     /**
  365.      * @return mixed
  366.      */
  367.     public function getActivated()
  368.     {
  369.         return $this->activated;
  370.     }
  371.  
  372.     /**
  373.      * @param mixed $activated
  374.      */
  375.     public function setActivated($activated)
  376.     {
  377.         $this->activated = $activated;
  378.     }
  379.  
  380.     /**
  381.      * @return mixed
  382.      */
  383.     public function getBirthday()
  384.     {
  385.         return $this->birthday;
  386.     }
  387.  
  388.     /**
  389.      * @param mixed $birthday
  390.      */
  391.     public function setBirthday($birthday)
  392.     {
  393.         $this->birthday = $birthday;
  394.     }
  395.  
  396.     /**
  397.      * @return mixed
  398.      */
  399.     public function getBirthdayShowed()
  400.     {
  401.         return $this->birthday_showed;
  402.     }
  403.  
  404.     /**
  405.      * @param mixed $birthday_showed
  406.      */
  407.     public function setBirthdayShowed($birthday_showed)
  408.     {
  409.         $this->birthday_showed = $birthday_showed;
  410.     }
  411.  
  412.     /**
  413.      * @return mixed
  414.      */
  415.     public function getAgeShowed()
  416.     {
  417.         return $this->age_showed;
  418.     }
  419.  
  420.     /**
  421.      * @param mixed $age_showed
  422.      */
  423.     public function setAgeShowed($age_showed)
  424.     {
  425.         $this->age_showed = $age_showed;
  426.     }
  427.  
  428.     /**
  429.      * @return mixed
  430.      */
  431.     public function getState()
  432.     {
  433.         return $this->state;
  434.     }
  435.  
  436.     /**
  437.      * @param mixed $state
  438.      */
  439.     public function setState($state)
  440.     {
  441.         $this->state = $state;
  442.     }
  443.  
  444.     /**
  445.      * @return mixed
  446.      */
  447.     public function getCity()
  448.     {
  449.         return $this->city;
  450.     }
  451.  
  452.     /**
  453.      * @param mixed $city
  454.      */
  455.     public function setCity($city)
  456.     {
  457.         $this->city = $city;
  458.     }
  459.  
  460.     /**
  461.      * @return mixed
  462.      */
  463.     public function getAddressShowed()
  464.     {
  465.         return $this->address_showed;
  466.     }
  467.  
  468.     /**
  469.      * @param mixed $address_showed
  470.      */
  471.     public function setAddressShowed($address_showed)
  472.     {
  473.         $this->address_showed = $address_showed;
  474.     }
  475.  
  476.     /**
  477.      * @return mixed
  478.      */
  479.     public function getAboutMe()
  480.     {
  481.         return $this->about_me;
  482.     }
  483.  
  484.     /**
  485.      * @param mixed $about_me
  486.      */
  487.     public function setAboutMe($about_me)
  488.     {
  489.         $this->about_me = $about_me;
  490.     }
  491.  
  492.     /**
  493.      * @return mixed
  494.      */
  495.     public function getToken()
  496.     {
  497.         return $this->token;
  498.     }
  499.  
  500.     /**
  501.      * @param mixed $token
  502.      */
  503.     public function setToken($token)
  504.     {
  505.         $this->token = $token;
  506.     }
  507.  
  508.     /**
  509.      * @return mixed
  510.      */
  511.     public function getMb()
  512.     {
  513.         return $this->mb;
  514.     }
  515.  
  516.     /**
  517.      * @param mixed $mb
  518.      */
  519.     public function setMb($mb)
  520.     {
  521.         $this->mb = $mb;
  522.     }
  523.  
  524.     /**
  525.      * @return mixed
  526.      */
  527.     public function getCpu()
  528.     {
  529.         return $this->cpu;
  530.     }
  531.  
  532.     /**
  533.      * @param mixed $cpu
  534.      */
  535.     public function setCpu($cpu)
  536.     {
  537.         $this->cpu = $cpu;
  538.     }
  539.  
  540.     /**
  541.      * @return mixed
  542.      */
  543.     public function getGpu()
  544.     {
  545.         return $this->gpu;
  546.     }
  547.  
  548.     /**
  549.      * @param mixed $gpu
  550.      */
  551.     public function setGpu($gpu)
  552.     {
  553.         $this->gpu = $gpu;
  554.     }
  555.  
  556.     /**
  557.      * @return mixed
  558.      */
  559.     public function getRams()
  560.     {
  561.         return $this->rams;
  562.     }
  563.  
  564.     /**
  565.      * @param mixed $rams
  566.      */
  567.     public function setRams($rams)
  568.     {
  569.         $this->rams = $rams;
  570.     }
  571.  
  572.     /**
  573.      * @return mixed
  574.      */
  575.     public function getMonitors()
  576.     {
  577.         return $this->monitors;
  578.     }
  579.  
  580.     /**
  581.      * @param mixed $monitors
  582.      */
  583.     public function setMonitors($monitors)
  584.     {
  585.         $this->monitors = $monitors;
  586.     }
  587.  
  588.     /**
  589.      * @return mixed
  590.      */
  591.     public function getKeyboard()
  592.     {
  593.         return $this->keyboard;
  594.     }
  595.  
  596.     /**
  597.      * @param mixed $keyboard
  598.      */
  599.     public function setKeyboard($keyboard)
  600.     {
  601.         $this->keyboard = $keyboard;
  602.     }
  603.  
  604.     /**
  605.      * @return mixed
  606.      */
  607.     public function getMouse()
  608.     {
  609.         return $this->mouse;
  610.     }
  611.  
  612.     /**
  613.      * @param mixed $mouse
  614.      */
  615.     public function setMouse($mouse)
  616.     {
  617.         $this->mouse = $mouse;
  618.     }
  619.  
  620.     /**
  621.      * @return mixed
  622.      */
  623.     public function getHeadset()
  624.     {
  625.         return $this->headset;
  626.     }
  627.  
  628.     /**
  629.      * @param mixed $headset
  630.      */
  631.     public function setHeadset($headset)
  632.     {
  633.         $this->headset = $headset;
  634.     }
  635.  
  636.     /**
  637.      * @return mixed
  638.      */
  639.     public function getOs()
  640.     {
  641.         return $this->os;
  642.     }
  643.  
  644.     /**
  645.      * @param mixed $os
  646.      */
  647.     public function setOs($os)
  648.     {
  649.         $this->os = $os;
  650.     }
  651.  
  652.     /**
  653.      * @return mixed
  654.      */
  655.     public function getVideo()
  656.     {
  657.         return $this->video;
  658.     }
  659.  
  660.     /**
  661.      * @param mixed $video
  662.      */
  663.     public function setVideo($video)
  664.     {
  665.         $this->video = $video;
  666.     }
  667.  
  668.     /**
  669.      * @return mixed
  670.      */
  671.     public function getImage()
  672.     {
  673.         return $this->image;
  674.     }
  675.  
  676.     /**
  677.      * @param mixed $image
  678.      */
  679.     public function setImage($image)
  680.     {
  681.         $this->image = $image;
  682.     }
  683.  
  684.     /**
  685.      * @return mixed
  686.      */
  687.     public function getImagesShowed()
  688.     {
  689.         return $this->images_showed;
  690.     }
  691.  
  692.     /**
  693.      * @param mixed $images_showed
  694.      */
  695.     public function setImagesShowed($images_showed)
  696.     {
  697.         $this->images_showed = $images_showed;
  698.     }
  699.  
  700.     /**
  701.      * @return mixed
  702.      */
  703.     public function getVideosShowed()
  704.     {
  705.         return $this->videos_showed;
  706.     }
  707.  
  708.     /**
  709.      * @param mixed $videos_showed
  710.      */
  711.     public function setVideosShowed($videos_showed)
  712.     {
  713.         $this->videos_showed = $videos_showed;
  714.     }
  715.  
  716.     /**
  717.      * @return mixed
  718.      */
  719.     public function getRating()
  720.     {
  721.         return $this->rating;
  722.     }
  723.  
  724.     /**
  725.      * @param mixed $rating
  726.      */
  727.     public function setRating($rating)
  728.     {
  729.         $this->rating = $rating;
  730.     }
  731.  
  732.     /**
  733.      * @return mixed
  734.      */
  735.     public function getFriendUser()
  736.     {
  737.         return $this->friendUser;
  738.     }
  739.  
  740.     /**
  741.      * @param mixed $friendUser
  742.      */
  743.     public function setFriendUser($friendUser)
  744.     {
  745.         $this->friendUser = $friendUser;
  746.     }
  747.  
  748.     /**
  749.      * @return mixed
  750.      */
  751.     public function getFriendUserFriend()
  752.     {
  753.         return $this->friendUserFriend;
  754.     }
  755.  
  756.     /**
  757.      * @param mixed $friendUserFriend
  758.      */
  759.     public function setFriendUserFriend($friendUserFriend)
  760.     {
  761.         $this->friendUserFriend = $friendUserFriend;
  762.     }
  763.  
  764.     /**
  765.      * @return mixed
  766.      */
  767.     public function getFrom()
  768.     {
  769.         return $this->from;
  770.     }
  771.  
  772.     /**
  773.      * @param mixed $from
  774.      */
  775.     public function setFrom($from)
  776.     {
  777.         $this->from = $from;
  778.     }
  779.  
  780.     /**
  781.      * @return mixed
  782.      */
  783.     public function getFor()
  784.     {
  785.         return $this->for;
  786.     }
  787.  
  788.     /**
  789.      * @param mixed $for
  790.      */
  791.     public function setFor($for)
  792.     {
  793.         $this->for = $for;
  794.     }
  795.  
  796.     /**
  797.      * @return mixed
  798.      */
  799.     public function getForumSign()
  800.     {
  801.         return $this->forum_sign;
  802.     }
  803.  
  804.     /**
  805.      * @param mixed $forum_sign
  806.      */
  807.     public function setForumSign($forum_sign)
  808.     {
  809.         $this->forum_sign = $forum_sign;
  810.     }
  811.  
  812.  
  813. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement