Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Entities;
- /**
- * @Entity
- * @Table(name="league")
- */
- class League {
- /**
- * @Id
- * @Column(type="integer", nullable=false)
- * @GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $parent_id;
- /**
- * @Column(type="string", length="255", nullable=false)
- */
- protected $title;
- /**
- * @Column(type="string", length="255", nullable=true)
- */
- protected $icon;
- /**
- * @Column(type="integer", length="2", nullable=false)
- */
- protected $order;
- /**
- * @Column(type="datetime", nullable=false)
- */
- protected $cdate;
- /**
- * @Column(type="datetime", nullable=false)
- */
- protected $mdate;
- /**
- * @OneToOne(targetEntity="Clubs", mappedBy="league_id")
- */
- protected $club;
- /**
- * @OneToOne(targetEntity="Matches", mappedBy="league_id")
- */
- protected $match;
- // GETTERS & SETTERS
- public function setParent_id($parent_id) {
- $this->parent_id = $parent_id;
- }
- public function getParent_id() {
- return $this->parent_id;
- }
- public function setTitle($title) {
- $this->title = (string)$title;
- }
- public function getTitle() {
- return $this->title;
- }
- public function setIcon($icon) {
- $this->icon = (string)$icon;
- }
- public function getIcon() {
- return $this->icon;
- }
- public function setOrder($order) {
- $this->order = $order;
- }
- public function getOrder() {
- return $this->order;
- }
- public function setCdate($date) {
- $this->cdate = $date;
- }
- public function getCdate() {
- return $this->cdate;
- }
- public function setMdate($date) {
- $this->mdate = $date;
- }
- public function getMdate() {
- return $this->mdate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment