package com.yc.ship.module.product.controller.admin.productSpu.saleRuleVO;

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 javax.validation.constraints.NotEmpty;
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 ProductSaleRulePageReqVO extends PageParam {

    @Schema(description = "是否实名", example = "1")
    private Integer idLimitType;

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

    @Schema(description = "需提前几小时预购")
    private Integer prebuyLimitDay;

    @Schema(description = "预售天数: 默认15天,最大90天")
    @NotEmpty(message = "预售天数不能为空")
    private Integer presaleLimitDay;

    @Schema(description = "一票多人人数（最小值1）")
    private Integer oneLimitNum;

    @Schema(description = "下单当前产品最小票数，不填不限制")
    private Integer minNum;

    @Schema(description = "下单当前产品最大票数，不填不限制")
    private Integer maxNum;

    @Schema(description = "实名制方式 0身份证 1护照 2人像 3社保卡")
    private String idLimitCertificate;

    @Schema(description = "是否需要游客姓名", example = "李四")
    private Integer needVisitorName;

    @Schema(description = "是否需要游客手机号")
    private Integer needVisitorPhone;

    @Schema(description = "是否需要订单联系人")
    private Integer needContact;

    @Schema(description = "允许购买区域：多个区域以,分隔")
    private String idArea;

    @Schema(description = "限制购买区域：多个区域以,分隔")
    private String idLimitArea;

    @Schema(description = "年龄限制")
    private String idAgeLimit;

    @Schema(description = "生日票验证 0不验证 1按日验证 2按月验证", example = "1")
    private Integer birthdayVerifyType;

    @Schema(description = "是否需要激活")
    private Integer needActivate;

    @Schema(description = "激活方式 1下单即激活 2下单后几天内激活", example = "1")
    private Integer activateType;

    @Schema(description = "激活有效期 下单后几天内激活 不填不限制")
    private Integer activateDayNum;

}