package com.cf.imes.framework.common.pojo;

import com.cf.imes.framework.common.util.validation.statistics.StatisticsUnitInEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 通用统计 ReqVO
 * @author Gqr
 * @since 2025/9/29 16:50
 */
@Data
public class CommonStatisticsReqVO {
    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate[] createTime;

    private LocalDateTime[] createTimeForQry = null;

    /**
     * 统计维度单位
     */
    @Schema(description = "统计维度单位", example = "0", allowableValues = {"0", "1", "2", "3"}, type = "integer")
    @NotNull(message = "{statistics.unit.notNull}")
    @StatisticsUnitInEnum
    private Integer unit;
}
