Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Entities;
- /**
- * @Entity
- * @Table(name="clubs")
- */
- class Clubs {
- /**
- * @Id
- * @Column(type="integer", nullable=false)
- * @GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @OneToOne(targetEntity="League", inversedBy="club")
- * @JoinColumn(name="league_id", referencedColumnName="id")
- * @Column(type="integer", nullable=false)
- */
- protected $league_id;
- /**
- * @Column(type="string", length="255", nullable=false)
- */
- protected $title;
- /**
- * @Column(type="string", length="255", nullable=false)
- */
- protected $logo;
- /**
- * @Column(type="datetime", nullable=false)
- */
- protected $cdate;
- /**
- * @Column(type="datetime", nullable=false)
- */
- protected $mdate;
- /**
- * @OneToMany(targetEntity="ClubsMatches", mappedBy="club_id")
- */
- protected $clubsmatches;
- // GETTERS & SETTERS
- public function setLeague_id($league) {
- $this->league_id = $league;
- }
- public function getLeague_id() {
- return $this->league_id;
- }
- public function setTitle($title) {
- $this->title = (string)$title;
- }
- public function getTitle() {
- return $this->title;
- }
- public function setLogo($logo) {
- $this->logo = (string)$logo;
- }
- public function getLogo() {
- return $this->logo;
- }
- 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
Advertisement