<?php
namespace Sq\Entity\Schema\ORM;
use Doctrine\ORM\Mapping as ORM;
/**
* Addons.
*/
#[ORM\Entity]
#[ORM\Table(name: 'addons')]
#[ORM\Index(name: 'ao_group_id', columns: ['ao_group_id'])]
#[ORM\Index(name: 'ao_plan_id', columns: ['ao_plan_id'])]
#[ORM\UniqueConstraint(name: 'ao_id', columns: ['ao_id'])]
#[ORM\UniqueConstraint(name: 'ao_unique', columns: ['ao_name', 'ao_group_id', 'ao_plan_id', 'ao_value'])]
class Addons
{
/**
* @var int
*/
#[ORM\Column(name: 'ao_id', type: 'integer', nullable: false, options: ['unsigned' => true])]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_name', type: 'string', length: 32, nullable: true)]
private $name;
/**
* @var int|null
*/
#[ORM\Column(name: 'ao_group_id', type: 'smallint', nullable: true, options: ['unsigned' => true])]
private $groupId;
/**
* @var Plan|null
*/
#[ORM\ManyToOne(targetEntity: Plan::class)]
#[ORM\JoinColumn(name: 'ao_plan_id', referencedColumnName: 'plan_id', nullable: true)]
private $plan;
/**
* @var int|null
*/
#[ORM\Column(name: 'ao_value', type: 'smallint', nullable: true, options: ['unsigned' => true])]
private $value;
/**
* @var bool|null
*/
#[ORM\Column(name: 'ao_discountable', type: 'boolean', nullable: false, options: ['unsigned' => true])]
private $discountable = true;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_monthly_gbp', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceMonthlyGbp;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_yearly_gbp', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceYearlyGbp;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_monthly_usd', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceMonthlyUsd;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_yearly_usd', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceYearlyUsd;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_monthly_eur', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceMonthlyEur;
/**
* @var string|null
*/
#[ORM\Column(name: 'ao_price_yearly_eur', type: 'decimal', precision: 8, scale: 2, nullable: true)]
private $priceYearlyEur;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getGroupId(): ?int
{
return $this->groupId;
}
public function setGroupId(?int $groupId): self
{
$this->groupId = $groupId;
return $this;
}
public function getPlan(): ?Plan
{
return $this->plan;
}
public function setPlanId(?Plan $plan): self
{
$this->plan = $plan;
return $this;
}
public function getValue(): ?int
{
return $this->value;
}
public function setValue(?int $value): self
{
$this->value = $value;
return $this;
}
public function isDiscountable(): bool
{
return $this->discountable;
}
public function allowDiscount(bool $discountable): self
{
$this->discountable = $discountable;
return $this;
}
public function getPriceMonthlyGbp(): ?string
{
return $this->priceMonthlyGbp;
}
public function setPriceMonthlyGbp(?string $priceMonthlyGbp): self
{
$this->priceMonthlyGbp = $priceMonthlyGbp;
return $this;
}
public function getPriceYearlyGbp(): ?string
{
return $this->priceYearlyGbp;
}
public function setPriceYearlyGbp(?string $priceYearlyGbp): self
{
$this->priceYearlyGbp = $priceYearlyGbp;
return $this;
}
public function getPriceMonthlyUsd(): ?string
{
return $this->priceMonthlyUsd;
}
public function setPriceMonthlyUsd(?string $priceMonthlyUsd): self
{
$this->priceMonthlyUsd = $priceMonthlyUsd;
return $this;
}
public function getPriceYearlyUsd(): ?string
{
return $this->priceYearlyUsd;
}
public function setPriceYearlyUsd(?string $priceYearlyUsd): self
{
$this->priceYearlyUsd = $priceYearlyUsd;
return $this;
}
public function getPriceMonthlyEur(): ?string
{
return $this->priceMonthlyEur;
}
public function setPriceMonthlyEur(?string $priceMonthlyEur): self
{
$this->priceMonthlyEur = $priceMonthlyEur;
return $this;
}
public function getPriceYearlyEur(): ?string
{
return $this->priceYearlyEur;
}
public function setPriceYearlyEur(?string $priceYearlyEur): self
{
$this->priceYearlyEur = $priceYearlyEur;
return $this;
}
}