package com.qmth.sop.common.enums;

/**
 * @Description: 性别enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/1/24
 */
public enum GenderEnum {

    MAN("男"),

    WOMAN("女");

    private String title;

    private GenderEnum(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public static GenderEnum convertTitleToEnum(String title) {
        GenderEnum res = null;
        for (GenderEnum value : GenderEnum.values()) {
            if (title.equals(value.getTitle())) {
                res = value;
            }
        }
        return res;
    }
}
