Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace models;
- /**
- * @Entity
- * @Table(name="matches")
- */
- class Matches {
- /**
- * @Id
- * @Column(type="integer", nullable=false)
- * @GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @ManyToOne(targetEntity="Season", inversedBy="matches")
- * @Column(type="integer", nullable=false)
- */
- protected $season_id;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $league_id;
- /**
- * @Column(type="datetime", nullable=false)
- */
- protected $play_date;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $play_time;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $week;
- /**
- * @Column(type="integer", nullable=false)
- */
- protected $status;
- /**
- * @OneToMany(targetEntity="ClubsMatches", mappedBy="match_id")
- */
- protected $clubsmatches;
- // GETTERS & SETTERS
- public function setSeason_id(Season $season) {
- if( $season === null || $season instanceof Season ) {
- $this->season_id = $season;
- } else {
- throw new InvalidArgumentException($season . ' must be instance of Entity\Season or null');
- }
- }
- public function getSeason_id() {
- return $this->season_id;
- }
- public function setLeague_id($id) {
- $this->league_id = $id;
- }
- public function getLeague_id() {
- return $this->league_id;
- }
- public function setPlay_date($date) {
- $this->play_date = $date;
- }
- public function getPlay_date() {
- return $this->play_date;
- }
- public function setPlay_time($time) {
- $this->play_time = $time;
- }
- public function getPlay_time() {
- return $this->play_time;
- }
- public function setWeek($week) {
- $this->week = $week;
- }
- public function getWeek() {
- return $this->week;
- }
- public function setStatus($status) {
- $this->status = $status;
- }
- public function getStats() {
- return $this->status;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement