src/Entity/Service.php line 15
<?phpnamespace App\Entity;use App\Repository\ServiceRepository;use App\Trait\ActivableTrait;use App\Trait\CurrentStateTrait;use App\Trait\DateTrait;use App\Trait\DeletableTrait;use DateTimeImmutable;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ServiceRepository::class)]class Service{use DateTrait;use ActivableTrait;use CurrentStateTrait;use DeletableTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255, nullable: true)]private ?string $slug = null;#[ORM\Column(type: Types::TEXT)]private ?string $content = null;#[ORM\ManyToOne(cascade: ["persist"])]#[ORM\JoinColumn(nullable: false)]private ?Attachment $thumbnail = null;#[ORM\Column]private ?float $price = null;#[ORM\Column]private ?bool $isPromote = null;#[ORM\Column(nullable: true)]private ?float $promotePrice = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?Currency $currency = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?Department $department = null;#[ORM\ManyToOne(inversedBy: 'services')]#[ORM\JoinColumn(nullable: false)]private ?User $author = null;public function __construct(){if (is_null($this->createdAt)) $this->createdAt = new DateTimeImmutable();$this->updatedAt = new DateTimeImmutable();}public function getId(): ?int{return $this->id;}/*** @param int|null $id** @return $this*/public function setId(?int $id): self{$this->id = $id;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getSlug(): ?string{return $this->slug;}public function setSlug(?string $slug): self{$this->slug = $slug;return $this;}public function getContent(): ?string{return $this->content;}public function setContent(string $content): self{$this->content = $content;return $this;}public function getThumbnail(): ?Attachment{return $this->thumbnail;}public function setThumbnail(?Attachment $thumbnail): self{$this->thumbnail = $thumbnail;return $this;}public function getAmount(): ?float{return $this->price;}public function setPrice(float $price): self{$this->price = $price;return $this;}public function isIsPromote(): ?bool{return $this->isPromote;}public function setIsPromote(bool $isPromote): self{$this->isPromote = $isPromote;return $this;}public function getPromotePrice(): ?float{return $this->promotePrice;}public function setPromotePrice(?float $promotePrice): self{$this->promotePrice = $promotePrice;return $this;}public function getCurrency(): ?Currency{return $this->currency;}public function setCurrency(?Currency $currency): self{$this->currency = $currency;return $this;}public function getDepartment(): ?Department{return $this->department;}public function setDepartment(?Department $department): self{$this->department = $department;return $this;}public function getAuthor(): ?User{return $this->author;}public function setAuthor(?User $author): self{$this->author = $author;return $this;}public function __toString(): string{return $this->name;}}