Puzo

Doctrine 2: League entity

Jan 9th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.78 KB | None | 0 0
  1. <?php
  2. namespace Entities;
  3.  
  4. /**
  5.  * @Entity
  6.  * @Table(name="league")
  7.  */
  8. class League {
  9.     /**
  10.      * @Id
  11.      * @Column(type="integer", nullable=false)
  12.      * @GeneratedValue(strategy="AUTO")
  13.      */
  14.     protected $id;
  15.      
  16.     /**
  17.      * @Column(type="integer", nullable=false)
  18.      */
  19.     protected $parent_id;
  20.    
  21.     /**
  22.      * @Column(type="string", length="255", nullable=false)
  23.      */
  24.     protected $title;
  25.    
  26.     /**
  27.      * @Column(type="string", length="255", nullable=true)
  28.      */
  29.     protected $icon;
  30.    
  31.     /**
  32.      * @Column(type="integer", length="2", nullable=false)
  33.      */
  34.     protected $order;
  35.    
  36.     /**
  37.      * @Column(type="datetime", nullable=false)
  38.      */
  39.     protected $cdate;
  40.    
  41.     /**
  42.      * @Column(type="datetime", nullable=false)
  43.      */
  44.     protected $mdate;
  45.    
  46.     /**
  47.      * @OneToOne(targetEntity="Clubs", mappedBy="league_id")
  48.      */
  49.     protected $club;
  50.    
  51.     /**
  52.      * @OneToOne(targetEntity="Matches", mappedBy="league_id")
  53.      */
  54.     protected $match;
  55.    
  56.    
  57.     // GETTERS & SETTERS
  58.     public function setParent_id($parent_id) {
  59.         $this->parent_id = $parent_id;
  60.     }
  61.      
  62.     public function getParent_id() {
  63.         return $this->parent_id;
  64.     }
  65.    
  66.     public function setTitle($title) {
  67.         $this->title = (string)$title;
  68.     }
  69.      
  70.     public function getTitle() {
  71.         return $this->title;
  72.     }
  73.    
  74.     public function setIcon($icon) {
  75.         $this->icon = (string)$icon;
  76.     }
  77.      
  78.     public function getIcon() {
  79.         return $this->icon;
  80.     }
  81.    
  82.     public function setOrder($order) {
  83.         $this->order = $order;
  84.     }
  85.      
  86.     public function getOrder() {
  87.         return $this->order;
  88.     }
  89.    
  90.     public function setCdate($date) {
  91.         $this->cdate = $date;
  92.     }
  93.      
  94.     public function getCdate() {
  95.         return $this->cdate;
  96.     }
  97.    
  98.     public function setMdate($date) {
  99.         $this->mdate = $date;
  100.     }
  101.      
  102.     public function getMdate() {
  103.         return $this->mdate;
  104.     }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment