From 9ff17d25387f6494d2317086fe78e7afcf48989d Mon Sep 17 00:00:00 2001 From: Radia Fali Date: Sat, 4 Jan 2025 02:41:48 +0100 Subject: [PATCH] mise a jour du model BD --- api/src/Entity/Impot.php | 251 +++++++++++++++++++++++++++++---------- 1 file changed, 191 insertions(+), 60 deletions(-) diff --git a/api/src/Entity/Impot.php b/api/src/Entity/Impot.php index 98faef5..17b0615 100755 --- a/api/src/Entity/Impot.php +++ b/api/src/Entity/Impot.php @@ -9,21 +9,17 @@ use Doctrine\ORM\Mapping as ORM; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Get; - - /** Impôts */ #[ORM\Entity] - - - #[ApiFilter(SearchFilter::class, properties: [ - 'type' => 'exact', - 'region' => 'exact', - 'year' => 'exact', - 'department' => 'exact', - 'commune' => 'exact' + 'CodeRegion' => 'exact', + 'CodeDept' => 'exact', + 'CodeCom' => 'exact', + 'LibRegion' => 'exact', + 'LibDept' => 'exact', + 'LibCom' => 'exact' ])] -#[ApiFilter(RangeFilter::class, properties: ['year'])] +#[ApiFilter(RangeFilter::class, properties: ['FNB_Taux', 'FB_Taux', 'TH_Taux', 'CFE_Base', 'CFE_Taux'])] #[ApiResource( operations: [ @@ -58,130 +54,265 @@ class Impot #[ORM\Id, ORM\Column, ORM\GeneratedValue] private $id; - /** Type d'impôts (TH, CFE, TFB et TFNB ) */ - #[ORM\Column(type:"text")] - private $type; + /** Code de la région */ + #[ORM\Column(type:"string", length:10)] + private $CodeRegion; - /** La région de l'impôt' */ - #[ORM\Column(type:"text")] - private $region; + /** Libellé de la région */ + #[ORM\Column(type:"string", length:255)] + private $LibRegion; - /** Le département de l'impôts */ + /** Code du département */ + #[ORM\Column(type:"string", length:10)] + private $CodeDept; - #[ORM\Column(type:"text")] - private $department; + /** Libellé du département */ + #[ORM\Column(type:"string", length:255)] + private $LibDept; - /** La commune de la taxe d'habitation */ - #[ORM\Column(type:"text")] - private $commune; + /** Code de la commune */ + #[ORM\Column(type:"string", length:10)] + private $CodeCom; + + /** Libellé de la commune */ + #[ORM\Column(type:"string", length:255)] + private $LibCom; + + /** Taux du Fonds National de Base */ + #[ORM\Column(type:"float")] + private $FNB_Taux; - /** Année de la taxe d'habitation */ - #[ORM\Column(type:"integer")] - private $year; + /** Montant du Fonds National de Base */ + #[ORM\Column(type:"float")] + private $FNB_Montant; + + /** Taux de la Fiscalité de Base */ + #[ORM\Column(type:"float")] + private $FB_Taux; + + /** Montant de la Fiscalité de Base */ + #[ORM\Column(type:"float")] + private $FB_Montant; + + /** Taux de la Taxe d'Habitation */ + #[ORM\Column(type:"float")] + private $TH_Taux; + + /** Montant de la Taxe d'Habitation */ + #[ORM\Column(type:"float")] + private $TH_Montant; + + /** Base de la Cotisation Foncière des Entreprises */ + #[ORM\Column(type:"float")] + private $CFE_Base; - /** Taux de la taxe d'habitation */ + /** Taux de la Cotisation Foncière des Entreprises */ #[ORM\Column(type:"float")] - private $taxRate; + private $CFE_Taux; - /** Volume collecté de la taxe d'habitation */ + /** Montant de la Cotisation Foncière des Entreprises */ #[ORM\Column(type:"float")] - private $volumeCollected; + private $CFE_Montant; + /** Articles liés à la CFE */ + #[ORM\Column(type:"text")] + private $CFE_Articles; + + // Getters and Setters public function getId(): ?int { return $this->id; } - public function getRegion(): ?string + public function getCodeRegion(): ?string + { + return $this->CodeRegion; + } + + public function setCodeRegion(string $CodeRegion): self + { + $this->CodeRegion = $CodeRegion; + + return $this; + } + + public function getLibRegion(): ?string + { + return $this->LibRegion; + } + + public function setLibRegion(string $LibRegion): self + { + $this->LibRegion = $LibRegion; + + return $this; + } + + public function getCodeDept(): ?string + { + return $this->CodeDept; + } + + public function setCodeDept(string $CodeDept): self + { + $this->CodeDept = $CodeDept; + + return $this; + } + + public function getLibDept(): ?string { - return $this->region; + return $this->LibDept; } - public function getDepartment(): ?string + public function setLibDept(string $LibDept): self { - return $this->department; + $this->LibDept = $LibDept; + + return $this; } - public function getCommune(): ?string + public function getCodeCom(): ?string { - return $this->commune; + return $this->CodeCom; } - public function getTaxRate(): ?float + public function setCodeCom(string $CodeCom): self { - return $this->taxRate; + $this->CodeCom = $CodeCom; + + return $this; } - public function getVolumeCollected(): ?float + public function getLibCom(): ?string { - return $this->volumeCollected; + return $this->LibCom; } - public function getYear(): ?int + public function setLibCom(string $LibCom): self { - return $this->year; + $this->LibCom = $LibCom; + + return $this; } - public function getType(): ?string + public function getFNB_Taux(): ?float { - return $this->type; + return $this->FNB_Taux; } - public function setId(int $id): self + public function setFNB_Taux(float $FNB_Taux): self { - $this->id = $id; + $this->FNB_Taux = $FNB_Taux; return $this; } - public function setRegion(string $region): self + public function getFNB_Montant(): ?float { - $this->region = $region; + return $this->FNB_Montant; + } + + public function setFNB_Montant(float $FNB_Montant): self + { + $this->FNB_Montant = $FNB_Montant; return $this; } - public function setDepartment(string $department): self + public function getFB_Taux(): ?float + { + return $this->FB_Taux; + } + + public function setFB_Taux(float $FB_Taux): self { - $this->department = $department; + $this->FB_Taux = $FB_Taux; return $this; } - public function setCommune(string $commune): self + public function getFB_Montant(): ?float { - $this->commune = $commune; + return $this->FB_Montant; + } + + public function setFB_Montant(float $FB_Montant): self + { + $this->FB_Montant = $FB_Montant; return $this; } - public function setTaxRate(float $taxRate): self + public function getTH_Taux(): ?float { - $this->taxRate = $taxRate; + return $this->TH_Taux; + } + + public function setTH_Taux(float $TH_Taux): self + { + $this->TH_Taux = $TH_Taux; return $this; } - public function setVolumeCollected(float $volumeCollected): self + public function getTH_Montant(): ?float { - $this->volumeCollected = $volumeCollected; + return $this->TH_Montant; + } + + public function setTH_Montant(float $TH_Montant): self + { + $this->TH_Montant = $TH_Montant; return $this; } - public function setYear(int $year): self + public function getCFE_Base(): ?float + { + return $this->CFE_Base; + } + + public function setCFE_Base(float $CFE_Base): self + { + $this->CFE_Base = $CFE_Base; + + return $this; + } + + public function getCFE_Taux(): ?float + { + return $this->CFE_Taux; + } + + public function setCFE_Taux(float $CFE_Taux): self { - $this->year = $year; + $this->CFE_Taux = $CFE_Taux; return $this; } - public function setType(string $type): self + public function getCFE_Montant(): ?float + { + return $this->CFE_Montant; + } + + public function setCFE_Montant(float $CFE_Montant): self { - $this->type = $type; + $this->CFE_Montant = $CFE_Montant; return $this; } + public function getCFE_Articles(): ?string + { + return $this->CFE_Articles; + } + + public function setCFE_Articles(string $CFE_Articles): self + { + $this->CFE_Articles = $CFE_Articles; + return $this; + } } -- GitLab