client/src/MobicoopBundle/Communication/Entity/Report.php
<?php
/**
* Copyright (c) 2019, MOBICOOP. All rights reserved.
* This project is dual licensed under AGPL and proprietary licence.
***************************
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <gnu.org/licenses>.
***************************
* Licence MOBICOOP described in the file
* LICENSE
**************************/
namespace Mobicoop\Bundle\MobicoopBundle\Communication\Entity;
use Mobicoop\Bundle\MobicoopBundle\Api\Entity\ResourceInterface;
use Mobicoop\Bundle\MobicoopBundle\Event\Entity\Event;
use Mobicoop\Bundle\MobicoopBundle\User\Entity\User;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* A Report (User, Event...)
*/
class Report implements ResourceInterface
{
/**
* @var int The id of the Report
*/
private $id;
/**
* @var string|null Email of the reporter
* @Groups({"post"})
*/
private $reporterEmail;
/**
* @var string|null Text of the Report
* @Groups({"post"})
*/
private $text;
/**
* @var int|null userId If the report is about a User
* @Groups({"post"})
*/
private $userId;
/**
* @var int|null eventId If the report is about an Event
* @Groups({"post"})
*/
private $eventId;
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
public function getUserId(): ?int
{
return $this->userId;
}
public function setUserId(int $userId): self
{
$this->userId = $userId;
return $this;
}
public function getEventId(): ?int
{
return $this->eventId;
}
public function setEventId(int $eventId): self
{
$this->eventId = $eventId;
return $this;
}
public function getReporterEmail(): ?string
{
return $this->reporterEmail;
}
public function setReporterEmail(string $reporterEmail): self
{
$this->reporterEmail = $reporterEmail;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(string $text): self
{
$this->text = $text;
return $this;
}
}