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

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.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 ProductOtherRulePageReqVO extends PageParam {

    @Schema(description = "是否自动开始销售")
    private Integer autoStartSale;

    @Schema(description = "自动开始销售类型 0每天 1每月 2不限", example = "2")
    private Integer autoStartSaleType;

    @Schema(description = "自动开始销售时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private String[] autoStartSaleTime;

    @Schema(description = "是否自动停止销售")
    private Integer autoEndSale;

    @Schema(description = "自动停止销售类型 0每天 1每月 2不限", example = "1")
    private Integer autoEndSaleType;

    @Schema(description = "自动停止销售时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private String[] autoEndSaleTime;

    @Schema(description = "可购买几天内的产品")
    private Integer canBuyDay;

    @Schema(description = "电子合同模版id（无id表示不需要合同）", example = "32230")
    private String contractId;

    @Schema(description = "是否买保险")
    private Integer needInsurance;

    @Schema(description = "是否推荐")
    private Integer isRecommend;

    @Schema(description = "控制产品上架类型 0发布上架 1自动控制", example = "2")
    private Integer ctrlStatusType;

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

}