src/Entity/Adherent/MagasinJuridique.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\Adherent\MagasinJuridiqueRepository;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Symfony\Component\Validator\Context\ExecutionContextInterface;
  7. #[ORM\Entity(repositoryClassMagasinJuridiqueRepository::class)]
  8. class MagasinJuridique
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $metatitle;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $metadescription;
  18.     #[ORM\Column(type'text'nullabletrue)]
  19.     private $metakeywords;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $metatitleCgu;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $metadescriptionCgu;
  24.     #[ORM\Column(type'text'nullabletrue)]
  25.     private $metakeywordsCgu;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private $metatitlePrivacy;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private $metadescriptionPrivacy;
  30.     #[ORM\Column(type'text'nullabletrue)]
  31.     private $metakeywordsPrivacy;
  32.     #[ORM\ManyToOne(targetEntityMagasin::class, inversedBy'presentations')]
  33.     #[ORM\JoinColumn(name'magasin'referencedColumnName'k_adherent'nullablefalse)]
  34.     private $magasin;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $society;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private $email;
  39.     #[ORM\Column(type'string'length255nullabletrue)]
  40.     private $phone;
  41.     #[ORM\Column(type'text'nullabletrue)]
  42.     private $address;
  43.     #[ORM\Column(type'string'length5nullabletrue)]
  44.     private $zipcode;
  45.     #[ORM\Column(type'string'length255nullabletrue)]
  46.     private $city;
  47.     #[ORM\Column(type'text'nullabletrue)]
  48.     private $website;
  49.     #[ORM\Column(type'text'nullabletrue)]
  50.     private $content_legals;
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private $content_cgu;
  53.     #[ORM\Column(type'text'nullabletrue)]
  54.     private $content_privacy;
  55.     #[ORM\Column(name'lang'type'string')]
  56.     private $lang;
  57.     #[ORM\Column(name'capital'type'float'nullabletrue)]
  58.     private $capital;
  59.     #[ORM\Column(type'datetime_immutable')]
  60.     private $created_at;
  61.     #[ORM\Column(type'text'nullabletrue)]
  62.     private $content_cgv;
  63.     #[ORM\Column(type'string'length255nullabletrue)]
  64.     private $metatitleCgv;
  65.     #[ORM\Column(type'string'length255nullabletrue)]
  66.     private $metadescriptionCgv;
  67.     #[ORM\Column(type'text'nullabletrue)]
  68.     private $metakeywordsCgv;
  69.     // Médiateur à la consommation
  70.     #[ORM\Column(type'string'length255nullabletrue)]
  71.     private $mediatorName;
  72.     #[ORM\Column(type'string'length255nullabletrue)]
  73.     private $mediatorAdress;
  74.     #[ORM\Column(type'string'length255nullabletrue)]
  75.     private $mediatorZipcode;
  76.     #[ORM\Column(type'string'length255nullabletrue)]
  77.     private $mediatorCity;
  78.     #[ORM\Column(type'string'length255nullabletrue)]
  79.     private $mediatorWebsite;
  80.     #[ORM\Column(type'string'length255nullabletrue)]
  81.     private $opticianName;
  82.     #[ORM\Column(type'string'length255nullabletrue)]
  83.     private $diplomaTitle;
  84.     #[ORM\Column(type'string'length255nullabletrue)]
  85.     private $diplomaCountry;
  86.     #[ORM\Column(type'string'length255nullabletrue)]
  87.     private $finessIdentifier;
  88.     public function __construct()
  89.     {
  90.         $this->created_at = new \DateTimeImmutable("now");
  91.     }
  92.     #[Assert\Callback]
  93.     public function validate(ExecutionContextInterface $context$payload)
  94.     {
  95.         // Validation des champs médiateur à la conso
  96.         if (!is_null($this->mediatorName) || !is_null($this->mediatorAdress) || !is_null($this->mediatorZipcode) || !is_null($this->mediatorCity) || !is_null($this->mediatorWebsite)) {
  97.             if(is_null($this->mediatorName)) {
  98.                 $context->buildViolation('Ce champ ne peut être vide')->atPath('mediatorName')->addViolation();
  99.             }
  100.             if(is_null($this->mediatorAdress)) {
  101.                 $context->buildViolation('Ce champ ne peut être vide')->atPath('mediatorAdress')->addViolation();
  102.             }
  103.             if(is_null($this->mediatorZipcode)) {
  104.                 $context->buildViolation('Ce champ ne peut être vide')->atPath('mediatorZipcode')->addViolation();
  105.             }
  106.             if(is_null($this->mediatorCity)) {
  107.                 $context->buildViolation('Ce champ ne peut être vide')->atPath('mediatorCity')->addViolation();
  108.             }
  109.             if(is_null($this->mediatorWebsite)) {
  110.                 $context->buildViolation('Ce champ ne peut être vide')->atPath('mediatorWebsite')->addViolation();
  111.             }
  112.         }
  113.     }
  114.     public function getId(): ?int
  115.     {
  116.         return $this->id;
  117.     }
  118.     public function getMetaTitle(): ?string
  119.     {
  120.         return $this->metatitle;
  121.     }
  122.     public function setMetaTitle(?string $metatitle): self
  123.     {
  124.         $this->metatitle $metatitle;
  125.         return $this;
  126.     }
  127.     public function getMetaDescription(): ?string
  128.     {
  129.         return $this->metadescription;
  130.     }
  131.     public function setMetaDescription(?string $metadescription): self
  132.     {
  133.         $this->metadescription $metadescription;
  134.         return $this;
  135.     }
  136.     public function getMetaKeywords(): ?string
  137.     {
  138.         return $this->metakeywords;
  139.     }
  140.     public function setMetaKeywords(?string $metakeywords): self
  141.     {
  142.         $this->metakeywords $metakeywords;
  143.         return $this;
  144.     }
  145.     public function getMagasin(): ?Magasin
  146.     {
  147.         return $this->magasin;
  148.     }
  149.     public function setMagasin(?Magasin $magasin): self
  150.     {
  151.         $this->magasin $magasin;
  152.         return $this;
  153.     }
  154.     public function getSociety(): ?string
  155.     {
  156.         return $this->society;
  157.     }
  158.     public function setSociety(string $society): self
  159.     {
  160.         $this->society $society;
  161.         return $this;
  162.     }
  163.     public function getEmail(): ?string
  164.     {
  165.         return $this->email;
  166.     }
  167.     public function setEmail(string $email): self
  168.     {
  169.         $this->email $email;
  170.         return $this;
  171.     }
  172.     public function getPhone(): ?string
  173.     {
  174.         return $this->phone;
  175.     }
  176.     public function setPhone(?string $phone): self
  177.     {
  178.         $this->phone $phone;
  179.         return $this;
  180.     }
  181.     public function getAddress(): ?string
  182.     {
  183.         return $this->address;
  184.     }
  185.     public function setAddress(?string $address): self
  186.     {
  187.         $this->address $address;
  188.         return $this;
  189.     }
  190.     public function getZipcode(): ?string
  191.     {
  192.         return $this->zipcode;
  193.     }
  194.     public function setZipcode(?string $zipcode): self
  195.     {
  196.         $this->zipcode $zipcode;
  197.         return $this;
  198.     }
  199.     public function getCity(): ?string
  200.     {
  201.         return $this->city;
  202.     }
  203.     public function setCity(?string $city): self
  204.     {
  205.         $this->city $city;
  206.         return $this;
  207.     }
  208.     public function getWebsite(): ?string
  209.     {
  210.         return $this->website;
  211.     }
  212.     public function setWebsite(?string $website): self
  213.     {
  214.         $this->website $website;
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return mixed
  219.      */
  220.     public function getContentLegals(): string
  221.     {
  222.         return $this->content_legals;
  223.     }
  224.     /**
  225.      * @param mixed $content_legals
  226.      */
  227.     public function setContentLegals(string $content_legals): self
  228.     {
  229.         $this->content_legals $content_legals;
  230.         return $this;
  231.     }
  232.     /**
  233.      * @return mixed
  234.      */
  235.     public function getContentCgu(): string
  236.     {
  237.         return $this->content_cgu;
  238.     }
  239.     /**
  240.      * @param mixed $content_cgu
  241.      */
  242.     public function setContentCgu(string $content_cgu): self
  243.     {
  244.         $this->content_cgu $content_cgu;
  245.         return $this;
  246.     }
  247.     /**
  248.      * @return mixed
  249.      */
  250.     public function getContentPrivacy(): string
  251.     {
  252.         return $this->content_privacy;
  253.     }
  254.     /**
  255.      * @param mixed $content_privacy
  256.      */
  257.     public function setContentPrivacy(string $content_privacy): self
  258.     {
  259.         $this->content_privacy $content_privacy;
  260.         return $this;
  261.     }
  262.     /**
  263.      * @return mixed
  264.      */
  265.     public function getMetatitleCgu()
  266.     {
  267.         return $this->metatitleCgu;
  268.     }
  269.     public function setMetatitleCgu(mixed $metatitleCgu): void
  270.     {
  271.         $this->metatitleCgu $metatitleCgu;
  272.     }
  273.     /**
  274.      * @return mixed
  275.      */
  276.     public function getMetadescriptionCgu()
  277.     {
  278.         return $this->metadescriptionCgu;
  279.     }
  280.     public function setMetadescriptionCgu(mixed $metadescriptionCgu): void
  281.     {
  282.         $this->metadescriptionCgu $metadescriptionCgu;
  283.     }
  284.     /**
  285.      * @return mixed
  286.      */
  287.     public function getMetakeywordsCgu()
  288.     {
  289.         return $this->metakeywordsCgu;
  290.     }
  291.     public function setMetakeywordsCgu(mixed $metakeywordsCgu): void
  292.     {
  293.         $this->metakeywordsCgu $metakeywordsCgu;
  294.     }
  295.     /**
  296.      * @return mixed
  297.      */
  298.     public function getMetatitlePrivacy()
  299.     {
  300.         return $this->metatitlePrivacy;
  301.     }
  302.     public function setMetatitlePrivacy(mixed $metatitlePrivacy): void
  303.     {
  304.         $this->metatitlePrivacy $metatitlePrivacy;
  305.     }
  306.     /**
  307.      * @return mixed
  308.      */
  309.     public function getMetadescriptionPrivacy()
  310.     {
  311.         return $this->metadescriptionPrivacy;
  312.     }
  313.     public function setMetadescriptionPrivacy(mixed $metadescriptionPrivacy): void
  314.     {
  315.         $this->metadescriptionPrivacy $metadescriptionPrivacy;
  316.     }
  317.     /**
  318.      * @return mixed
  319.      */
  320.     public function getMetakeywordsPrivacy()
  321.     {
  322.         return $this->metakeywordsPrivacy;
  323.     }
  324.     public function setMetakeywordsPrivacy(mixed $metakeywordsPrivacy): void
  325.     {
  326.         $this->metakeywordsPrivacy $metakeywordsPrivacy;
  327.     }
  328.     
  329.     /**
  330.      * @return mixed
  331.      */
  332.     public function getLang()
  333.     {
  334.         return $this->lang;
  335.     }
  336.     public function setLang(mixed $lang): self
  337.     {
  338.         $this->lang $lang;
  339.         return $this;
  340.     }
  341.     public function getCreatedAt(): \DateTimeImmutable
  342.     {
  343.         return $this->created_at;
  344.     }
  345.     /**
  346.      * @return $this
  347.      */
  348.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  349.     {
  350.         $this->created_at $created_at;
  351.         return $this;
  352.     }
  353.     /**
  354.      * @return mixed
  355.      */
  356.     public function getCapital()
  357.     {
  358.         return $this->capital;
  359.     }
  360.     public function setCapital(mixed $capital): void
  361.     {
  362.         $this->capital $capital;
  363.     }
  364.     /**
  365.      * @return mixed
  366.      */
  367.     public function getContentCgv()
  368.     {
  369.         return $this->content_cgv;
  370.     }
  371.     /**
  372.      * @param mixed $content_cgv
  373.      */
  374.     public function setContentCgv($content_cgv): void
  375.     {
  376.         $this->content_cgv $content_cgv;
  377.     }
  378.     /**
  379.      * @return mixed
  380.      */
  381.     public function getMetatitleCgv()
  382.     {
  383.         return $this->metatitleCgv;
  384.     }
  385.     /**
  386.      * @param mixed $metatitleCgv
  387.      */
  388.     public function setMetatitleCgv($metatitleCgv): void
  389.     {
  390.         $this->metatitleCgv $metatitleCgv;
  391.     }
  392.     /**
  393.      * @return mixed
  394.      */
  395.     public function getMetadescriptionCgv()
  396.     {
  397.         return $this->metadescriptionCgv;
  398.     }
  399.     /**
  400.      * @param mixed $metadescriptionCgv
  401.      */
  402.     public function setMetadescriptionCgv($metadescriptionCgv): void
  403.     {
  404.         $this->metadescriptionCgv $metadescriptionCgv;
  405.     }
  406.     /**
  407.      * @return mixed
  408.      */
  409.     public function getMetakeywordsCgv()
  410.     {
  411.         return $this->metakeywordsCgv;
  412.     }
  413.     /**
  414.      * @param mixed $metakeywordsCgv
  415.      */
  416.     public function setMetakeywordsCgv($metakeywordsCgv): void
  417.     {
  418.         $this->metakeywordsCgv $metakeywordsCgv;
  419.     }
  420.     /**
  421.      * @return mixed
  422.      */
  423.     public function getMediatorName()
  424.     {
  425.         return $this->mediatorName;
  426.     }
  427.     /**
  428.      * @param mixed $mediatorName
  429.      */
  430.     public function setMediatorName($mediatorName): void
  431.     {
  432.         $this->mediatorName $mediatorName;
  433.     }
  434.     /**
  435.      * @return mixed
  436.      */
  437.     public function getMediatorAdress()
  438.     {
  439.         return $this->mediatorAdress;
  440.     }
  441.     /**
  442.      * @param mixed $mediatorAdress
  443.      */
  444.     public function setMediatorAdress($mediatorAdress): void
  445.     {
  446.         $this->mediatorAdress $mediatorAdress;
  447.     }
  448.     /**
  449.      * @return mixed
  450.      */
  451.     public function getMediatorZipcode()
  452.     {
  453.         return $this->mediatorZipcode;
  454.     }
  455.     /**
  456.      * @param mixed $mediatorZipcode
  457.      */
  458.     public function setMediatorZipcode($mediatorZipcode): void
  459.     {
  460.         $this->mediatorZipcode $mediatorZipcode;
  461.     }
  462.     /**
  463.      * @return mixed
  464.      */
  465.     public function getMediatorCity()
  466.     {
  467.         return $this->mediatorCity;
  468.     }
  469.     /**
  470.      * @param mixed $mediatorCity
  471.      */
  472.     public function setMediatorCity($mediatorCity): void
  473.     {
  474.         $this->mediatorCity $mediatorCity;
  475.     }
  476.     /**
  477.      * @return mixed
  478.      */
  479.     public function getMediatorWebsite()
  480.     {
  481.         return $this->mediatorWebsite;
  482.     }
  483.     /**
  484.      * @param mixed $mediatorWebsite
  485.      */
  486.     public function setMediatorWebsite($mediatorWebsite): void
  487.     {
  488.         $this->mediatorWebsite $mediatorWebsite;
  489.     }
  490.     /**
  491.      * @return mixed
  492.      */
  493.     public function getOpticianName()
  494.     {
  495.         return $this->opticianName;
  496.     }
  497.     /**
  498.      * @param mixed $opticianName
  499.      */
  500.     public function setOpticianName($opticianName): void
  501.     {
  502.         $this->opticianName $opticianName;
  503.     }
  504.     /**
  505.      * @return mixed
  506.      */
  507.     public function getDiplomaTitle()
  508.     {
  509.         return $this->diplomaTitle;
  510.     }
  511.     /**
  512.      * @param mixed $diplomaTitle
  513.      */
  514.     public function setDiplomaTitle($diplomaTitle): void
  515.     {
  516.         $this->diplomaTitle $diplomaTitle;
  517.     }
  518.     /**
  519.      * @return mixed
  520.      */
  521.     public function getDiplomaCountry()
  522.     {
  523.         return $this->diplomaCountry;
  524.     }
  525.     /**
  526.      * @param mixed $diplomaCountry
  527.      */
  528.     public function setDiplomaCountry($diplomaCountry): void
  529.     {
  530.         $this->diplomaCountry $diplomaCountry;
  531.     }
  532.     /**
  533.      * @return mixed
  534.      */
  535.     public function getFinessIdentifier()
  536.     {
  537.         return $this->finessIdentifier;
  538.     }
  539.     /**
  540.      * @param mixed $finessIdentifier
  541.      */
  542.     public function setFinessIdentifier($finessIdentifier): void
  543.     {
  544.         $this->finessIdentifier $finessIdentifier;
  545.     }
  546. }