<?php
namespace App\Entity\Imports;
use App\Entity\Articles\FamilleCompta;
use App\Entity\Clients\Client;
use App\Entity\Fournisseurs\Fournisseur;
use App\Entity\Transporteurs\Transporteur;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Validator\Constraints as Assert;
use App\Annotations\SecuredEntity;
/**
* Import
*
* @ORM\Table("import__import")
* @ORM\Entity(repositoryClass="App\Repository\Imports\ImportRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Import", group="OUTILS")
*/
class Import
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Imports\Entite", cascade={"persist"})
*/
private $entite;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Imports\ComptaImport", cascade={"persist"})
*/
private $comptaImport;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", cascade={"persist"})
*/
private $transporteur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", cascade={"persist"})
*/
private $client;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur", cascade={"persist"})
*/
private $fournisseur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="import")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Imports\Champ")
* @ORM\JoinColumn(nullable=true)
*/
private $champRecherche;
/**
* @ORM\Column(name="action", type="string", length=255, nullable=true)
*/
private $action;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Articles\FamilleCompta")
*
*/
private $familleCompta;
/**
* @var boolean
* @ORM\Column(name="execute", type="boolean", nullable=true)
*/
protected $execute;
/**
* @var boolean
* @ORM\Column(name="echec", type="boolean", nullable=true)
*/
protected $echec;
/**
* @var boolean
* @ORM\Column(name="annule_remplace", type="boolean", nullable=true)
*/
protected $annuleEtRemplace;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(name="nb_lignes_exclure", type="integer", nullable=true)
*/
private $nbLignesExclure;
/**
* @ORM\Column(name="progression", type="integer", nullable=true)
*/
private $progression;
/**
* @Assert\NotBlank(message="Fichier CSV obligatoire",groups={"add"})
*/
private $file;
/**
* @ORM\Column(name="csv", type="string", length=255, nullable=true)
*/
private $csv;
/**
* @ORM\Column(name="fichier_log", type="string", length=255, nullable=true)
*/
private $fichierLog;
/**
* @ORM\Column(name="date_debut_execution", type="datetime", nullable=true)
*/
private $dateDebutExecution;
/**
* @ORM\Column(name="date_fin_execution", type="datetime", nullable=true)
*/
private $dateFinExecution;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="logs", type="text", nullable=true)
*/
private $logs;
/**
* @ORM\Column(name="liaisons", type="text", nullable=true)
*/
private $liaisons;
/**
* @ORM\Column(name="parametres", type="text", nullable=true)
*/
private $parametres;
/**
* @ORM\Column(name="pid", type="integer", nullable=true)
*/
private $pid;
public function __construct()
{
$this->date = new Datetime();
$this->progression = 0;
$this->nbLignesExclure = 1;
$this->annuleEtRemplace = 0;
$this->echec = false;
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): Import
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDate(?DateTime $date): Import
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Import
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?DateTime $dateMaj): Import
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setLogs(?string $logs): Import
{
$this->logs = $logs;
return $this;
}
public function getLogs(): ?string
{
return $this->logs;
}
public function setUtilisateur(?Utilisateur $utilisateur): Import
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function __toString() {
return $this->libelle;
}
public function setEntite(?Entite $entite): Import
{
$this->entite = $entite;
return $this;
}
public function getEntite(): ?Entite
{
return $this->entite;
}
public function getFile(): ?UploadedFile
{
return $this->file;
}
public function setFile(File $file)
{
$this->file = $file;
return $this;
}
public function setCsv(?string $csv): Import
{
$this->csv = $csv;
return $this;
}
public function getCsv(): ?string
{
return $this->csv;
}
public function setAction(?string $action): Import
{
$this->action = $action;
return $this;
}
public function getAction(): ?string
{
return $this->action;
}
public function setExecute(?bool $execute): Import
{
$this->execute = $execute;
return $this;
}
public function getExecute(): ?bool
{
return $this->execute;
}
public function setLiaisons(?string $liaisons): Import
{
$this->liaisons = $liaisons;
return $this;
}
public function getLiaisons(): ?string
{
return $this->liaisons;
}
public function setDateDebutExecution(?DateTime $dateDebutExecution): Import
{
$this->dateDebutExecution = $dateDebutExecution;
return $this;
}
public function getDateDebutExecution(): ?DateTime
{
return $this->dateDebutExecution;
}
public function setDateFinExecution(?DateTime $dateFinExecution): Import
{
$this->dateFinExecution = $dateFinExecution;
return $this;
}
public function getDateFinExecution(): ?DateTime
{
return $this->dateFinExecution;
}
public function setFichierLog(?string $fichierLog): Import
{
$this->fichierLog = $fichierLog;
return $this;
}
public function getFichierLog(): ?string
{
return $this->fichierLog;
}
public function setParametres(?string $parametres): Import
{
$this->parametres = $parametres;
return $this;
}
public function getParametres(): ?string
{
return $this->parametres;
}
public function setChampRecherche(?Champ $champRecherche): Import
{
$this->champRecherche = $champRecherche;
return $this;
}
public function getChampRecherche(): ?Champ
{
return $this->champRecherche;
}
public function setComptaImport(?ComptaImport $comptaImport): Import
{
$this->comptaImport = $comptaImport;
return $this;
}
public function getComptaImport(): ?ComptaImport
{
return $this->comptaImport;
}
public function setFamilleCompta(?FamilleCompta $familleCompta): Import
{
$this->familleCompta = $familleCompta;
return $this;
}
public function getFamilleCompta(): ?FamilleCompta
{
return $this->familleCompta;
}
public function setTransporteur(?Transporteur $transporteur): Import
{
$this->transporteur = $transporteur;
return $this;
}
public function getTransporteur(): ?Transporteur
{
return $this->transporteur;
}
public function setNbLignesExclure(?int $nbLignesExclure): Import
{
$this->nbLignesExclure = $nbLignesExclure;
return $this;
}
public function getNbLignesExclure(): ?int
{
return $this->nbLignesExclure;
}
public function setProgression(?int $progression): Import
{
$this->progression = $progression;
return $this;
}
public function getProgression(): ?int
{
return $this->progression;
}
public function setAnnuleEtRemplace(?bool $annuleEtRemplace): Import
{
$this->annuleEtRemplace = $annuleEtRemplace;
return $this;
}
public function getAnnuleEtRemplace(): ?bool
{
return $this->annuleEtRemplace;
}
public function setPid(?int $pid): Import
{
$this->pid = $pid;
return $this;
}
public function getPid(): ?int
{
return $this->pid;
}
public function setEchec(?bool $echec): Import
{
$this->echec = $echec;
return $this;
}
public function getEchec(): ?bool
{
return $this->echec;
}
public function setClient(?Client $client): Import
{
$this->client = $client;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setFournisseur(?Fournisseur $fournisseur): Import
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
}