package cn.iocoder.yudao.module.member.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.common.DictBaseConstants.*;

/**
 * 用于基础卡券导出VO
 *
 * @author 小李
 * @date 19:55 2024/12/2
**/
@Data
@ExcelIgnoreUnannotated
public class MemberCouponExportVO {

    @ExcelProperty("卡券名称")
    private String name;

    @ExcelProperty(value = "卡券类型", converter = DictConvert.class)
    @DictFormat(MEMBER_COUPON_TYPE)
    private String type;

    @ExcelProperty(value = "适用车型", converter = DictConvert.class)
    @DictFormat(MEMBER_CAR)
    private String carModel;

    @ExcelProperty(value = "核销规则", converter = DictConvert.class)
    @DictFormat(MEMBER_COUPON_OUT_RULE)
    private String outRule;

    @ExcelProperty("开始有效期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    @ExcelProperty("结束有效期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ExcelProperty("面额")
    private BigDecimal amount;

    @ExcelProperty("备注")
    private String remark;
}
