<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\DateTimeTypeAnswerRepository")
*/
class DateTimeTypeAnswer
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"pinpointCampaign:list","surveyContribution:read"})
*/
private int $id;
/**
* @ORM\Column(type="simple_array")
* @ApiProperty(
* attributes={
* "jsonld_context"={
* "@type"="http://www.w3.org/2001/XMLSchema#array",
* }
* }
* )
* @Groups({"pinpointCampaign:list"})
*/
private $dateTime = [];
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(max=255)
* @Groups({"pinpointCampaign:list"})
*/
public string $errorMessage;
/**
* @ORM\Column(type="string", length=50, nullable=true)
* @Assert\Length(max=50)
* @Groups({"pinpointCampaign:list"})
*/
public string $dateFormat;
/**
* @var SurveyFormQuestion
*
* @ORM\OneToOne(targetEntity=SurveyFormQuestion::class, inversedBy="dateTimeTypeAnswer", cascade={"persist", "remove"})
*/
private $formQuestion;
public function getId(): ?int
{
return $this->id;
}
public function getDateTime(): ?array
{
return $this->dateTime;
}
public function setDateTime(array $dateTime): self
{
$this->dateTime = $dateTime;
return $this;
}
public function getErrorMessage(): ?string
{
return $this->errorMessage;
}
public function setErrorMessage(?string $errorMessage): self
{
$this->errorMessage = $errorMessage;
return $this;
}
public function getDateFormat(): ?string
{
return $this->dateFormat;
}
public function setDateFormat(?string $dateFormat): self
{
$this->dateFormat = $dateFormat;
return $this;
}
public function getFormQuestion(): ?SurveyFormQuestion
{
return $this->formQuestion;
}
public function setFormQuestion(?SurveyFormQuestion $formQuestion): self
{
$this->formQuestion = $formQuestion;
return $this;
}
}