package com.yc.ship.module.marketing.controller.app.coupon.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 优惠券 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppCouponRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19248")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "优惠券名称", example = "张三")
    @ExcelProperty("优惠券名称")
    private String name;

    @Schema(description = "优惠券类型", example = "1")
    @ExcelProperty(value = "优惠券类型", converter = DictConvert.class)
    @DictFormat("coupon_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "使用渠道")
    @ExcelProperty(value = "使用渠道", converter = DictConvert.class)
    @DictFormat("coupon_use_channel") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer useChannel;


    @Schema(description = "使用说明", example = "你说的对")
    @ExcelProperty("使用说明")
    private String description;

    @Schema(description = "门槛费（满减的满金额）")
    @ExcelProperty("门槛费（满减的满金额）")
    private BigDecimal basic;

    @Schema(description = "金额，折扣")
    @ExcelProperty("金额，折扣")
    private BigDecimal quota;

    @Schema(description = "最大减免")
    @ExcelProperty("最大减免")
    private BigDecimal maximum;

    @Schema(description = "是否多券同用")
    @ExcelProperty("是否多券同用")
    private Integer multiple;


    @Schema(description = "有效开始时间")
    @ExcelProperty("有效开始时间")
    private LocalDateTime effectiveStart;

    @Schema(description = "有效结束时间")
    @ExcelProperty("有效结束时间")
    private LocalDateTime effectiveEnd;

    @Schema(description = "动态有效时长（分钟数）")
    @ExcelProperty("动态有效时长（分钟数）")
    private Integer effectiveTime;
    @Schema(description = "优惠金额")
    private BigDecimal amount;

    @Schema(description = "发放用户组类型")
    private Integer deliverUserGroupType;

    @Schema(description = "优惠券码ID")
    private Long couponCodeId;

    @Schema(description = "优惠券码,获取券码详情才会有这个参数")
    private String qrcode;

    @Schema(description = "领取状态")
    private Integer receiveState;

}