package com.zhyc.module.enums;

public enum Gender {
    MU(1, "母"),
    GONG(2, "公"),
    YANYANG(3, "腌羊"),
    JIANXING(4, "兼性");

    private final int code;
    private final String desc;

    Gender(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(Integer code) {
        for (Gender g : values()) {
            if (g.code == code) {
                return g.desc;
            }
        }
        return "未知";
    }
}