1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Edm\Container;
6:
7: use LaravelUi5\OData\Edm\Contracts\Annotation\AnnotationInterface;
8: use LaravelUi5\OData\Edm\Contracts\Type\EnumMemberInterface;
9: use LaravelUi5\OData\Edm\HasAnnotations;
10:
11: final readonly class EnumMember implements EnumMemberInterface
12: {
13: use HasAnnotations;
14:
15: /**
16: * @param list<AnnotationInterface> $annotations
17: */
18: public function __construct(
19: private string $name,
20: private int $value,
21: array $annotations = [],
22: ) {
23: $this->annotations = $annotations;
24: }
25:
26: public function getName(): string
27: {
28: return $this->name;
29: }
30:
31: public function getValue(): int
32: {
33: return $this->value;
34: }
35: }
36: