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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 产品基础规则 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProductBasicRuleRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32528")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "是否需要出行日期 0不需要 1需要")
    @ExcelProperty("是否需要出行日期")
    private Integer needPlayDate;

    @Schema(description = "有效期类型：1出行日期当天 2下单后X天内 3出行日期前后X天内 4出行日期至指定日期", example = "1")
    @ExcelProperty("有效期类型")
    private Integer validityType;

    @Schema(description = "有效期天数（类型中的X）")
    @ExcelProperty("有效期天数")
    private Integer validityNum;

    @Schema(description = "有效期类型中的指定日期")
    @ExcelProperty("有效期类型中的指定日期")
    private LocalDateTime validityDate;

    @Schema(description = "销售开始日期")
    @ExcelProperty("销售开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate saleStartDate;

    @Schema(description = "销售结束日期")
    @ExcelProperty("销售结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate saleEndDate;

    @Schema(description = "检票开始日期")
    @ExcelProperty("检票开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate checkStartDate;

    @Schema(description = "检票结束日期")
    @ExcelProperty("检票结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate checkEndDate;

    @Schema(description = "销售开始时间")
    @ExcelProperty("销售开始时间")
    private String saleStartTime;

    @Schema(description = "销售结束时间")
    @ExcelProperty("销售结束时间")
    private String saleEndTime;

    @Schema(description = "检票开始时间")
    @ExcelProperty("检票开始时间")
    private String checkStartTime;

    @Schema(description = "检票结束时间")
    @ExcelProperty("检票结束时间")
    private String checkEndTime;

    @Schema(description = "库存数 不填不限制")
    @ExcelProperty("库存数")
    private Integer stock;


}