<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use http\Env\Request;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Entity(repositoryClass="App\Repository\SystemRepository")
*/
class System implements UserInterface
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="boolean")
*/
private $statut;
/**
* @ORM\Column(type="datetime")
*/
private $date;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $ftpUser;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $ftpPassword;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ftpDirectory;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $databaseFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $awaitingFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $organisationLogo;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $organisationSigle;
/**
* @ORM\Column(type="string", length=5, nullable=true)
*/
private $ftpPort;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $baseFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bordereauFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $versementFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $classementFolder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $savingFolder;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $country;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $bp;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $fax;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $slogan;
/**
* @ORM\Column(type="string", length=140, nullable=true)
*/
private $organisationName;
/**
* @ORM\Column(type="string", length=5, nullable=true)
*/
private $ftpProtocole;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $ftpFolder;
/**
* System constructor.
*/
public function __construct()
{
$this->date = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getStatut(): ?bool
{
return $this->statut;
}
public function setStatut(bool $statut): self
{
$this->statut = $statut;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getFtpUser(): ?string
{
return $this->ftpUser;
}
public function setFtpUser(?string $ftpUser): self
{
$this->ftpUser = $ftpUser;
return $this;
}
public function getFtpPassword(): ?string
{
return $this->ftpPassword;
}
public function setFtpPassword(?string $ftpPassword): self
{
$this->ftpPassword = $ftpPassword;
return $this;
}
public function getFtpDirectory(): ?string
{
return $this->ftpDirectory;
}
public function setFtpDirectory(?string $ftpDirectory): self
{
$this->ftpDirectory = $ftpDirectory;
return $this;
}
public function getDatabaseFolder(): ?string
{
return $this->databaseFolder;
}
public function setDatabaseFolder(?string $databaseFolder): self
{
$this->databaseFolder = $databaseFolder;
return $this;
}
public function getAwaitingFolder(): ?string
{
return $this->awaitingFolder;
}
public function setAwaitingFolder(?string $awaitingFolder): self
{
$this->awaitingFolder = $awaitingFolder;
return $this;
}
public function getOrganisationLogo(): ?string
{
return $this->organisationLogo;
}
public function setOrganisationLogo(?string $organisationLogo): self
{
$this->organisationLogo = $organisationLogo;
return $this;
}
public function getOrganisationSigle(): ?string
{
return $this->organisationSigle;
}
public function setOrganisationSigle(?string $organisationSigle): self
{
$this->organisationSigle = $organisationSigle;
return $this;
}
public function toArray()
{
return [
"ftp_user"=>$this->ftpUser,
"ftp_password"=>$this->ftpPassword,
"ftp_directory"=>$this->ftpDirectory,
"ftp_port"=>$this->ftpPort,
"database_folder"=>$this->databaseFolder,
"awaiting_folder"=>$this->awaitingFolder,
"organisation_name"=>$this->organisationName,
"organisation_logo"=>$this->organisationLogo,
"organisation_sigle"=>$this->organisationSigle,
"base_folder"=>$this->baseFolder,
"saving_folder"=>$this->savingFolder,
"bordereau_folder"=>$this->bordereauFolder,
"classement_folder"=>$this->classementFolder,
"slogan"=>$this->slogan,
"country"=>$this->country,
"phone"=>$this->phone,
"bp"=>$this->bp,
"fax"=>$this->fax
];
}
public function getFtpPort(): ?string
{
return $this->ftpPort;
}
public function setFtpPort(?string $ftpPort): self
{
$this->ftpPort = $ftpPort;
return $this;
}
public function getBaseFolder(): ?string
{
return $this->baseFolder;
}
public function setBaseFolder(?string $baseFolder): self
{
$this->baseFolder = $baseFolder;
return $this;
}
public function getBordereauFolder(): ?string
{
return $this->bordereauFolder;
}
public function setBordereauFolder(?string $bordereauFolder): self
{
$this->bordereauFolder = $bordereauFolder;
return $this;
}
public function getVersementFolder(): ?string
{
return $this->versementFolder;
}
public function setVersementFolder(?string $versementFolder): self
{
$this->versementFolder = $versementFolder;
return $this;
}
public function getClassementFolder(): ?string
{
return $this->classementFolder;
}
public function setClassementFolder(?string $classementFolder): self
{
$this->classementFolder = $classementFolder;
return $this;
}
public function getSavingFolder(): ?string
{
return $this->savingFolder;
}
public function setSavingFolder(?string $savingFolder): self
{
$this->savingFolder = $savingFolder;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getBp(): ?string
{
return $this->bp;
}
public function setBp(?string $bp): self
{
$this->bp = $bp;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setFax(?string $fax): self
{
$this->fax = $fax;
return $this;
}
public function getSlogan(): ?string
{
return $this->slogan;
}
public function setSlogan(?string $slogan): self
{
$this->slogan = $slogan;
return $this;
}
public function getOrganisationName(): ?string
{
return $this->organisationName;
}
public function setOrganisationName(?string $organisationName): self
{
$this->organisationName = $organisationName;
return $this;
}
public function getFtpProtocole(): ?string
{
return $this->ftpProtocole;
}
public function setFtpProtocole(?string $ftpProtocole): self
{
$this->ftpProtocole = $ftpProtocole;
return $this;
}
public function getFtpFolder(): ?string
{
return $this->ftpFolder;
}
public function setFtpFolder(?string $ftpFolder): self
{
$this->ftpFolder = $ftpFolder;
return $this;
}
public function getRoles(): array
{
return ['ROLE_SYSTEM'];
}
public function getPassword(): string
{
return $this->getFtpPassword();
}
public function getSalt() {}
public function eraseCredentials() {}
public function getUserIdentifier(): string
{
return "system.identifier"; // Or another unique field
}
public function getUsername()
{
return "system.identifier";
}
}