package com.liquidnet.service.kylin.dto.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
public class PerformanceAdminListParam {
    @ApiModelProperty(value = "演出名称", example = "")
    private String title;
    @ApiModelProperty(value = "-2全部状态:-1删除;0未提交;1审核中;2审核中（自动上线）;3审核通过;4审核未通过;6上线;7下架;8活动结束;9活动取消退款中;10活动取消退", example = "-2")
    @NotNull(message = "不能为空")
    private int status;
    @ApiModelProperty(value = "城市名称", example = "")
    private String cityName;
    @ApiModelProperty(value = "-2全部,0审核中，2审核拒绝", example = "0")
    @NotNull(message = "不能为空")
    private int auditStatus;
    @ApiModelProperty(value = "停售时间（天）-1全部", example = "-1")
    private Long stopSellDay;
    @ApiModelProperty(value = "停售时间", example = "2000-01-01 12:00:00",hidden = true)
    private LocalDateTime stopSellTime;
    @ApiModelProperty(value = "页数", example = "0")
    @NotNull(message = "不能为空")
    private int page;
    @ApiModelProperty(value = "数量", example = "20")
    @NotNull(message = "不能为空")
    private int size;
    @ApiModelProperty(value = "排序字段", hidden = true)
    private String orderItem;
    @ApiModelProperty(value = "排序方式", hidden = true)
    private String orderSc;

    public void setStopSellDay(Long stopSellDay) {
        LocalDateTime now = LocalDateTime.now();
        this.stopSellTime = now.plusDays(-stopSellDay);
    }
}
