<?php
namespace App\Admin\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* StdConfig
*/
#[ORM\Table(name: 'std_config')]
#[ORM\Index(name: 'fk_std_config_std_users', columns: ['created_by'])]
#[ORM\Index(name: 'fk_std_config_std_users_0', columns: ['updated_by'])]
#[ORM\Entity (repositoryClass: 'App\Admin\Repository\StdConfigRepository')]
class StdConfig
{
/**
* @var string
*/
#[ORM\Column(name: 'machine_name', type: 'string', length: 50, nullable: false, options: ['comment' => 'Unique code used in the programming to identify the config variable'])]
#[ORM\Id]
private $machineName;
/**
* @var string|null
*/
#[ORM\Column(name: 'label', type: 'string', length: 100, nullable: true, options: ['comment' => 'Label of the config variable'])]
private $label;
/**
* @var string|null
*/
#[ORM\Column(name: 'value', type: 'text', nullable: true, options: ['comment' => 'Value of the config variable'])]
private $value;
/**
* @var string|null
*/
#[ORM\Column(name: 'description_machine_name', type: 'string', length: 50, nullable: true, options: ['comment' => 'Machine name of the translation of the description of the variable'])]
private $descriptionMachineName;
/**
* @var string|null
*/
#[ORM\Column(name: 'details_machine_name', type: 'string', length: 50, nullable: true, options: ['comment' => 'Machine name of the translation of the details text of the variable'])]
private $detailsMachineName;
/**
* @var string|null
*/
#[ORM\Column(name: 'parent_name', type: 'string', length: 50, nullable: true, options: ['comment' => 'Machine name of the translation of the parent group of variables'])]
private $parentName;
/**
* @var string|null
*/
#[ORM\Column(name: 'variable_type', type: 'string', length: 20, nullable: true, options: ['comment' => 'Type of the variable. It affects the kind of input generated Possible values:'])]
private $variableType;
/**
* @var int|null
*/
#[ORM\Column(name: 'order_value', type: 'integer', nullable: true, options: ['comment' => 'Order of the permission'])]
private $orderValue = '0';
/**
* @var bool
*/
#[ORM\Column(name: 'is_hidden', type: 'boolean', nullable: false, options: ['comment' => 'Flag that indicates that this variable is hidden from the user'])]
private $isHidden = '0';
/**
* @var bool
*/
#[ORM\Column(name: 'is_active', type: 'boolean', nullable: false, options: ['default' => 1, 'comment' => 'Flag that indicates if this config variable 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;
/**
* @var \StdUsers
*/
#[ORM\JoinColumn(name: 'updated_by', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: 'StdUsers')]
private $updatedBy;
/**
* @var json
*/
#[ORM\Column(name: 'content', type: 'json', nullable: true, options: ['default' => null, 'comment' => 'Content of the page'])]
private $content = [];
/**
* @var string
*/
#[ORM\Column(name: 'language_code', type: 'string', length: 3, nullable: false, options: ['comment' => 'ISO 639 Language code'])]
#[ORM\Id]
private $languageCode = '';
/**
* @var array
*/
#[ORM\Column(type: 'json')]
private $roles = [];
public function getMachineName(): ?string
{
return $this->machineName;
}
public function setMachineName(?string $machineName): self
{
$this->machineName = $machineName;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(?string $label): self
{
$this->label = $label;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(?string $value): self
{
$this->value = $value;
return $this;
}
public function getDescriptionMachineName(): ?string
{
return $this->descriptionMachineName;
}
public function setDescriptionMachineName(?string $descriptionMachineName): self
{
$this->descriptionMachineName = $descriptionMachineName;
return $this;
}
public function getDetailsMachineName(): ?string
{
return $this->detailsMachineName;
}
public function setDetailsMachineName(?string $detailsMachineName): self
{
$this->detailsMachineName = $detailsMachineName;
return $this;
}
public function getParentName(): ?string
{
return $this->parentName;
}
public function setParentName(?string $parentName): self
{
$this->parentName = $parentName;
return $this;
}
public function getVariableType(): ?string
{
return $this->variableType;
}
public function setVariableType(?string $variableType): self
{
$this->variableType = $variableType;
return $this;
}
public function getOrderValue(): ?int
{
return $this->orderValue;
}
public function setOrderValue(?int $orderValue): self
{
$this->orderValue = $orderValue;
return $this;
}
public function getIsHidden(): ?bool
{
return $this->isHidden;
}
public function setIsHidden(bool $isHidden): self
{
$this->isHidden = $isHidden;
return $this;
}
public function getIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getContent(): ?array
{
return $this->content;
}
public function setContent(array $content): self
{
$this->content = $content;
return $this;
}
public function getLanguageCode(): ?string
{
return $this->languageCode;
}
public function setLanguageCode(?string $languageCode): self
{
$this->languageCode = $languageCode;
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 getRoles(): ?array
{
return $this->roles;
}
public function setRoles(array $roles): self
{
foreach ($roles as $value) {
$data[] = $value->getName();
}
$this->roles = $data;
return $this;
}
}