package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumTagType {

    ID_1(1L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "性别"),
    ID_2(2L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "年龄"),
    ID_3(3L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "生肖"),
    ID_4(4L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "星座"),
    ID_5(5L,   EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_1, "来源"),
    ID_6(6L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "学历"),
    ID_7(7L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_1, "手机运营商"),
    ID_8(8L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "月收入"),
    ID_9(9L,   EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "手机品牌"),
    ID_10(10L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "婚姻家庭"),
    ID_11(11L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "车辆情况"),
    ID_12(12L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "职业"),
    ID_13(13L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_2, "住房情况"),
    ID_14(14L, EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_3, "消费类别"),
    ID_15(15L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_3, "消费档次"),
    ID_16(16L, EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_3, "品牌偏好"),
    ID_17(17L, EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_3, "饮食偏好"),
    ID_18(18L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_3, "消费时间段"),
    ID_19(19L, EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_3, "支付习惯"),
    ID_20(20L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "会员消费观"),
    ID_21(21L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "消费频率"),
    ID_22(22L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "活跃度"),
    ID_23(23L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "客单价"),
    ID_24(24L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "会员性格"),
    ID_25(25L, EnumTagTypeFlag.FLAG_NORMAL,  EnumTagGroup.ID_4, "爱好"),
    ID_26(26L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_4, "生活半径"),

    ID_27(27L, EnumTagTypeFlag.FLAG_SINGLE, EnumTagGroup.ID_1, "服饰尺码"),
    ID_28(28L, EnumTagTypeFlag.FLAG_SINGLE, EnumTagGroup.ID_1, "鞋尺码"),

    ID_0(0L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员手机"),
    ID_50(50L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员会龄"),
    ID_51(51L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员等级"),
    ID_52(52L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员生日"),
    ID_53(53L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员活跃"),
    ID_54(54L, EnumTagTypeFlag.FLAG_SINGLE,  EnumTagGroup.ID_10, "会员消费"),
    ;

    public static EnumTagType getEnum(Long code) {
        for (EnumTagType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Long code;
    private EnumTagTypeFlag flag;
    private EnumTagGroup group;
    private String message;


    EnumTagType(Long code, EnumTagTypeFlag flag, EnumTagGroup group, String message) {
        this.code = code;
        this.flag = flag;
        this.group = group;
        this.message = message;
    }


    public Long getCode() {
        return code;
    }

    public EnumTagTypeFlag getFlag() {
        return flag;
    }

    public EnumTagGroup getGroup() {
        return group;
    }

    public String getMessage() {
        return message;
    }
}
