package com.cool.store.request;

import com.cool.store.common.PageBasicInfo;
import com.cool.store.enums.point.PointStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangchenbiao
 * @FileName: PointPageRequest
 * @Description:
 * @date 2024-04-08 10:28
 */
@Data
public class PointPageRequest extends PageBasicInfo {

    @ApiModelProperty("铺位名称或编号")
    private String keyword;

    @ApiModelProperty("选择区域")
    private List<String> regionIds;

    @ApiModelProperty("营运人员")
    private String operateUserId;

    @ApiModelProperty("开始拓展时间 yyyy-MM-dd HH:mm:ss")
    private String developmentStartTime;

    @ApiModelProperty("结束拓展时间 yyyy-MM-dd HH:mm:ss")
    private String developmentEndTime;

    @ApiModelProperty(value = "拓展专员", hidden = true)
    private String developmentManager;

    @Min(1)@Max(2)
    @ApiModelProperty("必传参数:1已入库 2暂未入库")
    private Integer storageStatus;

    @ApiModelProperty("1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
    private Integer pointStatus;

    @ApiModelProperty("创建时间-开始")
    private String createStartTime;

    @ApiModelProperty("创建时间-结束")
    private String createEndTime;

    @ApiModelProperty(value = "铺位状态列表", hidden = true)
    private List<Integer> pointStatusList;

    public List<Integer> getPointStatusList() {
        List<Integer> pointStatusList = new ArrayList<>();
        if (pointStatus != null) {
            pointStatusList.add(pointStatus);
        }
        if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
            pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
        }
        return pointStatusList;
    }

}
