Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace models;
- /**
- * @Entity
- * @Table(name="categories")
- */
- class Categories {
- /**
- * @Id
- * @Column(name="id", type="integer", nullable=false)
- * @GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @ManyToOne(targetEntity="Languages")
- */
- protected $languages;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $parent_id;
- /**
- * @Column(type="string", length="255", nullable=false)
- */
- protected $title;
- /* Setters & Getters */
- public function getId(){ return $this->id; }
- public function setLanguage($id){ $this->languages = (int)$id; }
- public function getLanguage(){ return $this->languages; }
- public function setParentId($parent){ $this->parent_id = $parent; }
- public function getParentId(){ return $this->parent_id; }
- public function setTitle($title){ $this->title = $title; }
- public function getTitle(){ return $this->title; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement