src/Entity/Core/Agencies.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\DBAL\Types\Types;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. use Symfony\Component\HttpFoundation\File\UploadedFile;
  10. use Vich\UploaderBundle\Entity\File as EmbeddedFile;
  11. /**
  12. * Agencies
  13. *
  14. * @ORM\Table("core_agencies")
  15. * @ORM\Entity(repositoryClass="App\Repository\Core\AgenciesRepository")
  16. * @ORM\HasLifecycleCallbacks()
  17. * @Vich\Uploadable
  18. */
  19. class Agencies
  20. {
  21. /**
  22. * @var integer
  23. *
  24. * @ORM\Column(name="id", type="integer")
  25. * @ORM\Id
  26. * @ORM\GeneratedValue(strategy="AUTO")
  27. */
  28. protected $id;
  29. /**
  30. * @var string
  31. *
  32. * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  33. */
  34. private $createdAt;
  35. /**
  36. * @var string
  37. *
  38. * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  39. */
  40. private $updatedAt;
  41. /**
  42. * @var string
  43. *
  44. * @ORM\Column(name="title", type="string", length=255, nullable=true)
  45. */
  46. private $title;
  47. /**
  48. * @var string
  49. *
  50. * @ORM\Column(name="description", type="text", nullable=true)
  51. */
  52. private $description;
  53. /**
  54. * @var string
  55. *
  56. * @ORM\Column(name="slug", type="string", length=255, nullable=true)
  57. */
  58. private $slug;
  59. /**
  60. * @var string
  61. *
  62. * @ORM\Column(name="valide", type="boolean", nullable=false)
  63. */
  64. private $valide;
  65. /**
  66. * @var string
  67. *
  68. * @ORM\Column(name="point_x", type="string", length=255, nullable=true)
  69. */
  70. private $pointX;
  71. /**
  72. * @var string
  73. *
  74. * @ORM\Column(name="point_y", type="string", length=255, nullable=true)
  75. */
  76. private $pointY;
  77. /**
  78. * @var string
  79. *
  80. * @ORM\Column(name="address", type="text", nullable=true)
  81. */
  82. private $address;
  83. /**
  84. * @var string
  85. *
  86. * @ORM\Column(name="city", type="text", nullable=true)
  87. */
  88. private $city;
  89. /**
  90. * @var string
  91. *
  92. * @ORM\Column(name="country", type="text", nullable=true)
  93. */
  94. private $country;
  95. /**
  96. * @var string
  97. *
  98. * @ORM\Column(name="zipcode", type="text", nullable=true)
  99. */
  100. private $zipcode;
  101. /**
  102. * @var string
  103. *
  104. * @ORM\Column(name="phone", type="text", nullable=true)
  105. */
  106. private $phone;
  107. /**
  108. * @var string
  109. *
  110. * @ORM\Column(name="phone2", type="text", nullable=true)
  111. */
  112. private $phone2;
  113. /**
  114. * @var string
  115. *
  116. * @ORM\Column(name="email", type="text", nullable=true)
  117. */
  118. private $email;
  119. /**
  120. * @var string
  121. *
  122. * @ORM\Column(name="website", type="boolean", nullable=true)
  123. */
  124. private $website;
  125. /**
  126. * @var string
  127. *
  128. * @ORM\Column(name="website_url", type="text", nullable=true)
  129. */
  130. private $websiteUrl;
  131. /**
  132. * NOTE: This is not a mapped field of entity metadata, just a simple property.
  133. *
  134. * @Vich\UploadableField(mapping="agencies_files", fileNameProperty="image.name", size="image.size", mimeType="image.mimeType", originalName="image.originalName", dimensions="image.dimensions")
  135. *
  136. * @var File|null
  137. */
  138. private $imageFile;
  139. /**
  140. * @ORM\Embedded(class="Vich\UploaderBundle\Entity\File")
  141. *
  142. * @var EmbeddedFile
  143. */
  144. private $image;
  145. /**
  146. * @var string
  147. *
  148. * @ORM\Column(name="premium", type="boolean", nullable=true)
  149. */
  150. private $premium;
  151. /**
  152. * @var string
  153. *
  154. * @ORM\Column(name="premium_application", type="boolean", nullable=true)
  155. */
  156. private $premiumApplication;
  157. /**
  158. * @var string
  159. *
  160. * @ORM\Column(name="premium_gpt", type="boolean", nullable=true)
  161. */
  162. private $premiumGpt;
  163. /**
  164. * @var string
  165. *
  166. * @ORM\Column(name="premium_syndic", type="boolean", nullable=true)
  167. */
  168. private $premiumSyndic;
  169. /**
  170. * @var string
  171. *
  172. * @ORM\Column(name="courses_no_payment", type="boolean", nullable=true)
  173. */
  174. private $coursesNoPayment;
  175. /**
  176. * @var string
  177. *
  178. * @ORM\Column(name="generated_bills", type="boolean", nullable=true)
  179. */
  180. private $generatedBills;
  181. /**
  182. * @var string
  183. *
  184. * @ORM\Column(name="limited_user", type="integer", length=11, nullable=true)
  185. */
  186. private $limitedUsers;
  187. /**
  188. * @var string
  189. *
  190. * @ORM\Column(name="limited_courses", type="integer", length=11, nullable=true)
  191. */
  192. private $limitedCourses;
  193. /**
  194. * @var string
  195. *
  196. * @ORM\Column(name="limited_qcm", type="integer", length=11, nullable=true)
  197. */
  198. private $limitedQcm;
  199. /**
  200. * @var string
  201. *
  202. * @ORM\Column(name="limited_houses", type="integer", length=11, nullable=true)
  203. */
  204. private $limitedHouses;
  205. /**
  206. * @var string
  207. *
  208. * @ORM\Column(name="limited_qcm_application", type="integer", length=11, nullable=true)
  209. */
  210. private $limitedQcmApplication;
  211. /**
  212. * @var string
  213. *
  214. * @ORM\Column(name="fiche_website", type="boolean", nullable=true)
  215. */
  216. private $ficheWebsite;
  217. /**
  218. * @var string
  219. *
  220. * @ORM\Column(name="siret", type="text", nullable=true)
  221. */
  222. private $siret;
  223. /**
  224. * @var string
  225. *
  226. * @ORM\Column(name="pourcent_commission", type="float", nullable=true)
  227. */
  228. private $pourcentCommission;
  229. /**
  230. * @var string
  231. *
  232. * @ORM\Column(name="pourcent_commission_bank", type="float", nullable=true)
  233. */
  234. private $pourcentCommissionBank;
  235. /**
  236. * @var string
  237. *
  238. * @ORM\Column(name="commission_centimes_bank", type="float", nullable=true)
  239. */
  240. private $commissionCentimesBank;
  241. /**
  242. * @var string
  243. *
  244. * @ORM\Column(name="multiple_inscription", type="boolean", nullable=true)
  245. */
  246. private $multipleInscription;
  247. /**
  248. * @var string
  249. *
  250. * @ORM\Column(name="stripe", type="boolean", nullable=true)
  251. */
  252. private $stripe;
  253. /**
  254. * @var string
  255. *
  256. * @ORM\Column(name="demonstration", type="boolean", nullable=true)
  257. */
  258. private $demonstration;
  259. /**
  260. * @var string
  261. *
  262. * @ORM\Column(name="discussion", type="boolean", nullable=true)
  263. */
  264. private $discussion;
  265. /**
  266. * @var string
  267. *
  268. * @ORM\Column(name="openai", type="text", nullable=true)
  269. */
  270. private $openai;
  271. /**
  272. * @var string
  273. *
  274. * @ORM\Column(name="gpt_discussion", type="boolean", nullable=true)
  275. */
  276. private $gptDiscussion;
  277. /**
  278. * @var string
  279. *
  280. * @ORM\Column(name="premium_enterprise", type="boolean", nullable=true)
  281. */
  282. private $premiumEnterprise;
  283. /**
  284. * @var \Users
  285. *
  286. * @ORM\ManyToOne(targetEntity="App\Entity\Core\Users")
  287. * @ORM\JoinColumns({
  288. * @ORM\JoinColumn(name="user_partner_id", referencedColumnName="id", nullable=true)
  289. * })
  290. */
  291. protected $userPartner;
  292. /**
  293. * @var string
  294. *
  295. * @ORM\Column(name="subscription", type="integer", length=11, nullable=true)
  296. */
  297. private $subscription;
  298. /**
  299. * @var string
  300. *
  301. * @ORM\Column(name="no_commission", type="boolean", nullable=true)
  302. */
  303. private $noCommission;
  304. /**
  305. * @var string
  306. *
  307. * @ORM\Column(name="no_user_commission", type="boolean", nullable=true)
  308. */
  309. private $noUserCommission;
  310. /**
  311. * @var string
  312. *
  313. * @ORM\Column(name="first", type="boolean", nullable=true)
  314. */
  315. private $first;
  316. /**
  317. * @var string
  318. *
  319. * @ORM\Column(name="subscription_customer_stripe", type="string", length=255, nullable=true)
  320. */
  321. private $subscriptionCustomerStripe;
  322. public function __construct()
  323. {
  324. $this->image = new \Vich\UploaderBundle\Entity\File();
  325. }
  326. /**
  327. * @ORM\PrePersist
  328. */
  329. public function setCreatedAtValue(): void
  330. {
  331. $this->setCreatedAt(new \DateTime("now"));
  332. $this->setUpdatedAt(new \DateTime("now"));
  333. }
  334. /**
  335. * @ORM\PreUpdate
  336. */
  337. public function setUpdatedAtValue(): void
  338. {
  339. $this->setUpdatedAt(new \DateTime("now"));
  340. }
  341. public function __toString()
  342. {
  343. if($this->title != null){
  344. return $this->title;
  345. }
  346. return "Identifiant #".$this->id;
  347. }
  348. /**
  349. * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  350. * of 'UploadedFile' is injected into this setter to trigger the update. If this
  351. * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  352. * must be able to accept an instance of 'File' as the bundle will inject one here
  353. * during Doctrine hydration.
  354. *
  355. * @param File|UploadedFile|null $imageFile
  356. */
  357. public function setImageFile(?File $imageFile = null)
  358. {
  359. $this->imageFile = $imageFile;
  360. if (null !== $imageFile) {
  361. // It is required that at least one field changes if you are using doctrine
  362. // otherwise the event listeners won't be called and the file is lost
  363. $this->setUpdatedAt(new \DateTime("now"));
  364. }
  365. }
  366. public function getImageFile(): ?File
  367. {
  368. return $this->imageFile;
  369. }
  370. public function setImage(EmbeddedFile $image): void
  371. {
  372. $this->image = $image;
  373. }
  374. public function getImage(): ?EmbeddedFile
  375. {
  376. return $this->image;
  377. }
  378. public function getId(): ?int
  379. {
  380. return $this->id;
  381. }
  382. public function getCreatedAt(): ?\DateTimeInterface
  383. {
  384. return $this->createdAt;
  385. }
  386. public function setCreatedAt(?\DateTimeInterface $createdAt): self
  387. {
  388. $this->createdAt = $createdAt;
  389. return $this;
  390. }
  391. public function getUpdatedAt(): ?\DateTimeInterface
  392. {
  393. return $this->updatedAt;
  394. }
  395. public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  396. {
  397. $this->updatedAt = $updatedAt;
  398. return $this;
  399. }
  400. public function getTitle(): ?string
  401. {
  402. return $this->title;
  403. }
  404. public function setTitle(?string $title): self
  405. {
  406. $this->title = $title;
  407. return $this;
  408. }
  409. public function getDescription(): ?string
  410. {
  411. return $this->description;
  412. }
  413. public function setDescription(?string $description): self
  414. {
  415. $this->description = $description;
  416. return $this;
  417. }
  418. public function getSlug(): ?string
  419. {
  420. return $this->slug;
  421. }
  422. public function setSlug(?string $slug): self
  423. {
  424. $this->slug = $slug;
  425. return $this;
  426. }
  427. public function getValide(): ?bool
  428. {
  429. return $this->valide;
  430. }
  431. public function setValide(bool $valide): self
  432. {
  433. $this->valide = $valide;
  434. return $this;
  435. }
  436. public function getPointX(): ?string
  437. {
  438. return $this->pointX;
  439. }
  440. public function setPointX(?string $pointX): self
  441. {
  442. $this->pointX = $pointX;
  443. return $this;
  444. }
  445. public function getPointY(): ?string
  446. {
  447. return $this->pointY;
  448. }
  449. public function setPointY(?string $pointY): self
  450. {
  451. $this->pointY = $pointY;
  452. return $this;
  453. }
  454. public function getAddress(): ?string
  455. {
  456. return $this->address;
  457. }
  458. public function setAddress(?string $address): self
  459. {
  460. $this->address = $address;
  461. return $this;
  462. }
  463. public function getCity(): ?string
  464. {
  465. return $this->city;
  466. }
  467. public function setCity(?string $city): self
  468. {
  469. $this->city = $city;
  470. return $this;
  471. }
  472. public function getCountry(): ?string
  473. {
  474. return $this->country;
  475. }
  476. public function setCountry(?string $country): self
  477. {
  478. $this->country = $country;
  479. return $this;
  480. }
  481. public function getZipcode(): ?string
  482. {
  483. return $this->zipcode;
  484. }
  485. public function setZipcode(?string $zipcode): self
  486. {
  487. $this->zipcode = $zipcode;
  488. return $this;
  489. }
  490. public function getPhone(): ?string
  491. {
  492. return $this->phone;
  493. }
  494. public function setPhone(?string $phone): self
  495. {
  496. $this->phone = $phone;
  497. return $this;
  498. }
  499. public function getPhone2(): ?string
  500. {
  501. return $this->phone2;
  502. }
  503. public function setPhone2(?string $phone2): self
  504. {
  505. $this->phone2 = $phone2;
  506. return $this;
  507. }
  508. public function getEmail(): ?string
  509. {
  510. return $this->email;
  511. }
  512. public function setEmail(?string $email): self
  513. {
  514. $this->email = $email;
  515. return $this;
  516. }
  517. public function getWebsiteUrl(): ?string
  518. {
  519. return $this->websiteUrl;
  520. }
  521. public function setWebsiteUrl(?string $websiteUrl): self
  522. {
  523. $this->websiteUrl = $websiteUrl;
  524. return $this;
  525. }
  526. public function getWebsite(): ?bool
  527. {
  528. return $this->website;
  529. }
  530. public function setWebsite(?bool $website): self
  531. {
  532. $this->website = $website;
  533. return $this;
  534. }
  535. public function getPremium(): ?bool
  536. {
  537. return $this->premium;
  538. }
  539. public function setPremium(?bool $premium): self
  540. {
  541. $this->premium = $premium;
  542. return $this;
  543. }
  544. public function getPremiumApplication(): ?bool
  545. {
  546. return $this->premiumApplication;
  547. }
  548. public function setPremiumApplication(?bool $premiumApplication): self
  549. {
  550. $this->premiumApplication = $premiumApplication;
  551. return $this;
  552. }
  553. public function getPremiumGpt(): ?bool
  554. {
  555. return $this->premiumGpt;
  556. }
  557. public function setPremiumGpt(?bool $premiumGpt): self
  558. {
  559. $this->premiumGpt = $premiumGpt;
  560. return $this;
  561. }
  562. public function getPremiumSyndic(): ?bool
  563. {
  564. return $this->premiumSyndic;
  565. }
  566. public function setPremiumSyndic(?bool $premiumSyndic): self
  567. {
  568. $this->premiumSyndic = $premiumSyndic;
  569. return $this;
  570. }
  571. public function getCoursesNoPayment(): ?bool
  572. {
  573. return $this->coursesNoPayment;
  574. }
  575. public function setCoursesNoPayment(?bool $coursesNoPayment): self
  576. {
  577. $this->coursesNoPayment = $coursesNoPayment;
  578. return $this;
  579. }
  580. public function getGeneratedBills(): ?bool
  581. {
  582. return $this->generatedBills;
  583. }
  584. public function setGeneratedBills(?bool $generatedBills): self
  585. {
  586. $this->generatedBills = $generatedBills;
  587. return $this;
  588. }
  589. public function getLimitedUsers(): ?int
  590. {
  591. return $this->limitedUsers;
  592. }
  593. public function setLimitedUsers(?int $limitedUsers): self
  594. {
  595. $this->limitedUsers = $limitedUsers;
  596. return $this;
  597. }
  598. public function getLimitedCourses(): ?int
  599. {
  600. return $this->limitedCourses;
  601. }
  602. public function setLimitedCourses(?int $limitedCourses): self
  603. {
  604. $this->limitedCourses = $limitedCourses;
  605. return $this;
  606. }
  607. public function getLimitedQcm(): ?int
  608. {
  609. return $this->limitedQcm;
  610. }
  611. public function setLimitedQcm(?int $limitedQcm): self
  612. {
  613. $this->limitedQcm = $limitedQcm;
  614. return $this;
  615. }
  616. public function getLimitedHouses(): ?int
  617. {
  618. return $this->limitedHouses;
  619. }
  620. public function setLimitedHouses(?int $limitedHouses): self
  621. {
  622. $this->limitedHouses = $limitedHouses;
  623. return $this;
  624. }
  625. public function getLimitedQcmApplication(): ?int
  626. {
  627. return $this->limitedQcmApplication;
  628. }
  629. public function setLimitedQcmApplication(?int $limitedQcmApplication): self
  630. {
  631. $this->limitedQcmApplication = $limitedQcmApplication;
  632. return $this;
  633. }
  634. public function getFicheWebsite(): ?bool
  635. {
  636. return $this->ficheWebsite;
  637. }
  638. public function setFicheWebsite(?bool $ficheWebsite): self
  639. {
  640. $this->ficheWebsite = $ficheWebsite;
  641. return $this;
  642. }
  643. public function getSiret(): ?string
  644. {
  645. return $this->siret;
  646. }
  647. public function setSiret(?string $siret): self
  648. {
  649. $this->siret = $siret;
  650. return $this;
  651. }
  652. public function getPourcentCommission(): ?float
  653. {
  654. return $this->pourcentCommission;
  655. }
  656. public function setPourcentCommission(?float $pourcentCommission): self
  657. {
  658. $this->pourcentCommission = $pourcentCommission;
  659. return $this;
  660. }
  661. public function getPourcentCommissionBank(): ?float
  662. {
  663. return $this->pourcentCommissionBank;
  664. }
  665. public function setPourcentCommissionBank(?float $pourcentCommissionBank): self
  666. {
  667. $this->pourcentCommissionBank = $pourcentCommissionBank;
  668. return $this;
  669. }
  670. public function getCommissionCentimesBank(): ?float
  671. {
  672. return $this->commissionCentimesBank;
  673. }
  674. public function setCommissionCentimesBank(?float $commissionCentimesBank): self
  675. {
  676. $this->commissionCentimesBank = $commissionCentimesBank;
  677. return $this;
  678. }
  679. public function getMultipleInscription(): ?bool
  680. {
  681. return $this->multipleInscription;
  682. }
  683. public function setMultipleInscription(?bool $multipleInscription): self
  684. {
  685. $this->multipleInscription = $multipleInscription;
  686. return $this;
  687. }
  688. public function getStripe(): ?bool
  689. {
  690. return $this->stripe;
  691. }
  692. public function setStripe(?bool $stripe): self
  693. {
  694. $this->stripe = $stripe;
  695. return $this;
  696. }
  697. public function getDemonstration(): ?bool
  698. {
  699. return $this->demonstration;
  700. }
  701. public function setDemonstration(?bool $demonstration): self
  702. {
  703. $this->demonstration = $demonstration;
  704. return $this;
  705. }
  706. public function getDiscussion(): ?bool
  707. {
  708. return $this->discussion;
  709. }
  710. public function setDiscussion(?bool $discussion): self
  711. {
  712. $this->discussion = $discussion;
  713. return $this;
  714. }
  715. public function getOpenai(): ?string
  716. {
  717. return $this->openai;
  718. }
  719. public function setOpenai(?string $openai): self
  720. {
  721. $this->openai = $openai;
  722. return $this;
  723. }
  724. public function getGptDiscussion(): ?bool
  725. {
  726. return $this->gptDiscussion;
  727. }
  728. public function setGptDiscussion(?bool $gptDiscussion): self
  729. {
  730. $this->gptDiscussion = $gptDiscussion;
  731. return $this;
  732. }
  733. public function getPremiumEnterprise(): ?bool
  734. {
  735. return $this->premiumEnterprise;
  736. }
  737. public function setPremiumEnterprise(?bool $premiumEnterprise): self
  738. {
  739. $this->premiumEnterprise = $premiumEnterprise;
  740. return $this;
  741. }
  742. public function getSubscription(): ?int
  743. {
  744. return $this->subscription;
  745. }
  746. public function setSubscription(int $subscription): self
  747. {
  748. $this->subscription = $subscription;
  749. return $this;
  750. }
  751. public function getUserPartner(): ?Users
  752. {
  753. return $this->userPartner;
  754. }
  755. public function setUserPartner(?Users $userPartner): self
  756. {
  757. $this->userPartner = $userPartner;
  758. return $this;
  759. }
  760. public function getNoCommission(): ?bool
  761. {
  762. return $this->noCommission;
  763. }
  764. public function setNoCommission(?bool $noCommission): self
  765. {
  766. $this->noCommission = $noCommission;
  767. return $this;
  768. }
  769. public function getNoUserCommission(): ?bool
  770. {
  771. return $this->noUserCommission;
  772. }
  773. public function setNoUserCommission(?bool $noCommission): self
  774. {
  775. $this->noUserCommission = $noCommission;
  776. return $this;
  777. }
  778. public function getFirst(): ?bool
  779. {
  780. return $this->first;
  781. }
  782. public function setFirst(?bool $first): self
  783. {
  784. $this->first = $first;
  785. return $this;
  786. }
  787. public function isValide(): ?bool
  788. {
  789. return $this->valide;
  790. }
  791. public function isWebsite(): ?bool
  792. {
  793. return $this->website;
  794. }
  795. public function isPremium(): ?bool
  796. {
  797. return $this->premium;
  798. }
  799. public function isPremiumApplication(): ?bool
  800. {
  801. return $this->premiumApplication;
  802. }
  803. public function isPremiumGpt(): ?bool
  804. {
  805. return $this->premiumGpt;
  806. }
  807. public function isPremiumSyndic(): ?bool
  808. {
  809. return $this->premiumSyndic;
  810. }
  811. public function isCoursesNoPayment(): ?bool
  812. {
  813. return $this->coursesNoPayment;
  814. }
  815. public function isGeneratedBills(): ?bool
  816. {
  817. return $this->generatedBills;
  818. }
  819. public function isFicheWebsite(): ?bool
  820. {
  821. return $this->ficheWebsite;
  822. }
  823. public function isMultipleInscription(): ?bool
  824. {
  825. return $this->multipleInscription;
  826. }
  827. public function isStripe(): ?bool
  828. {
  829. return $this->stripe;
  830. }
  831. public function isDemonstration(): ?bool
  832. {
  833. return $this->demonstration;
  834. }
  835. public function isDiscussion(): ?bool
  836. {
  837. return $this->discussion;
  838. }
  839. public function isGptDiscussion(): ?bool
  840. {
  841. return $this->gptDiscussion;
  842. }
  843. public function isPremiumEnterprise(): ?bool
  844. {
  845. return $this->premiumEnterprise;
  846. }
  847. public function isNoCommission(): ?bool
  848. {
  849. return $this->noCommission;
  850. }
  851. public function isNoUserCommission(): ?bool
  852. {
  853. return $this->noUserCommission;
  854. }
  855. public function isFirst(): ?bool
  856. {
  857. return $this->first;
  858. }
  859. public function getSubscriptionCustomerStripe(): ?string
  860. {
  861. return $this->subscriptionCustomerStripe;
  862. }
  863. public function setSubscriptionCustomerStripe(?string $subscriptionCustomerStripe): static
  864. {
  865. $this->subscriptionCustomerStripe = $subscriptionCustomerStripe;
  866. return $this;
  867. }
  868. }