Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Entities;
- use Doctrine\Common\Collections\ArrayCollection;
- /** @Entity
- * @Table(name="affilates")
- */
- class User
- {
- /**
- * @Id @Column(type="integer")
- * @GeneratedValue
- */
- private $id;
- /** @Column */
- private $name;
- /** @Column */
- private $description;
- /** @OneToMany(targetEntity="Goods", mappedBy="User") */
- private $goods;
- public function setName($name){
- $this->name = $name;
- }
- public function getName(){
- return $this->name;
- }
- public function getGoods(){
- return $this->goods;
- }
- public function __construct()
- {
- $this->goods = new ArrayCollection();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement