-- 添加审批超时提醒记录表
CREATE TABLE IF NOT EXISTS sys_approval_timeout_reminder (
    id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    record_id BIGINT NOT NULL,
    approver_id BIGINT NOT NULL,
    progress_percent INT NOT NULL,
    reminded_at TIMESTAMP NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_timeout_reminder_record_approver
    ON sys_approval_timeout_reminder(record_id, approver_id);
