package com.mini.capi.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum cTypeEnum {

    EXPENSE("1", "支出"),
    INCOME("2", "收入");

    @EnumValue  // 标记该字段对应数据库存储的编码（1/2）
    private final String code;

    @JsonValue
    private final String desc;

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