Parameters.php 12 KB

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