You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
400 B
29 lines
400 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Dictionary\Patient;
|
|
|
|
/**
|
|
* 性别
|
|
*/
|
|
enum Sex: int
|
|
{
|
|
case MALE = 1;
|
|
|
|
case WOMEN = 2;
|
|
|
|
case UNKNOWN = 9;
|
|
|
|
/**
|
|
* Label string
|
|
*/
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::MALE => '男',
|
|
self::WOMEN => '女',
|
|
self::UNKNOWN => '不详',
|
|
};
|
|
}
|
|
}
|
|
|