-
-
Notifications
You must be signed in to change notification settings - Fork 176
/
BookCondition.php
39 lines (31 loc) · 1.02 KB
/
BookCondition.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace App\Enum;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
/**
* A list of possible conditions for the item.
*
* @see https://schema.org/OfferItemCondition
*/
#[ApiResource(
shortName: 'BookCondition',
types: ['https://schema.org/OfferItemCondition'],
operations: [
new GetCollection(provider: BookCondition::class . '::getCases'),
new Get(provider: BookCondition::class . '::getCase'),
],
)]
enum BookCondition: string
{
use EnumApiResourceTrait;
/** Indicates that the item is new. */
case NewCondition = 'https://schema.org/NewCondition';
/** Indicates that the item is refurbished. */
case RefurbishedCondition = 'https://schema.org/RefurbishedCondition';
/** Indicates that the item is damaged. */
case DamagedCondition = 'https://schema.org/DamagedCondition';
/** Indicates that the item is used. */
case UsedCondition = 'https://schema.org/UsedCondition';
}