CouponTypeEnum.java 704 字节
Newer Older
H
haoxr 已提交
1
package com.youlai.mall.sms.enums;
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.youlai.common.base.IBaseEnum;
import lombok.Getter;

@Getter
public enum CouponTypeEnum implements IBaseEnum<Integer> {

    WZ(0, null),
    MJ(1, "满减券"),
    ZJ(2, "直减券"),
    ZK(3, "折扣券")
    ;

    @Getter
    @EnumValue //  Mybatis-Plus 提供注解表示插入数据库时插入该值
    private Integer value;

    @Getter
    @JsonValue //  表示对枚举序列化时返回此字段
    private String label;

    CouponTypeEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }
}