package com.erp.dashboard.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 预警信息DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "预警信息")
public class AlertDTO {

    @Schema(description = "预警类型")
    private String type;

    @Schema(description = "预警级别: critical, warning, info")
    private String level;

    @Schema(description = "预警标题")
    private String title;

    @Schema(description = "预警详情")
    private String message;

    @Schema(description = "关联数量")
    private Integer count;

    // 预警类型常量
    public static final String TYPE_STOCK_CRITICAL = "stock_critical";
    public static final String TYPE_STOCK_WARNING = "stock_warning";
    public static final String TYPE_ORDER_QUOTA_EXCEEDED = "order_quota_exceeded";
    public static final String TYPE_ORDER_QUOTA_WARNING = "order_quota_warning";
    public static final String TYPE_API_QUOTA_EXCEEDED = "api_quota_exceeded";
    public static final String TYPE_API_QUOTA_WARNING = "api_quota_warning";
    public static final String TYPE_CLOUD_WAREHOUSE_WARNING = "cloud_warehouse_warning";

    // 预警级别常量
    public static final String LEVEL_CRITICAL = "critical";
    public static final String LEVEL_WARNING = "warning";
    public static final String LEVEL_INFO = "info";
}
