|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace App\Entity; |
| 4 | + |
| 5 | +use Doctrine\ORM\Mapping as ORM; |
| 6 | + |
| 7 | +/** |
| 8 | + * Banner |
| 9 | + * |
| 10 | + * @ORM\Table(name="banner", indexes={@ORM\Index(name="banner_page", columns={"page_id"})}) |
| 11 | + * @ORM\Entity |
| 12 | + */ |
| 13 | +class Banner |
| 14 | +{ |
| 15 | + /** |
| 16 | + * @var integer |
| 17 | + * |
| 18 | + * @ORM\Column(name="id", type="integer", nullable=false) |
| 19 | + * @ORM\Id |
| 20 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
| 21 | + */ |
| 22 | + private $id; |
| 23 | + |
| 24 | + /** |
| 25 | + * @var string |
| 26 | + * |
| 27 | + * @ORM\Column(name="name_clean", type="string", length=50, nullable=false) |
| 28 | + */ |
| 29 | + private $nameClean; |
| 30 | + |
| 31 | + /** |
| 32 | + * @var string |
| 33 | + * |
| 34 | + * @ORM\Column(name="description", type="string", length=100, nullable=false) |
| 35 | + */ |
| 36 | + private $description; |
| 37 | + |
| 38 | + /** |
| 39 | + * @var string |
| 40 | + * |
| 41 | + * @ORM\Column(name="link", type="string", length=255, nullable=false) |
| 42 | + */ |
| 43 | + private $link; |
| 44 | + |
| 45 | + /** |
| 46 | + * @var string |
| 47 | + * |
| 48 | + * @ORM\Column(name="position", type="string", length=20, nullable=true) |
| 49 | + */ |
| 50 | + private $position; |
| 51 | + |
| 52 | + /** |
| 53 | + * @var \DateTime |
| 54 | + * |
| 55 | + * @ORM\Column(name="date_created", type="datetime", nullable=false) |
| 56 | + */ |
| 57 | + private $dateCreated = 'CURRENT_TIMESTAMP'; |
| 58 | + |
| 59 | + /** |
| 60 | + * @var \DateTime |
| 61 | + * |
| 62 | + * @ORM\Column(name="interval_init", type="datetime", nullable=true) |
| 63 | + */ |
| 64 | + private $intervalInit; |
| 65 | + |
| 66 | + /** |
| 67 | + * @var \DateTime |
| 68 | + * |
| 69 | + * @ORM\Column(name="interlval_end", type="datetime", nullable=true) |
| 70 | + */ |
| 71 | + private $interlvalEnd; |
| 72 | + |
| 73 | + /** |
| 74 | + * @var \App\Entity\Page |
| 75 | + * |
| 76 | + * @ORM\ManyToOne(targetEntity="App\Entity\Page") |
| 77 | + * @ORM\JoinColumns({ |
| 78 | + * @ORM\JoinColumn(name="page_id", referencedColumnName="id") |
| 79 | + * }) |
| 80 | + */ |
| 81 | + private $page; |
| 82 | + |
| 83 | + /** |
| 84 | + * @var ArrayCollection|BannerImageVideo[] |
| 85 | + * |
| 86 | + * @ORM\OneToMany(targetEntity="BannerImageVideo", mappedBy="banner") |
| 87 | + */ |
| 88 | + private $resource; |
| 89 | + |
| 90 | + /** |
| 91 | + * Constructor |
| 92 | + */ |
| 93 | + public function __construct() |
| 94 | + { |
| 95 | + $this->resource = new ArrayCollection(); |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Get id |
| 100 | + * |
| 101 | + * @return integer |
| 102 | + */ |
| 103 | + public function getId() |
| 104 | + { |
| 105 | + return $this->id; |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * Set nameClean |
| 110 | + * |
| 111 | + * @param string $nameClean |
| 112 | + * |
| 113 | + * @return Banner |
| 114 | + */ |
| 115 | + public function setNameClean($nameClean) |
| 116 | + { |
| 117 | + $this->nameClean = $nameClean; |
| 118 | + |
| 119 | + return $this; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * Get nameClean |
| 124 | + * |
| 125 | + * @return string |
| 126 | + */ |
| 127 | + public function getNameClean() |
| 128 | + { |
| 129 | + return $this->nameClean; |
| 130 | + } |
| 131 | + |
| 132 | + /** |
| 133 | + * Set description |
| 134 | + * |
| 135 | + * @param string $description |
| 136 | + * |
| 137 | + * @return Banner |
| 138 | + */ |
| 139 | + public function setDescription($description) |
| 140 | + { |
| 141 | + $this->description = $description; |
| 142 | + |
| 143 | + return $this; |
| 144 | + } |
| 145 | + |
| 146 | + /** |
| 147 | + * Get description |
| 148 | + * |
| 149 | + * @return string |
| 150 | + */ |
| 151 | + public function getDescription() |
| 152 | + { |
| 153 | + return $this->description; |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * Set link |
| 158 | + * |
| 159 | + * @param string $link |
| 160 | + * |
| 161 | + * @return Banner |
| 162 | + */ |
| 163 | + public function setLink($link) |
| 164 | + { |
| 165 | + $this->link = $link; |
| 166 | + |
| 167 | + return $this; |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * Get link |
| 172 | + * |
| 173 | + * @return string |
| 174 | + */ |
| 175 | + public function getLink() |
| 176 | + { |
| 177 | + return $this->link; |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * Set position |
| 182 | + * |
| 183 | + * @param string $position |
| 184 | + * |
| 185 | + * @return Banner |
| 186 | + */ |
| 187 | + public function setPosition($position) |
| 188 | + { |
| 189 | + $this->position = $position; |
| 190 | + |
| 191 | + return $this; |
| 192 | + } |
| 193 | + |
| 194 | + /** |
| 195 | + * Get position |
| 196 | + * |
| 197 | + * @return string |
| 198 | + */ |
| 199 | + public function getPosition() |
| 200 | + { |
| 201 | + return $this->position; |
| 202 | + } |
| 203 | + |
| 204 | + /** |
| 205 | + * Set dateCreated |
| 206 | + * |
| 207 | + * @param \DateTime $dateCreated |
| 208 | + * |
| 209 | + * @return Banner |
| 210 | + */ |
| 211 | + public function setDateCreated($dateCreated) |
| 212 | + { |
| 213 | + $this->dateCreated = $dateCreated; |
| 214 | + |
| 215 | + return $this; |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * Get dateCreated |
| 220 | + * |
| 221 | + * @return \DateTime |
| 222 | + */ |
| 223 | + public function getDateCreated() |
| 224 | + { |
| 225 | + return $this->dateCreated; |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * Set intervalInit |
| 230 | + * |
| 231 | + * @param \DateTime $intervalInit |
| 232 | + * |
| 233 | + * @return Banner |
| 234 | + */ |
| 235 | + public function setIntervalInit($intervalInit) |
| 236 | + { |
| 237 | + $this->intervalInit = $intervalInit; |
| 238 | + |
| 239 | + return $this; |
| 240 | + } |
| 241 | + |
| 242 | + /** |
| 243 | + * Get intervalInit |
| 244 | + * |
| 245 | + * @return \DateTime |
| 246 | + */ |
| 247 | + public function getIntervalInit() |
| 248 | + { |
| 249 | + return $this->intervalInit; |
| 250 | + } |
| 251 | + |
| 252 | + /** |
| 253 | + * Set interlvalEnd |
| 254 | + * |
| 255 | + * @param \DateTime $interlvalEnd |
| 256 | + * |
| 257 | + * @return Banner |
| 258 | + */ |
| 259 | + public function setInterlvalEnd($interlvalEnd) |
| 260 | + { |
| 261 | + $this->interlvalEnd = $interlvalEnd; |
| 262 | + |
| 263 | + return $this; |
| 264 | + } |
| 265 | + |
| 266 | + /** |
| 267 | + * Get interlvalEnd |
| 268 | + * |
| 269 | + * @return \DateTime |
| 270 | + */ |
| 271 | + public function getInterlvalEnd() |
| 272 | + { |
| 273 | + return $this->interlvalEnd; |
| 274 | + } |
| 275 | + |
| 276 | + /** |
| 277 | + * Set page |
| 278 | + * |
| 279 | + * @param \App\Entity\Page $page |
| 280 | + * |
| 281 | + * @return Banner |
| 282 | + */ |
| 283 | + public function setPage(\App\Entity\Page $page = null) |
| 284 | + { |
| 285 | + $this->page = $page; |
| 286 | + |
| 287 | + return $this; |
| 288 | + } |
| 289 | + |
| 290 | + /** |
| 291 | + * Get page |
| 292 | + * |
| 293 | + * @return \App\Entity\Page |
| 294 | + */ |
| 295 | + public function getPage() |
| 296 | + { |
| 297 | + return $this->page; |
| 298 | + } |
| 299 | + |
| 300 | + /** |
| 301 | + * @return ArrayCollection|BannerImageVideo[] |
| 302 | + */ |
| 303 | + public function getResource() { |
| 304 | + return $this->resource; |
| 305 | + } |
| 306 | + |
| 307 | + /** |
| 308 | + * @param ArrayCollection|BannerImageVideo[] $resource |
| 309 | + */ |
| 310 | + public function setResource($resource) { |
| 311 | + $this->resource = $resource; |
| 312 | + } |
| 313 | +} |
0 commit comments