<?php
namespace App\Entity;
use App\Repository\ReserveRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: ReserveRepository::class)]
#[ORM\Table(name: 'reserve', options: ["comment" => '予約管理テーブル'])]
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false)]
class Reserve
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 32, options: ["comment" => '名前'])]
#[Assert\NotBlank(message: "姓を入力して下さい")]
private ?string $firstName = null;
#[ORM\Column(length: 32, options: ["comment" => '名字'])]
#[Assert\NotBlank(message: "名を入力して下さい")]
private ?string $lastName = null;
#[ORM\Column(length: 15, options: ["comment" => '電話番号'])]
#[Assert\NotBlank(message: "電話番号を入力して下さい")]
private ?string $tel = null;
#[ORM\Column(length: 128, options: ["comment" => 'メールアドレス'])]
#[Assert\NotBlank(message: "メールアドレスを入力して下さい")]
#[Assert\Email(message: 'メールアドレス形式で入力して下さい')]
private ?string $mail = null;
#[ORM\Column(length: 255, options: ["comment" => '予約車種'])]
#[Assert\NotBlank(message: "車種を選択して下さい")]
private ?string $carModel = null;
#[ORM\Column(type: Types::DATE_MUTABLE, options: ["comment" => '出発日'])]
#[Assert\NotBlank(message: "出発日を入力して下さい")]
private ?\DateTimeInterface $startDate = null;
#[ORM\Column(type: Types::TIME_MUTABLE, options: ["comment" => '出発時間'])]
#[Assert\NotBlank(message: "出発時刻を入力して下さい")]
private ?\DateTimeInterface $startTime = null;
#[ORM\Column(type: Types::DATE_MUTABLE, options: ["comment" => '返却日'])]
#[Assert\NotBlank(message: "返却日を入力して下さい")]
private ?\DateTimeInterface $endDate = null;
#[ORM\Column(type: Types::TIME_MUTABLE, options: ["comment" => '返却時間'])]
#[Assert\NotBlank(message: "返却時刻を入力して下さい")]
private ?\DateTimeInterface $endTime = null;
#[ORM\Column(type: Types::TEXT, nullable: true, options: ["comment" => '備考'])]
private ?string $remarks = null;
#[ORM\Column(options: ["comment" => '状態'])]
private ?int $status = 0;
#[ORM\Column(options: ["comment" => '登録日時'])]
#[Gedmo\Timestampable(on: 'create')]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(options: ["comment" => '更新日時'])]
#[Gedmo\Timestampable(on: 'update')]
private ?\DateTimeImmutable $updatedAt = null;
#[ORM\Column(nullable: true, options: ["comment" => '削除日時'])]
private ?\DateTimeImmutable $deletedAt = null;
public function getId(): ?int
{
return $this->id;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getTel(): ?string
{
return $this->tel;
}
public function setTel(string $tel): self
{
$this->tel = $tel;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getCarModel(): ?string
{
return $this->carModel;
}
public function setCarModel(string $carModel): self
{
$this->carModel = $carModel;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(?\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getStartTime(): ?\DateTimeInterface
{
return $this->startTime;
}
public function setStartTime(?\DateTimeInterface $startTime): self
{
$this->startTime = $startTime;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getEndTime(): ?\DateTimeInterface
{
return $this->endTime;
}
public function setEndTime(?\DateTimeInterface $endTime): self
{
$this->endTime = $endTime;
return $this;
}
public function getRemarks(): ?string
{
return $this->remarks;
}
public function setRemarks(?string $remarks): self
{
$this->remarks = $remarks;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getDeletedAt(): ?\DateTimeImmutable
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeImmutable $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
}