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

import com.yc.ship.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
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 = "管理后台 - 优惠券分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CouponPageReqVO extends PageParam {

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

    @Schema(description = "优惠券类型", example = "1")
    private Integer type;

    @Schema(description = "使用渠道")
    private Integer useChannel;

    @Schema(description = "使用后领下一张")
    private Integer useAfter;

    @Schema(description = "审核状态")
    private Integer auditState;

    @Schema(description = "可派发状态")
    private Integer state;

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

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "派发开始时间")
    private LocalDateTime deliverStart;

    @Schema(description = "派发结束时间")
    private LocalDateTime deliverEnd;

    @Schema(description = "派发用户群体类型", example = "1")
    private Integer deliverUserGroupType;

    @Schema(description = "派发用户群体")
    private String deliverUserGroup;

    @Schema(description = "派发总量")
    private Integer number;

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

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

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

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

    @Schema(description = "有效类型（1、固定时间。2、相对时间）", example = "1")
    private Integer effectiveType;

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

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

    @Schema(description = "动态有效时长（分钟数）")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Integer[] effectiveTime;

    @Schema(description = "有效期终止日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] maxEffectiveTime;
}