src/Entity/Imports/Import.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Imports;
  3. use App\Entity\Articles\FamilleCompta;
  4. use App\Entity\Clients\Client;
  5. use App\Entity\Fournisseurs\Fournisseur;
  6. use App\Entity\Transporteurs\Transporteur;
  7. use App\Entity\Utilisateur\Utilisateur;
  8. use DateTime;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\HttpFoundation\File\File;
  12. use Symfony\Component\HttpFoundation\File\UploadedFile;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. use App\Annotations\SecuredEntity;
  15. /**
  16.  * Import
  17.  *
  18.  * @ORM\Table("import__import")
  19.  * @ORM\Entity(repositoryClass="App\Repository\Imports\ImportRepository")
  20.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  21.  * @SecuredEntity(name="Import", group="OUTILS")
  22.  */
  23. class Import
  24. {
  25.     /**
  26.      * @ORM\Column(name="id", type="integer")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     private $id;
  31.     
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Imports\Entite", cascade={"persist"})
  34.      */
  35.     private $entite;
  36.     
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Imports\ComptaImport", cascade={"persist"})
  39.      */
  40.     private $comptaImport;
  41.     
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", cascade={"persist"})
  44.      */
  45.     private $transporteur;
  46.     
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", cascade={"persist"})
  49.      */
  50.     private $client;
  51.     
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur", cascade={"persist"})
  54.      */
  55.     private $fournisseur;
  56.     
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="import")
  59.      * @ORM\JoinColumn(nullable=true)
  60.      */
  61.     private $utilisateur;
  62.     
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\Imports\Champ")
  65.      * @ORM\JoinColumn(nullable=true)
  66.      */
  67.     private $champRecherche;
  68.     /**
  69.      * @ORM\Column(name="action", type="string", length=255, nullable=true)
  70.      */
  71.     private $action;
  72.     
  73.     /**
  74.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\FamilleCompta")
  75.      * 
  76.      */
  77.     private $familleCompta;
  78.     
  79.     /**
  80.      * @var boolean
  81.      * @ORM\Column(name="execute", type="boolean", nullable=true)
  82.      */
  83.     protected $execute;
  84.     
  85.     /**
  86.      * @var boolean
  87.      * @ORM\Column(name="echec", type="boolean", nullable=true)
  88.      */
  89.     protected $echec
  90.     
  91.     /**
  92.      * @var boolean
  93.      * @ORM\Column(name="annule_remplace", type="boolean", nullable=true)
  94.      */
  95.     protected $annuleEtRemplace;
  96.     
  97.     /**
  98.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  99.      */
  100.     private $libelle;
  101.     
  102.     /**
  103.      * @ORM\Column(name="nb_lignes_exclure", type="integer", nullable=true)
  104.      */
  105.     private $nbLignesExclure;
  106.     
  107.     /**
  108.      * @ORM\Column(name="progression", type="integer", nullable=true)
  109.      */
  110.     private $progression;
  111.     /**
  112.      * @Assert\NotBlank(message="Fichier CSV obligatoire",groups={"add"})
  113.      */
  114.     private $file;
  115.     /**
  116.      * @ORM\Column(name="csv", type="string", length=255, nullable=true)
  117.      */
  118.     private $csv;
  119.     
  120.     /**
  121.      * @ORM\Column(name="fichier_log", type="string", length=255, nullable=true)
  122.      */
  123.     private $fichierLog;
  124.     /**
  125.      * @ORM\Column(name="date_debut_execution", type="datetime", nullable=true)
  126.      */
  127.     private $dateDebutExecution;
  128.     
  129.     /**
  130.      * @ORM\Column(name="date_fin_execution", type="datetime", nullable=true)
  131.      */
  132.     private $dateFinExecution;
  133.     /**
  134.      * @ORM\Column(name="date", type="datetime", nullable=true)
  135.      */
  136.     private $date;
  137.     /**
  138.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  139.      */
  140.     private $dateSuppression;
  141.     /**
  142.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  143.      * @Gedmo\Timestampable(on="update")
  144.      */
  145.     private $dateMaj;
  146.     /**
  147.      * @ORM\Column(name="logs", type="text", nullable=true)
  148.      */
  149.     private $logs;
  150.     
  151.     /**
  152.      * @ORM\Column(name="liaisons", type="text", nullable=true)
  153.      */
  154.     private $liaisons;
  155.     
  156.     /**
  157.      * @ORM\Column(name="parametres", type="text", nullable=true)
  158.      */
  159.     private $parametres;
  160.     
  161.     /**
  162.      * @ORM\Column(name="pid", type="integer", nullable=true)
  163.      */
  164.     private $pid;    
  165.     
  166.     
  167.     public function __construct()
  168.     {
  169.         $this->date = new Datetime();
  170.         $this->progression 0;
  171.         $this->nbLignesExclure 1;
  172.         $this->annuleEtRemplace 0;
  173.         $this->echec false;
  174.     }
  175.     public function getId(): int
  176.     {
  177.         return $this->id;
  178.     }
  179.     public function setLibelle(?string $libelle): Import
  180.     {
  181.         $this->libelle $libelle;
  182.         return $this;
  183.     }
  184.     public function getLibelle(): ?string
  185.     {
  186.         return $this->libelle;
  187.     }
  188.     public function setDate(?DateTime $date): Import
  189.     {
  190.         $this->date $date;
  191.         return $this;
  192.     }
  193.     public function getDate(): ?DateTime
  194.     {
  195.         return $this->date;
  196.     }
  197.     public function setDateSuppression(?DateTime $dateSuppression): Import
  198.     {
  199.         $this->dateSuppression $dateSuppression;
  200.         return $this;
  201.     }
  202.     public function getDateSuppression(): ?DateTime
  203.     {
  204.         return $this->dateSuppression;
  205.     }
  206.     public function setDateMaj(?DateTime $dateMaj): Import
  207.     {
  208.         $this->dateMaj $dateMaj;
  209.         return $this;
  210.     }
  211.     public function getDateMaj(): ?DateTime
  212.     {
  213.         return $this->dateMaj;
  214.     }
  215.     public function setLogs(?string $logs): Import
  216.     {
  217.         $this->logs $logs;
  218.         return $this;
  219.     }
  220.     public function getLogs(): ?string
  221.     {
  222.         return $this->logs;
  223.     }
  224.     public function setUtilisateur(?Utilisateur $utilisateur): Import
  225.     {
  226.         $this->utilisateur $utilisateur;
  227.         return $this;
  228.     }
  229.     public function getUtilisateur(): ?Utilisateur
  230.     {
  231.         return $this->utilisateur;
  232.     }
  233.     
  234.     public function __toString() {
  235.         return $this->libelle;
  236.     }    
  237.     public function setEntite(?Entite $entite): Import
  238.     {
  239.         $this->entite $entite;
  240.         return $this;
  241.     }
  242.     public function getEntite(): ?Entite
  243.     {
  244.         return $this->entite;
  245.     }
  246.     public function getFile(): ?UploadedFile
  247.     {
  248.         return $this->file;
  249.     }
  250.     public function setFile(File $file)
  251.     {
  252.         $this->file $file;
  253.         return $this;
  254.     }
  255.     public function setCsv(?string $csv): Import
  256.     {
  257.         $this->csv $csv;
  258.         return $this;
  259.     }
  260.     public function getCsv(): ?string
  261.     {
  262.         return $this->csv;
  263.     }
  264.     public function setAction(?string $action): Import
  265.     {
  266.         $this->action $action;
  267.         return $this;
  268.     }
  269.     public function getAction(): ?string
  270.     {
  271.         return $this->action;
  272.     }
  273.     public function setExecute(?bool $execute): Import
  274.     {
  275.         $this->execute $execute;
  276.         return $this;
  277.     }
  278.     public function getExecute(): ?bool
  279.     {
  280.         return $this->execute;
  281.     }
  282.     public function setLiaisons(?string $liaisons): Import
  283.     {
  284.         $this->liaisons $liaisons;
  285.         return $this;
  286.     }
  287.     public function getLiaisons(): ?string
  288.     {
  289.         return $this->liaisons;
  290.     }
  291.     public function setDateDebutExecution(?DateTime $dateDebutExecution): Import
  292.     {
  293.         $this->dateDebutExecution $dateDebutExecution;
  294.         return $this;
  295.     }
  296.     public function getDateDebutExecution(): ?DateTime
  297.     {
  298.         return $this->dateDebutExecution;
  299.     }
  300.     public function setDateFinExecution(?DateTime $dateFinExecution): Import
  301.     {
  302.         $this->dateFinExecution $dateFinExecution;
  303.         return $this;
  304.     }
  305.     public function getDateFinExecution(): ?DateTime
  306.     {
  307.         return $this->dateFinExecution;
  308.     }
  309.     public function setFichierLog(?string $fichierLog): Import
  310.     {
  311.         $this->fichierLog $fichierLog;
  312.         return $this;
  313.     }
  314.     public function getFichierLog(): ?string
  315.     {
  316.         return $this->fichierLog;
  317.     }
  318.     public function setParametres(?string $parametres): Import
  319.     {
  320.         $this->parametres $parametres;
  321.         return $this;
  322.     }
  323.     public function getParametres(): ?string
  324.     {
  325.         return $this->parametres;
  326.     }
  327.     public function setChampRecherche(?Champ $champRecherche): Import
  328.     {
  329.         $this->champRecherche $champRecherche;
  330.         return $this;
  331.     }
  332.     public function getChampRecherche(): ?Champ
  333.     {
  334.         return $this->champRecherche;
  335.     }
  336.     public function setComptaImport(?ComptaImport $comptaImport): Import
  337.     {
  338.         $this->comptaImport $comptaImport;
  339.         return $this;
  340.     }
  341.     public function getComptaImport(): ?ComptaImport
  342.     {
  343.         return $this->comptaImport;
  344.     }
  345.     public function setFamilleCompta(?FamilleCompta $familleCompta): Import
  346.     {
  347.         $this->familleCompta $familleCompta;
  348.         return $this;
  349.     }
  350.     public function getFamilleCompta(): ?FamilleCompta
  351.     {
  352.         return $this->familleCompta;
  353.     }
  354.     public function setTransporteur(?Transporteur $transporteur): Import
  355.     {
  356.         $this->transporteur $transporteur;
  357.         return $this;
  358.     }
  359.     public function getTransporteur(): ?Transporteur
  360.     {
  361.         return $this->transporteur;
  362.     }
  363.     public function setNbLignesExclure(?int $nbLignesExclure): Import
  364.     {
  365.         $this->nbLignesExclure $nbLignesExclure;
  366.         return $this;
  367.     }
  368.     public function getNbLignesExclure(): ?int
  369.     {
  370.         return $this->nbLignesExclure;
  371.     }
  372.     public function setProgression(?int $progression): Import
  373.     {
  374.         $this->progression $progression;
  375.         return $this;
  376.     }
  377.     public function getProgression(): ?int
  378.     {
  379.         return $this->progression;
  380.     }
  381.     public function setAnnuleEtRemplace(?bool $annuleEtRemplace): Import
  382.     {
  383.         $this->annuleEtRemplace $annuleEtRemplace;
  384.         return $this;
  385.     }
  386.     public function getAnnuleEtRemplace(): ?bool
  387.     {
  388.         return $this->annuleEtRemplace;
  389.     }
  390.     public function setPid(?int $pid): Import
  391.     {
  392.         $this->pid $pid;
  393.         return $this;
  394.     }
  395.     public function getPid(): ?int
  396.     {
  397.         return $this->pid;
  398.     }    
  399.     public function setEchec(?bool $echec): Import
  400.     {
  401.         $this->echec $echec;
  402.         return $this;
  403.     }
  404.     public function getEchec(): ?bool
  405.     {
  406.         return $this->echec;
  407.     }
  408.     public function setClient(?Client $client): Import
  409.     {
  410.         $this->client $client;
  411.         return $this;
  412.     }
  413.     public function getClient(): ?Client
  414.     {
  415.         return $this->client;
  416.     }
  417.     public function setFournisseur(?Fournisseur $fournisseur): Import
  418.     {
  419.         $this->fournisseur $fournisseur;
  420.         return $this;
  421.     }
  422.     public function getFournisseur(): ?Fournisseur
  423.     {
  424.         return $this->fournisseur;
  425.     }
  426. }