| 1 | <?php |
||
| 13 | class Event |
||
| 14 | { |
||
| 15 | use ORMBehaviors\Timestampable\Timestampable; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | * |
||
| 20 | * @ORM\Id |
||
| 21 | * @ORM\Column(name="id", type="integer") |
||
| 22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 23 | */ |
||
| 24 | protected $id; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | * |
||
| 29 | * @Assert\NotBlank() |
||
| 30 | * @Assert\Length(max="191") |
||
| 31 | * |
||
| 32 | * @ORM\Column(type="string", length=191) |
||
| 33 | */ |
||
| 34 | protected $name; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var string |
||
| 38 | * |
||
| 39 | * @Assert\NotBlank() |
||
| 40 | * |
||
| 41 | * @ORM\Column(type="json") |
||
| 42 | */ |
||
| 43 | protected $body; |
||
| 44 | |||
| 45 | public function __construct(string $name, string $body) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getId(): ?int |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param int $id |
||
| 61 | * @return Event |
||
| 62 | */ |
||
| 63 | public function setId(int $id) : self |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getName(): string |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param string $name |
||
| 79 | * @return Event |
||
| 80 | */ |
||
| 81 | public function setName(string $name) : self |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function getBody(): string |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @param string $body |
||
| 97 | * @return Event |
||
| 98 | */ |
||
| 99 | public function setBody(string $body) : self |
||
| 104 | } |
||
| 105 |