Advertisement
Guest User

Untitled

a guest
Feb 27th, 2012
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <?php
  2. namespace Entities;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4.  
  5. /** @Entity
  6.  *  @Table(name="affilates")
  7.  */
  8. class User
  9. {
  10.     /**
  11.      * @Id @Column(type="integer")
  12.      * @GeneratedValue
  13.      */
  14.     private $id;
  15.      
  16.     /** @Column */
  17.     private $name;
  18.      
  19.     /** @Column */
  20.     private $description;
  21.    
  22.     /** @OneToMany(targetEntity="Goods", mappedBy="User") */
  23.     private $goods;
  24.    
  25.    
  26.     public function setName($name){
  27.        
  28.          $this->name = $name;
  29.    
  30.     }
  31.  
  32.     public function getName(){
  33.    
  34.         return $this->name;
  35.    
  36.     }
  37.    
  38.     public function getGoods(){
  39.    
  40.         return $this->goods;
  41.    
  42.     }
  43.    
  44.     public function __construct()
  45.     {
  46.         $this->goods = new ArrayCollection();
  47.     }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement