Viewing File: /usr/local/cpanel/whostmgr/docroot/cgi/ncssl/source/src/Entity/Certificate.php
<?php
namespace App\Entity;
use App\Repository\CertificateRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
#[ORM\Entity(repositoryClass: CertificateRepository::class)]
#[ORM\Table(name: "certificates")]
class Certificate
{
public const STATUS_INPROGRESS = 'INPROGRESS';
public const STATUS_ACTIVE = 'ACTIVE';
public const STATUS_CORRUPTED = 'CORRUPTED';
const NCSTATUS_ORDERCREATED = 'ORDERCREATED';
const NCSTATUS_NEWPURCHASE = 'NEWPURCHASE';
const NCSTATUS_ACTIVE = 'ACTIVE';
const NCSTATUS_NEWRENEWAL= 'NEWRENEWAL';
const NCSTATUS_REPLACED = 'REPLACED';
const NCSTATUS_CANCELLED = 'CANCELLED';
const NCSTATUS_REVOKED = 'REVOKED';
const NCSTATUS_EXPIRED = 'EXPIRED';
const DEFAULT_CERTIFICATE_TYPE = 'PositiveSSL';
const DEFAULT_VENDOR = 'comodo';
const DEFAULT_YEARS = 1;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?int $ncId = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $cpanelId = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn()]
private UserInterface $user;
#[ORM\Column(length: 100)]
private ?string $ncUser = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $privatekeyId = null;
#[ORM\Column(length: 25, nullable: true, options: ["default" => "CREATED"])]
private ?string $status = null;
#[ORM\Column(length: 25)]
private ?string $ncStatus = null;
#[ORM\Column(length: 100)]
private ?string $host = null;
#[ORM\Column(length: 100)]
private ?string $commonName = null;
#[ORM\Column(length: 100)]
private ?string $type = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $expires = null;
#[ORM\Column(type: Types::INTEGER)]
private ?int $years = null;
#[ORM\Column(length: 100)]
private ?string $vendor = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $validationData = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $installedAt = null;
#[ORM\Column(options: ["default" => 1])]
private bool $autoRedirect = true;
#[ORM\Column(type: Types::INTEGER, options: ["default" => 0])]
private int $failedInstallationAttempts = 0;
public function getFailedInstallationAttempts(): int
{
return $this->failedInstallationAttempts;
}
public function increaseFailedInstallationAttempts(): void
{
$this->failedInstallationAttempts++;
}
public function getId(): ?int
{
return $this->id;
}
public function getNcId(): ?int
{
return $this->ncId;
}
public function setNcId(int $ncId): static
{
$this->ncId = $ncId;
return $this;
}
public function getCpanelId(): ?string
{
return $this->cpanelId;
}
public function setCpanelId(?string $cpanelId): static
{
$this->cpanelId = $cpanelId;
return $this;
}
public function getUser(): UserInterface
{
return $this->user;
}
public function setUser(UserInterface $user): static
{
$this->user = $user;
return $this;
}
public function getNcUser(): ?string
{
return $this->ncUser;
}
public function setNcUser(string $ncUser): static
{
$this->ncUser = $ncUser;
return $this;
}
public function getPrivatekeyId(): ?string
{
return $this->privatekeyId;
}
public function setPrivatekeyId(?string $privatekeyId): static
{
$this->privatekeyId = $privatekeyId;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function isActive(): bool
{
return $this->status === self::STATUS_ACTIVE;
}
public function isInProgress(): bool
{
return $this->status === self::STATUS_INPROGRESS;
}
public function setStatus(?string $status): static
{
$this->status = $status;
return $this;
}
public function getNcStatus(): ?string
{
return $this->ncStatus;
}
public function setNcStatus(string $ncStatus): static
{
$this->ncStatus = $ncStatus;
return $this;
}
public function getHost(): ?string
{
return $this->host;
}
public function setHost(string $host): static
{
$this->host = $host;
return $this;
}
public function getCommonName(): ?string
{
return $this->commonName;
}
public function setCommonName(string $commonName): static
{
$this->commonName = $commonName;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): static
{
$this->type = $type;
return $this;
}
public function getExpires(): ?int
{
return $this->expires;
}
public function setExpires(?int $expires): static
{
$this->expires = $expires;
return $this;
}
public function getYears(): ?int
{
return $this->years;
}
public function setYears(int $years): static
{
$this->years = $years;
return $this;
}
public function getVendor(): ?string
{
return $this->vendor;
}
public function setVendor(string $vendor): static
{
$this->vendor = $vendor;
return $this;
}
public function getValidationData(): ?string
{
return $this->validationData;
}
public function setValidationData(string $validationData): static
{
$this->validationData = $validationData;
return $this;
}
public function getInstalledAt(): ?int
{
return $this->installedAt;
}
public function setInstalledAt(?string $installedAt): static
{
$this->installedAt = $installedAt;
return $this;
}
public function isAutoRedirect(): ?bool
{
return $this->autoRedirect;
}
public function setAutoRedirect(bool $autoRedirect): static
{
$this->autoRedirect = $autoRedirect;
return $this;
}
}
Back to Directory
File Manager