resq/src/Entity/MotoliteEvent.php
2023-05-17 00:30:13 +08:00

123 lines
2 KiB
PHP

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use DateTime;
/**
* @ORM\Entity
* @ORM\Table(name="motolite_event")
*/
class MotoliteEvent
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=80)
* @Assert\NotBlank()
*/
protected $name;
/**
* @ORM\Column(type="string", length=80)
* @Assert\NotBlank()
*/
protected $event_type;
/**
* @ORM\Column(type="datetime")
* @Assert\NotBlank()
*/
protected $event_time;
/**
* @ORM\Column(type="string")
* @Assert\NotBlank()
*/
protected $url;
/**
* @ORM\Column(type="string")
* @Assert\NotBlank()
*/
protected $image_file;
public function __construct()
{
$this->event_time = new DateTime('today noon');
}
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getID()
{
return $this->id;
}
public function setID($id)
{
$this->id = $id;
return $this;
}
public function getName()
{
return $this->name;
}
public function setEventType($event_type)
{
$this->event_type = $event_type;
return $this;
}
public function getEventType()
{
return $this->event_type;
}
public function setEventTime($event_time)
{
$this->event_time = $event_time;
return $this;
}
public function setUrl($url)
{
$this->url = $url;
return $this;
}
public function getUrl()
{
return $this->url;
}
public function getEventTime()
{
return $this->event_time;
}
public function setImageFile($image_file = null)
{
$this->image_file = $image_file;
return $this;
}
public function getImageFile()
{
return $this->image_file;
}
}