<?php
namespace App\Admin\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* StdOptions
*/
#[ORM\Table(name: 'std_options')]
#[ORM\Index(name: 'fk_std_options_std_users', columns: ['created_by'])]
#[ORM\Index(name: 'fk_std_options_std_users_0', columns: ['updated_by'])]
#[ORM\Entity]
class StdOptions
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer', nullable: false, options: ['unsigned' => true, 'comment' => 'Unique identifier'])]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private $id;
/**
* @var string
*/
#[ORM\Column(name: 'machine_name', type: 'string', length: 50, nullable: false, options: ['comment' => 'Unique code used in the programming to identify the option'])]
private $machineName;
/**
* @var string|null
*/
#[ORM\Column(name: 'name', type: 'string', length: 255, nullable: true, options: ['comment' => 'Name of the Option'])]
private $name;
/**
* @var string|null
*/
#[ORM\Column(name: 'menu_section', type: 'string', length: 255, nullable: true, options: ['comment' => 'Section of the option in the sidebar'])]
private $menuSection;
/**
* @var string|null
*/
#[ORM\Column(name: 'icon', type: 'string', length: 255, nullable: true, options: ['comment' => 'Icon of the option in the sidebar'])]
private $icon;
/**
* @var string|null
*/
#[ORM\Column(name: 'dropdown_section', type: 'string', length: 255, nullable: true, options: ['comment' => 'Section of the option in the sidebar'])]
private $dropdownSection;
/**
* @var int|null
*/
#[ORM\Column(name: 'order_value', type: 'integer', nullable: true, options: ['comment' => 'Order of the option on the menu'])]
private $orderValue = '0';
/**
* @var string|null
*/
#[ORM\Column(name: 'external_link', type: 'string', length: 255, nullable: true, options: ['comment' => 'Url of the option'])]
private $externalLink;
#[ORM\Column(name: 'path', type: 'string', length: 255, nullable: true, options: ['comment' => 'Url of the option'])]
private $path;
/**
* @var bool|null
*/
#[ORM\Column(name: 'is_active', type: 'boolean', nullable: true, options: ['default' => 1, 'comment' => 'Flag indicating if the option is active'])]
private $isActive = '1';
/**
* @var \DateTime
*/
#[ORM\Column(name: 'created_date', type: 'datetime', nullable: false, options: ['default' => 'CURRENT_TIMESTAMP', 'comment' => 'Date and time of the record creation'])]
private $createdDate = 'CURRENT_TIMESTAMP';
/**
* @var \DateTime
*/
#[ORM\Column(name: 'updated_date', type: 'datetime', nullable: false, options: ['default' => 'CURRENT_TIMESTAMP', 'comment' => 'Date and time the record was last updated'])]
private $updatedDate = 'CURRENT_TIMESTAMP';
/**
* @var \StdUsers
*/
#[ORM\JoinColumn(name: 'created_by', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: 'StdUsers')]
private $createdBy = null;
/**
* @var \StdUsers
*/
#[ORM\JoinColumn(name: 'updated_by', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: 'StdUsers')]
private $updatedBy;
#[ORM\OneToMany(mappedBy: 'option', targetEntity: StdOptionsPermissions::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $permissions;
public function __construct()
{
$this->permissions = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getMachineName(): ?string
{
return $this->machineName;
}
public function setMachineName(string $machineName): self
{
$this->machineName = $machineName;
return $this;
}
public function getOrderValue(): ?int
{
return $this->orderValue;
}
public function setOrderValue(?int $orderValue): self
{
$this->orderValue = $orderValue;
return $this;
}
public function getIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getCreatedDate(): ?\DateTimeInterface
{
return $this->createdDate;
}
public function setCreatedDate(\DateTimeInterface $createdDate): self
{
$this->createdDate = $createdDate;
return $this;
}
public function getUpdatedDate(): ?\DateTimeInterface
{
return $this->updatedDate;
}
public function setUpdatedDate(\DateTimeInterface $updatedDate): self
{
$this->updatedDate = $updatedDate;
return $this;
}
public function getCreatedBy(): ?StdUsers
{
return $this->createdBy;
}
public function setCreatedBy(?StdUsers $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getUpdatedBy(): ?StdUsers
{
return $this->updatedBy;
}
public function setUpdatedBy(?StdUsers $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getExternalLink(): ?string
{
return $this->externalLink;
}
public function setExternalLink(?string $externalLink): self
{
$this->externalLink = $externalLink;
return $this;
}
public function getPath(): ?string
{
return $this->path;
}
public function setPath(?string $path): self
{
$this->path = $path;
return $this;
}
public function getPermissions(): Collection
{
return $this->permissions;
}
public function setPermissions(Collection $permissions): void
{
$this->permissions = $permissions;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): void
{
$this->name = $name;
}
public function getMenuSection(): ?string
{
return $this->menuSection;
}
public function setMenuSection(?string $menuSection): void
{
$this->menuSection = $menuSection;
}
public function getDropdownSection(): ?string
{
return $this->dropdownSection;
}
public function setDropdownSection(?string $dropdownSection): void
{
$this->dropdownSection = $dropdownSection;
}
public function getIcon(): ?string
{
return $this->icon;
}
public function setIcon(?string $icon): void
{
$this->icon = $icon;
}
}