package com.cirle.scientific.pojo;/*
 *24901
 *2022/12/26
 *16:21
 */

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 24901
 */

@Getter
@AllArgsConstructor
public enum SexEnum {


    MAN(1, "男"),

    GIRL(2, "女");

    /**
     * 性别类型
     */
    private final Integer type;
    /**
     * 性别
     */
    private final String name;

    public static SexEnum valueOf(Integer type) {
        return ArrayUtil.firstMatch(sexType -> sexType.getType().equals(type), SexEnum.values());
    }

}
