Parameters.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Organization;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Entity\Core\File;
  6. use App\Repository\Organization\ParametersRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. #[ApiResource(
  10. collectionOperations: [],
  11. itemOperations: ['get']
  12. )]
  13. #[ORM\Entity(repositoryClass: ParametersRepository::class)]
  14. class Parameters
  15. {
  16. #[ORM\Id]
  17. #[ORM\Column]
  18. #[ORM\GeneratedValue]
  19. private ?int $id = null;
  20. #[ORM\Column(type: 'date', nullable: true)]
  21. private ?\DateTimeInterface $financialDate = null;
  22. #[ORM\Column(type: 'date', nullable: true)]
  23. private ?\DateTimeInterface $musicalDate = null;
  24. #[ORM\Column(type: 'date', nullable: true)]
  25. private ?\DateTimeInterface $startCourseDate = null;
  26. #[ORM\Column(type: 'date', nullable: true)]
  27. private ?\DateTimeInterface $endCourseDate = null;
  28. #[ORM\Column(options: ['default' => false])]
  29. private bool $trackingValidation = false;
  30. #[ORM\Column(options: ['default' => true])]
  31. private bool $editCriteriaNotationByAdminOnly = true;
  32. #[ORM\Column(length: 255, nullable: true)]
  33. private ?string $smsSenderName = null;
  34. #[ORM\Column(options: ['default' => false])]
  35. private bool $logoDonorsMove = false;
  36. #[ORM\Column(length: 255, nullable: true)]
  37. private ?string $subDomain = null;
  38. #[ORM\Column(length: 255, nullable: true)]
  39. private ?string $website = null;
  40. #[ORM\Column(length: 255, nullable: true)]
  41. private ?string $otherWebsite = null;
  42. #[ORM\Column(options: ['default' => false])]
  43. private bool $desactivateOpentalentSiteWeb = false;
  44. #[ORM\Column(length: 255, nullable: true)]
  45. #[Assert\Choice(callback: ['\App\Enum\Organization\OpcBulletinPeriodEnumaEnum', 'toArray'], message: 'invalid-bulletin-period')]
  46. private ?string $bulletinPeriod = null;
  47. #[ORM\Column(options: ['default' => false])]
  48. private bool $bulletinWithTeacher = false;
  49. #[ORM\Column(options: ['default' => false])]
  50. private bool $bulletinPrintAddress = false;
  51. #[ORM\Column(options: ['default' => true])]
  52. private bool $bulletinSignatureDirector = true;
  53. #[ORM\Column(options: ['default' => true])]
  54. private bool $bulletinDisplayLevelAcquired = true;
  55. #[ORM\Column(options: ['default' => false])]
  56. private bool $bulletinShowEducationWithoutEvaluation = false;
  57. #[ORM\Column(options: ['default' => false])]
  58. private bool $bulletinViewTestResults = false;
  59. #[ORM\Column(options: ['default' => false])]
  60. private bool $bulletinShowAbsences = false;
  61. #[ORM\Column(options: ['default' => true])]
  62. private bool $bulletinShowAverages = true;
  63. #[ORM\Column(length: 255, nullable: true)]
  64. #[Assert\Choice(callback: ['\App\Enum\Organization\BulletinOutputEnum', 'toArray'], message: 'invalid-bulletin-output')]
  65. private ?string $bulletinOutput = null;
  66. #[ORM\Column(length: 255, nullable: true)]
  67. private ?string $usernameSMS = null;
  68. #[ORM\Column(length: 255, nullable: true)]
  69. private ?string $passwordSMS = null;
  70. #[ORM\Column(options: ['default' => true])]
  71. private bool $bulletinEditWithoutEvaluation = true;
  72. #[ORM\Column(length: 255, nullable: true, options: ['default' => 'STUDENTS_AND_THEIR_GUARDIANS'])]
  73. #[Assert\Choice(callback: ['\App\Enum\Organization\SendToBulletinEnum', 'toArray'], message: 'invalid-send-to-bulletin')]
  74. private ?string $bulletinReceiver = null;
  75. #[ORM\Column(options: ['default' => true])]
  76. private bool $showAdherentList = true;
  77. #[ORM\Column(options: ['default' => false])]
  78. private bool $studentsAreAdherents = false;
  79. #[ORM\Column(length: 255, options: ['default' => 'Europe/Paris'])]
  80. #[Assert\Choice(callback: ['\App\Enum\Organization\TimeZoneEnum', 'toArray'], message: 'invalid-timezone')]
  81. private ?string $timezone = "Europe/Paris";
  82. #[ORM\Column(length: 255, nullable: true)]
  83. #[Assert\Choice(callback: ['\App\Enum\Organization\PeriodicityEnum', 'toArray'], message: 'invalid-periodicity')]
  84. private ?string $educationPeriodicity = null;
  85. #[ORM\OneToOne(cascade: ['persist', 'remove'])]
  86. private File $qrCode;
  87. public function getId(): ?int
  88. {
  89. return $this->id;
  90. }
  91. public function getFinancialDate(): ?\DateTimeInterface
  92. {
  93. return $this->financialDate;
  94. }
  95. public function setFinancialDate(?\DateTimeInterface $financialDate): self
  96. {
  97. $this->financialDate = $financialDate;
  98. return $this;
  99. }
  100. public function getMusicalDate(): ?\DateTimeInterface
  101. {
  102. return $this->musicalDate;
  103. }
  104. public function setMusicalDate(?\DateTimeInterface $musicalDate): self
  105. {
  106. $this->musicalDate = $musicalDate;
  107. return $this;
  108. }
  109. public function getStartCourseDate(): ?\DateTimeInterface
  110. {
  111. return $this->startCourseDate;
  112. }
  113. public function setStartCourseDate(?\DateTimeInterface $startCourseDate): self
  114. {
  115. $this->startCourseDate = $startCourseDate;
  116. return $this;
  117. }
  118. public function getEndCourseDate(): ?\DateTimeInterface
  119. {
  120. return $this->endCourseDate;
  121. }
  122. public function setEndCourseDate(?\DateTimeInterface $endCourseDate): self
  123. {
  124. $this->endCourseDate = $endCourseDate;
  125. return $this;
  126. }
  127. public function getTrackingValidation(): bool
  128. {
  129. return $this->trackingValidation;
  130. }
  131. public function setTrackingValidation(bool $trackingValidation): self
  132. {
  133. $this->trackingValidation = $trackingValidation;
  134. return $this;
  135. }
  136. public function getEditCriteriaNotationByAdminOnly(): bool
  137. {
  138. return $this->editCriteriaNotationByAdminOnly;
  139. }
  140. public function setEditCriteriaNotationByAdminOnly(bool $editCriteriaNotationByAdminOnly): self
  141. {
  142. $this->editCriteriaNotationByAdminOnly = $editCriteriaNotationByAdminOnly;
  143. return $this;
  144. }
  145. public function getSmsSenderName(): ?string
  146. {
  147. return $this->smsSenderName;
  148. }
  149. public function setSmsSenderName(?string $smsSenderName): self
  150. {
  151. $this->smsSenderName = $smsSenderName;
  152. return $this;
  153. }
  154. public function getLogoDonorsMove(): bool
  155. {
  156. return $this->logoDonorsMove;
  157. }
  158. public function setLogoDonorsMove(bool $logoDonorsMove): self
  159. {
  160. $this->logoDonorsMove = $logoDonorsMove;
  161. return $this;
  162. }
  163. public function getSubDomain(): ?string
  164. {
  165. return $this->subDomain;
  166. }
  167. public function setSubDomain(?string $subDomain): self
  168. {
  169. $this->subDomain = $subDomain;
  170. return $this;
  171. }
  172. public function getWebsite(): ?string
  173. {
  174. return $this->website;
  175. }
  176. public function setWebsite(?string $website): self
  177. {
  178. $this->website = $website;
  179. return $this;
  180. }
  181. public function getOtherWebsite(): ?string
  182. {
  183. return $this->otherWebsite;
  184. }
  185. public function setOtherWebsite(?string $otherWebsite): self
  186. {
  187. $this->otherWebsite = $otherWebsite;
  188. return $this;
  189. }
  190. public function getDesactivateOpentalentSiteWeb(): bool
  191. {
  192. return $this->desactivateOpentalentSiteWeb;
  193. }
  194. public function setDesactivateOpentalentSiteWeb(bool $desactivateOpentalentSiteWeb): self
  195. {
  196. $this->desactivateOpentalentSiteWeb = $desactivateOpentalentSiteWeb;
  197. return $this;
  198. }
  199. public function getBulletinPeriod(): ?string
  200. {
  201. return $this->bulletinPeriod;
  202. }
  203. public function setBulletinPeriod(?string $bulletinPeriod): self
  204. {
  205. $this->bulletinPeriod = $bulletinPeriod;
  206. return $this;
  207. }
  208. public function getBulletinWithTeacher(): bool
  209. {
  210. return $this->bulletinWithTeacher;
  211. }
  212. public function setBulletinWithTeacher(bool $bulletinWithTeacher): self
  213. {
  214. $this->bulletinWithTeacher = $bulletinWithTeacher;
  215. return $this;
  216. }
  217. public function getBulletinPrintAddress(): bool
  218. {
  219. return $this->bulletinPrintAddress;
  220. }
  221. public function setBulletinPrintAddress(bool $bulletinPrintAddress): self
  222. {
  223. $this->bulletinPrintAddress = $bulletinPrintAddress;
  224. return $this;
  225. }
  226. public function getBulletinSignatureDirector(): bool
  227. {
  228. return $this->bulletinSignatureDirector;
  229. }
  230. public function setBulletinSignatureDirector(bool $bulletinSignatureDirector): self
  231. {
  232. $this->bulletinSignatureDirector = $bulletinSignatureDirector;
  233. return $this;
  234. }
  235. public function getBulletinDisplayLevelAcquired(): bool
  236. {
  237. return $this->bulletinDisplayLevelAcquired;
  238. }
  239. public function setBulletinDisplayLevelAcquired(bool $bulletinDisplayLevelAcquired): self
  240. {
  241. $this->bulletinDisplayLevelAcquired = $bulletinDisplayLevelAcquired;
  242. return $this;
  243. }
  244. public function getBulletinShowEducationWithoutEvaluation(): bool
  245. {
  246. return $this->bulletinShowEducationWithoutEvaluation;
  247. }
  248. public function setBulletinShowEducationWithoutEvaluation(bool $bulletinShowEducationWithoutEvaluation): self
  249. {
  250. $this->bulletinShowEducationWithoutEvaluation = $bulletinShowEducationWithoutEvaluation;
  251. return $this;
  252. }
  253. public function getBulletinViewTestResults(): bool
  254. {
  255. return $this->bulletinViewTestResults;
  256. }
  257. public function setBulletinViewTestResults(bool $bulletinViewTestResults): self
  258. {
  259. $this->bulletinViewTestResults = $bulletinViewTestResults;
  260. return $this;
  261. }
  262. public function getBulletinShowAbsences(): bool
  263. {
  264. return $this->bulletinShowAbsences;
  265. }
  266. public function setBulletinShowAbsences(bool $bulletinShowAbsences): self
  267. {
  268. $this->bulletinShowAbsences = $bulletinShowAbsences;
  269. return $this;
  270. }
  271. public function getBulletinShowAverages(): bool
  272. {
  273. return $this->bulletinShowAverages;
  274. }
  275. public function setBulletinShowAverages(bool $bulletinShowAverages): self
  276. {
  277. $this->bulletinShowAverages = $bulletinShowAverages;
  278. return $this;
  279. }
  280. public function getBulletinOutput(): ?string
  281. {
  282. return $this->bulletinOutput;
  283. }
  284. public function setBulletinOutput(?string $bulletinOutput): self
  285. {
  286. $this->bulletinOutput = $bulletinOutput;
  287. return $this;
  288. }
  289. public function getUsernameSMS(): ?string
  290. {
  291. return $this->usernameSMS;
  292. }
  293. public function setUsernameSMS(?string $usernameSMS): self
  294. {
  295. $this->usernameSMS = $usernameSMS;
  296. return $this;
  297. }
  298. public function getPasswordSMS(): ?string
  299. {
  300. return $this->passwordSMS;
  301. }
  302. public function setPasswordSMS(?string $passwordSMS): self
  303. {
  304. $this->passwordSMS = $passwordSMS;
  305. return $this;
  306. }
  307. public function getBulletinEditWithoutEvaluation(): bool
  308. {
  309. return $this->bulletinEditWithoutEvaluation;
  310. }
  311. public function setBulletinEditWithoutEvaluation(bool $bulletinEditWithoutEvaluation): self
  312. {
  313. $this->bulletinEditWithoutEvaluation = $bulletinEditWithoutEvaluation;
  314. return $this;
  315. }
  316. public function getBulletinReceiver(): ?string
  317. {
  318. return $this->bulletinReceiver;
  319. }
  320. public function setBulletinReceiver(?string $bulletinReceiver): self
  321. {
  322. $this->bulletinReceiver = $bulletinReceiver;
  323. return $this;
  324. }
  325. public function getShowAdherentList(): bool
  326. {
  327. return $this->showAdherentList;
  328. }
  329. public function setShowAdherentList(bool $showAdherentList): self
  330. {
  331. $this->showAdherentList = $showAdherentList;
  332. return $this;
  333. }
  334. public function getStudentsAreAdherents(): bool
  335. {
  336. return $this->studentsAreAdherents;
  337. }
  338. public function setStudentsAreAdherents(bool $studentsAreAdherents): self
  339. {
  340. $this->studentsAreAdherents = $studentsAreAdherents;
  341. return $this;
  342. }
  343. public function getTimezone(): string
  344. {
  345. return $this->timezone;
  346. }
  347. public function setTimezone(string $timezone): self
  348. {
  349. $this->timezone = $timezone;
  350. return $this;
  351. }
  352. public function getEducationPeriodicity(): ?string
  353. {
  354. return $this->educationPeriodicity;
  355. }
  356. public function setEducationPeriodicity(?string $educationPeriodicity): self
  357. {
  358. $this->educationPeriodicity = $educationPeriodicity;
  359. return $this;
  360. }
  361. /**
  362. * @return File
  363. */
  364. public function getQrCode(): File
  365. {
  366. return $this->qrCode;
  367. }
  368. /**
  369. * @param File $qrCode
  370. */
  371. public function setQrCode(File $qrCode): void
  372. {
  373. $this->qrCode = $qrCode;
  374. }
  375. }