芝麻web文件管理V1.00
编辑当前文件:/home/c7lekhnath/silverray.com.au/Modules/Subscription/app/Enums/SubscriptionFeatures.php
[ 'column' => self::COURSES_LIMIT->value, 'type' => 'integer', 'nullable' => true, 'default' => 0, 'comment' => 'null = unlimited', 'unlimited' => null, ], self::COURSE_MAX_PRICE => [ 'column' => self::COURSE_MAX_PRICE->value, 'type' => 'integer', 'nullable' => true, 'default' => 0, 'comment' => '0 = unlimited', 'unlimited' => 0, 'is_price' => true, ], self::COURSE_NOTIFICATION => [ 'column' => self::COURSE_NOTIFICATION->value, 'type' => 'boolean', 'nullable' => false, 'default' => 0, ], self::EMAIL_SUPPORT => [ 'column' => self::EMAIL_SUPPORT->value, 'type' => 'boolean', 'nullable' => false, 'default' => 0, ], self::PHONE_SUPPORT => [ 'column' => self::PHONE_SUPPORT->value, 'type' => 'boolean', 'nullable' => false, 'default' => 0, ], self::FORUM_SUPPORT => [ 'column' => self::FORUM_SUPPORT->value, 'type' => 'boolean', 'nullable' => false, 'default' => 0, ], }; } public static function all(): array { return array_map(fn ($case) => $case->getColumns(), self::cases()); } public static function allColumns() { return array_map(fn ($case) => $case->value, self::cases()); } public function getLabel(): string { return match ($this) { self::COURSES_LIMIT => __('Course Accessible'), self::COURSE_MAX_PRICE => __('Max Course Price'), self::COURSE_NOTIFICATION => __('Get Course Notification'), self::EMAIL_SUPPORT => __('Full Email Support'), self::PHONE_SUPPORT => __('Phone Calling Support'), self::FORUM_SUPPORT => __('Forum Access'), }; } public function getClassName(): string { return match ($this) { self::COURSES_LIMIT => 'deactivate', self::COURSE_MAX_PRICE => '', self::COURSE_NOTIFICATION => 'deactivate', self::EMAIL_SUPPORT => 'deactivate', self::PHONE_SUPPORT => 'deactivate', self::FORUM_SUPPORT => 'deactivate', }; } }