package com.ywt.mg.domain.models.enums;

public enum SexEnum {
    Unknown("未知", 0),
    Male("男", 1),
    Female("女", 2);

    private final String displayName;

    private int value = 0;

    SexEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static SexEnum valueOf(int value) {
        switch (value) {
            case 0:
                return Unknown;
            case 1:
                return Male;
            case 2:
                return Female;
            default:
                return Unknown;
        }
    }

}
