src/Entity/CategorySetting.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CategorySettingRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: CategorySettingRepository::class)]
  6. class CategorySetting
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id = null;
  12.     
  13.     #[ORM\Column(nullable: true)]
  14.     private ?int $price = null;
  15.     #[ORM\Column(length: 255)]
  16.     private ?string $titleCategorySetting = null;
  17.     #[ORM\Column(length: 255)]
  18.     private ?string $textColor = null;
  19.     #[ORM\Column(length: 255)]
  20.     private ?string $backGroundColor = null;
  21.     #[ORM\Column(length: 255)]
  22.     private ?string $borderColor = null;
  23.     #[ORM\OneToOne(inversedBy: 'categorySetting', cascade: ['persist', 'remove'])]
  24.     #[ORM\JoinColumn(nullable: false)]
  25.     private ?Category $category = null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getPrice(): ?int
  31.     {
  32.         return $this->price;
  33.     }
  34.     public function setPrice(int $price): self
  35.     {
  36.         $this->price = $price;
  37.         return $this;
  38.     }
  39.     public function getTitleCategorySetting(): ?string
  40.     {
  41.         return $this->titleCategorySetting;
  42.     }
  43.     public function setTitleCategorySetting(string $titleCategorySetting): static
  44.     {
  45.         $this->titleCategorySetting = $titleCategorySetting;
  46.         return $this;
  47.     }
  48.     public function getBackGroundColor(): ?string
  49.     {
  50.         return $this->backGroundColor;
  51.     }
  52.     public function setBackGroundColor(string $backGroundColor): static
  53.     {
  54.         $this->backGroundColor = $backGroundColor;
  55.         return $this;
  56.     }
  57.     public function getBorderColor(): ?string
  58.     {
  59.         return $this->borderColor;
  60.     }
  61.     public function setBorderColor(string $borderColor): static
  62.     {
  63.         $this->borderColor = $borderColor;
  64.         return $this;
  65.     }
  66.     public function getTextColor(): ?string
  67.     {
  68.         return $this->textColor;
  69.     }
  70.     public function setTextColor(string $textColor): static
  71.     {
  72.         $this->textColor = $textColor;
  73.         return $this;
  74.     }
  75.     public function getCategory(): ?Category
  76.     {
  77.         return $this->category;
  78.     }
  79.     public function setCategory(Category $category): static
  80.     {
  81.         $this->category = $category;
  82.         return $this;
  83.     }
  84. }