package com.aucma.common.constant;

/**
 * 安灯领域常量字典（统一使用键值代码，便于前后端对齐与稳定存储）
 */
public class AnDonConstants {

    /** 是否有效 */
    public static final String FLAG_VALID = "1";
    public static final String FLAG_INVALID = "0";

    /** 事件状态（四态） */
    public static final class EventStatus {
        public static final String PENDING = "0";     // 待处理
        public static final String PROCESSING = "1";  // 处理中
        public static final String RESOLVED = "2";    // 已解决
        public static final String CANCELLED = "3";   // 已取消
        private EventStatus() {}
    }

    /** 派工状态（五态） */
    public static final class AssignmentStatus {
        public static final String ASSIGNED = "0";    // 已分配
        public static final String ACCEPTED = "1";    // 已接受
        public static final String REJECTED = "2";    // 已拒绝
        public static final String DONE = "3";        // 已完成
        public static final String CANCELLED = "4";   // 已取消
        private AssignmentStatus() {}
    }

    /** 触发源类型（工位/设备/报警/手动） */
    public static final class SourceType {
        public static final String STATION = "0";     // 工位/工序
        public static final String DEVICE = "1";      // 设备
        public static final String ALARM = "2";       // 报警
        public static final String MANUAL = "3";      // 手动
        private SourceType() {}
    }

    /** 操作类型（事件日志） */
    public static final class Operation {
        // 核心操作（与表结构注释一致）
        public static final String CREATE = "CREATE";       // 创建
        public static final String ACK = "ACK";             // 确认
        public static final String ASSIGN = "ASSIGN";       // 分配
        public static final String ESCALATE = "ESCALATE";   // 升级
        public static final String RESOLVE = "RESOLVE";     // 解决
        public static final String CANCEL = "CANCEL";       // 取消
        public static final String COMMENT = "COMMENT";     // 评论

        // 扩展操作（便于审计更细粒度，可选）
        public static final String EDIT = "EDIT";                       // 编辑（修改事件）
        public static final String ACCEPT = "ACCEPT";                   // 接受派工
        public static final String REJECT = "REJECT";                   // 拒绝派工
        public static final String CANCEL_ASSIGNMENT = "CANCEL_ASSIGNMENT"; // 取消派工
        public static final String CANCEL_OTHERS = "CANCEL_OTHERS";     // 取消其他派工
        private Operation() {}
    }
}
