symfony-playground/src/Entity/MerSubBaseTrait.php

81 lines
1.5 KiB
PHP

<?php
namespace App\Entity;
use App\Enum\SubStatus;
use Doctrine\ORM\Mapping as ORM;
trait MerSubBaseTrait
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(enumType: SubStatus::class)]
private SubStatus $status;
#[ORM\ManyToOne(targetEntity: MerService::class)]
#[ORM\JoinColumn(nullable: false)]
private MerService $service;
#[ORM\Column(type: 'datetime_immutable')]
private $subDate;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private $unsubDate;
public function getId(): ?int
{
return $this->id;
}
public function getStatus(): SubStatus
{
return $this->status;
}
public function setStatus(SubStatus $status): self
{
$this->status = $status;
return $this;
}
public function getService(): ?MerService
{
return $this->service;
}
public function setService(?MerService $service): self
{
$this->service = $service;
return $this;
}
public function getSubDate(): ?\DateTimeImmutable
{
return $this->subDate;
}
public function setSubDate(\DateTimeImmutable $subDate): self
{
$this->subDate = $subDate;
return $this;
}
public function getUnsubDate(): ?\DateTimeImmutable
{
return $this->unsubDate;
}
public function setUnsubDate(?\DateTimeImmutable $unsubDate): self
{
$this->unsubDate = $unsubDate;
return $this;
}
}