Advertisement
Puzo

Doctrine 2: ClubsMatches entity

Jan 9th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.41 KB | None | 0 0
  1. <?php
  2. namespace models;
  3.  
  4. /**
  5.  * @Entity
  6.  * @Table(name="clubs_matches")
  7.  */
  8. class ClubsMatches {
  9.     /**
  10.      * @Id
  11.      * @Column(type="integer", nullable=false)
  12.      * @GeneratedValue(strategy="AUTO")
  13.      */
  14.     protected $id;
  15.      
  16.     /**
  17.      * @ManyToOne(targetEntitiy="Matches", inversedBy="clubsmatches")
  18.      * @JoinColumn(name="match_id", referencedColumnName="id")
  19.      * @Column(type="integer", nullable=false)
  20.      */
  21.     protected $match_id;
  22.      
  23.     /**
  24.      * @ManyToOne(targetEntitiy="Clubs", inversedBy="clubsmatches")
  25.      * @JoinColumn(name="club_id", referencedColumnName="id")
  26.      * @Column(type="integer", nullable=false)
  27.      */
  28.     protected $club_id;
  29.      
  30.     /**
  31.      * @Column(type="integer", length="3", nullable=false)
  32.      */
  33.     protected $score;
  34.    
  35.     /**
  36.      * @Column(type="integer", length="1", nullable=false)
  37.      */
  38.     protected $is_home;
  39.    
  40.    
  41.    
  42.     // GETTERS & SETTERS
  43.     public function setMatch_id($id) {
  44.         $this->match_id = $id;
  45.     }
  46.      
  47.     public function getMatch_id() {
  48.         return $this->match_id;
  49.     }
  50.    
  51.     public function setClub_id($id) {
  52.         $this->club_id = $id;
  53.     }
  54.      
  55.     public function getClub_id() {
  56.         return $this->club_id;
  57.     }
  58.    
  59.     public function setScore($score) {
  60.         $this->score = $score;
  61.     }
  62.      
  63.     public function getScore() {
  64.         return $this->score;
  65.     }
  66.    
  67.     public function setIs_home($is_home) {
  68.         $this->is_home = $is_home;
  69.     }
  70.      
  71.     public function getIs_home() {
  72.         return $this->is_home;
  73.     }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement