SettingsProductEnum.php 938 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Enum\Organization;
  4. use MyCLabs\Enum\Enum;
  5. /**
  6. * Type de produit disponible pour une organisation
  7. * @method static SCHOOL()
  8. */
  9. class SettingsProductEnum extends Enum
  10. {
  11. private const ARTIST = 'artist';
  12. private const ARTIST_PREMIUM = 'artist-premium';
  13. private const SCHOOL = 'school';
  14. private const SCHOOL_PREMIUM = 'school-premium';
  15. private const MANAGER = 'manager';
  16. private const MANAGER_PREMIUM = 'manager-premium';
  17. public static function isArtist(string $product): bool {
  18. return $product === self::ARTIST || $product === self::ARTIST_PREMIUM;
  19. }
  20. public static function isSchool(string $product): bool {
  21. return $product === self::SCHOOL || $product === self::SCHOOL_PREMIUM;
  22. }
  23. public static function isManager(string $product): bool {
  24. return $product === self::MANAGER || $product === self::MANAGER_PREMIUM;
  25. }
  26. }