package com.ningdatech.carapi.car.datascreen.model.dto;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

import com.ningdatech.carapi.sys.contants.RegionContant;

import lombok.Data;
import lombok.ToString;

/**
 * @Classname DataScreenParam
 * @Description
 * @Date 2022/11/21 13:50
 * @Created by PoffyZhang
 */
@Data
@ToString
public class DataScreenParam {

    private Long regionId;
    private Integer regionLevel;

    private String regionCode;

    private List<Long> regionIds;

    private List<String> companyIds;

    private Integer type;

    private String dataScopeSql;

    private LocalDateTime startTime;
    private LocalDateTime endTime;

    private Long operatorId;

    public Long getRegionId(){
        if(Objects.isNull(this.regionId)){
            this.regionId = RegionContant.ZJ_REGION_ID;
            return this.regionId;
        }
        return this.regionId;
    }
}
