package com.haha.entity.dto;

import lombok.Data;
import java.math.BigDecimal;

@Data
public class StatisticsQueryDTO {
    private Integer page;
    private Integer pageSize;
    private String startDate;
    private String endDate;
    private Long shopId;
    private String deviceId;
    private String category;
    private String keyword;
    private String sortBy;
    private String sortOrder;
    private String province;
    private String city;
    private String district;
    private Integer status;
    private String period;
    private String compareType;
    private String userLayer;
    private Integer minOrderCount;
    private String type;
    private Integer limit;
    private BigDecimal threshold;

    public void validate() {
        if (page == null || page < 1) {
            page = 1;
        }
        if (pageSize == null || pageSize < 1) {
            pageSize = 10;
        }
        if (pageSize > 100) {
            pageSize = 100;
        }
    }
}
