src/Entity/Reserve.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ReserveRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClassReserveRepository::class)]
  9. #[ORM\Table(name'reserve'options: ["comment" => '予約管理テーブル'])]
  10. #[Gedmo\SoftDeleteable(fieldName'deletedAt'timeAwarefalse)]
  11. class Reserve
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length32options: ["comment" => '名前'])]
  18.     #[Assert\NotBlank(message"姓を入力して下さい")]
  19.     private ?string $firstName null;
  20.     #[ORM\Column(length32options: ["comment" => '名字'])]
  21.     #[Assert\NotBlank(message"名を入力して下さい")]
  22.     private ?string $lastName null;
  23.     #[ORM\Column(length15options: ["comment" => '電話番号'])]
  24.     #[Assert\NotBlank(message"電話番号を入力して下さい")]
  25.     private ?string $tel null;
  26.     #[ORM\Column(length128options: ["comment" => 'メールアドレス'])]
  27.     #[Assert\NotBlank(message"メールアドレスを入力して下さい")]
  28.     #[Assert\Email(message'メールアドレス形式で入力して下さい')]
  29.     private ?string $mail null;
  30.     #[ORM\Column(length255options: ["comment" => '予約車種'])]
  31.     #[Assert\NotBlank(message"車種を選択して下さい")]
  32.     private ?string $carModel null;
  33.     #[ORM\Column(typeTypes::DATE_MUTABLEoptions: ["comment" => '出発日'])]
  34.     #[Assert\NotBlank(message"出発日を入力して下さい")]
  35.     private ?\DateTimeInterface $startDate null;
  36.     #[ORM\Column(typeTypes::TIME_MUTABLEoptions: ["comment" => '出発時間'])]
  37.     #[Assert\NotBlank(message"出発時刻を入力して下さい")]
  38.     private ?\DateTimeInterface $startTime null;
  39.     #[ORM\Column(typeTypes::DATE_MUTABLEoptions: ["comment" => '返却日'])]
  40.     #[Assert\NotBlank(message"返却日を入力して下さい")]
  41.     private ?\DateTimeInterface $endDate null;
  42.     #[ORM\Column(typeTypes::TIME_MUTABLEoptions: ["comment" => '返却時間'])]
  43.     #[Assert\NotBlank(message"返却時刻を入力して下さい")]
  44.     private ?\DateTimeInterface $endTime null;
  45.     #[ORM\Column(typeTypes::TEXTnullabletrueoptions: ["comment" => '備考'])]
  46.     private ?string $remarks null;
  47.     #[ORM\Column(options: ["comment" => '状態'])]
  48.     private ?int $status 0;
  49.     #[ORM\Column(options: ["comment" => '登録日時'])]
  50.     #[Gedmo\Timestampable(on'create')]
  51.     private ?\DateTimeImmutable $createdAt null;
  52.     #[ORM\Column(options: ["comment" => '更新日時'])]
  53.     #[Gedmo\Timestampable(on'update')]
  54.     private ?\DateTimeImmutable $updatedAt null;
  55.     #[ORM\Column(nullabletrueoptions: ["comment" => '削除日時'])]
  56.     private ?\DateTimeImmutable $deletedAt null;
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getFirstName(): ?string
  62.     {
  63.         return $this->firstName;
  64.     }
  65.     public function setFirstName(string $firstName): self
  66.     {
  67.         $this->firstName $firstName;
  68.         return $this;
  69.     }
  70.     public function getLastName(): ?string
  71.     {
  72.         return $this->lastName;
  73.     }
  74.     public function setLastName(string $lastName): self
  75.     {
  76.         $this->lastName $lastName;
  77.         return $this;
  78.     }
  79.     public function getTel(): ?string
  80.     {
  81.         return $this->tel;
  82.     }
  83.     public function setTel(string $tel): self
  84.     {
  85.         $this->tel $tel;
  86.         return $this;
  87.     }
  88.     public function getMail(): ?string
  89.     {
  90.         return $this->mail;
  91.     }
  92.     public function setMail(string $mail): self
  93.     {
  94.         $this->mail $mail;
  95.         return $this;
  96.     }
  97.     public function getCarModel(): ?string
  98.     {
  99.         return $this->carModel;
  100.     }
  101.     public function setCarModel(string $carModel): self
  102.     {
  103.         $this->carModel $carModel;
  104.         return $this;
  105.     }
  106.     public function getStartDate(): ?\DateTimeInterface
  107.     {
  108.         return $this->startDate;
  109.     }
  110.     public function setStartDate(?\DateTimeInterface $startDate): self
  111.     {
  112.         $this->startDate $startDate;
  113.         return $this;
  114.     }
  115.     public function getStartTime(): ?\DateTimeInterface
  116.     {
  117.         return $this->startTime;
  118.     }
  119.     public function setStartTime(?\DateTimeInterface $startTime): self
  120.     {
  121.         $this->startTime $startTime;
  122.         return $this;
  123.     }
  124.     public function getEndDate(): ?\DateTimeInterface
  125.     {
  126.         return $this->endDate;
  127.     }
  128.     public function setEndDate(?\DateTimeInterface $endDate): self
  129.     {
  130.         $this->endDate $endDate;
  131.         return $this;
  132.     }
  133.     public function getEndTime(): ?\DateTimeInterface
  134.     {
  135.         return $this->endTime;
  136.     }
  137.     public function setEndTime(?\DateTimeInterface $endTime): self
  138.     {
  139.         $this->endTime $endTime;
  140.         return $this;
  141.     }
  142.     public function getRemarks(): ?string
  143.     {
  144.         return $this->remarks;
  145.     }
  146.     public function setRemarks(?string $remarks): self
  147.     {
  148.         $this->remarks $remarks;
  149.         return $this;
  150.     }
  151.     public function getStatus(): ?int
  152.     {
  153.         return $this->status;
  154.     }
  155.     public function setStatus(int $status): self
  156.     {
  157.         $this->status $status;
  158.         return $this;
  159.     }
  160.     public function getCreatedAt(): ?\DateTimeImmutable
  161.     {
  162.         return $this->createdAt;
  163.     }
  164.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  165.     {
  166.         $this->createdAt $createdAt;
  167.         return $this;
  168.     }
  169.     public function getUpdatedAt(): ?\DateTimeImmutable
  170.     {
  171.         return $this->updatedAt;
  172.     }
  173.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  174.     {
  175.         $this->updatedAt $updatedAt;
  176.         return $this;
  177.     }
  178.     public function getDeletedAt(): ?\DateTimeImmutable
  179.     {
  180.         return $this->deletedAt;
  181.     }
  182.     public function setDeletedAt(?\DateTimeImmutable $deletedAt): self
  183.     {
  184.         $this->deletedAt $deletedAt;
  185.         return $this;
  186.     }
  187. }