package com.ruoyi.ss.meterReadingRecord.domain;

import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.common.valid.EnumValid;
import com.ruoyi.ss.meterReadingRecord.domain.meterReadingRecord.MeterReadingRecordGroupBy;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author wjh
 * 2024/3/28
 */
@Data
public class SmMeterReadingRecordQuery extends SmMeterReadingRecord {

    @EnumValid(
            clazz = MeterReadingRecordGroupBy.class,
            message = "非法的分组字段",
            groups = {ValidGroup.Query.class},
            method = "name"
    )
    @ApiModelProperty("分组字段，可选：create_date, create_hour")
    private String groupBy;

    @ApiModelProperty("创建日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    @ApiModelProperty("年份")
    private Integer year;

    @ApiModelProperty("月份")
    private Integer month;

    @ApiModelProperty("设备id列表")
    private List<Long> deviceIds;

}
