package com.ltgk.common.enums;

/**
 * @Author: w1826
 * @Description: TODO
 * @Date: 2025/1/21 14:23
 * @Version: 1.0
 */
public enum SexTypeEnums {
    // 性别:1-男;2-女
    MAN("1", "男"),
    WOMAN("2", "女");
    private final String code;
    private final String message;

    SexTypeEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessage(String code) {
        for (SexTypeEnums sexTypeEnums : SexTypeEnums.values()) {
            if (sexTypeEnums.getCode().equals(code)) {
                return sexTypeEnums.message;
            }
        }
        return null;
    }
}
