package com.qqchen.deploy.backend.system.query;

import com.qqchen.deploy.backend.framework.annotation.QueryField;
import com.qqchen.deploy.backend.framework.enums.QueryType;
import com.qqchen.deploy.backend.framework.query.BaseQuery;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 系统版本发布记录查询对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SystemReleaseQuery extends BaseQuery {

    /**
     * 版本号（精确查询）
     */
    @QueryField(field = "releaseVersion")
    private BigDecimal releaseVersion;

    /**
     * 版本号范围查询 - 最小版本
     */
    @QueryField(field = "releaseVersion", type = QueryType.GREATER_EQUAL)
    private BigDecimal releaseVersionMin;

    /**
     * 版本号范围查询 - 最大版本
     */
    @QueryField(field = "releaseVersion", type = QueryType.LESS_EQUAL)
    private BigDecimal releaseVersionMax;

    /**
     * 模块类型（精确查询）
     */
    @QueryField(field = "module")
    private String module;

    /**
     * 是否已通知
     */
    @QueryField(field = "notified")
    private Boolean notified;

    /**
     * 发布时间开始
     */
    @QueryField(field = "releaseDate", type = QueryType.GREATER_EQUAL)
    private LocalDateTime releaseDateStart;

    /**
     * 发布时间结束
     */
    @QueryField(field = "releaseDate", type = QueryType.LESS_EQUAL)
    private LocalDateTime releaseDateEnd;
}
