package com.yc.ship.module.marketing.controller.admin.couponCode.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

import static com.yc.ship.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

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

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

    @Schema(description = "优惠券ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private  Long couponId;

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

    //code
    @Schema(description = "优惠券码", example = "张三")
    private String code;

    //state
    @Schema(description = "使用状态", example = "1")
    private Integer state;

    //qrcode
    @Schema(description = "二维码", example = "张三")
    private String qrcode;

    //memberId
    @Schema(description = "领用人ID", example = "1024")
    private Long memberId;

    @Schema(description = "领用人", example = "张三")
    private String memberName;

    //创建时间
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "领取时间")
    private LocalDateTime createTime;

    //effective_start
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "生效时间")
    private LocalDateTime effectiveStart;

    //effective_end
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "过期时间")
    private LocalDateTime effectiveEnd;

    //orderId
    @Schema(description = "订单编号", example = "1024")
    private Long orderId;

    //productName
    @Schema(description = "产品名称", example = "张三")
    private String productName;

    //amount
    @Schema(description = "优惠金额", example = "1024")
    private BigDecimal amount;

    //useTime
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "使用时间")
    private LocalDateTime useTime;
}
