jikan-rest/app/Enums/MangaListStatusEnum.php
pushrbx fbc3b8277d wip - more fixes
- added user animelist/mangalist endpoints back
- fixed issues with the container image
- improved club model factory
- fixed ordering while searching when search engine is disabled (mongodb based search)
2023-05-21 11:18:02 +01:00

39 lines
1.0 KiB
PHP

<?php
namespace App\Enums;
use Spatie\Enum\Laravel\Enum;
/**
* @method static self all()
* @method static self reading()
* @method static self completed()
* @method static self onhold()
* @method static self dropped()
* @method static self plantoread()
*
* @OA\Schema(
* schema="user_manga_list_status_filter",
* description="User's anime list status filter options",
* type="string",
* enum={"all", "reading", "completed", "onhold", "dropped", "plantoread"}
* )
*/
final class MangaListStatusEnum extends Enum
{
// labels will be the values used for mapping, meanwhile the values are the names of the enum elements,
// because these are getting passed in through the query string in requests, and we validate against them
protected static function labels(): array
{
return [
"all" => "7",
"reading" => "1",
"completed" => "2",
"onhold" => "3",
"dropped" => "4",
"plantoread" => "6"
];
}
}