package com.moka.gdtauto.common;

/**
 * 广告计划状态常量
 * 适用于 AdPlanConf、AdPlan、AdPlanCreative 三张表
 * 
 * @author moka
 * @since 2026-02-25
 */
public class AdPlanStatus {
    
    /**
     * 待执行
     */
    public static final Integer PENDING = 1;
    
    /**
     * 执行中
     */
    public static final Integer IN_PROGRESS = 2;
    
    /**
     * 失败
     */
    public static final Integer FAILED = 3;

    // 部分失败
    public static final Integer PART_FAILED = 5;
    
    /**
     * 已结束(成功)
     */
    public static final Integer SUCCESS = 4;
    
    private AdPlanStatus() {
        // 私有构造函数,防止实例化
    }
    
    /**
     * 获取状态描述
     * 
     * @param status 状态值
     * @return 状态描述
     */
    public static String getStatusDesc(Integer status) {
        if (status == null) {
            return "未知";
        }
        switch (status) {
            case 1:
                return "待执行";
            case 2:
                return "执行中";
            case 3:
                return "失败";
            case 5:
                return "部分失败";
            case 4:
                return "已提交(成功)";
            default:
                return "未知(" + status + ")";
        }
    }
}
