namespace MiGu.Server.Wms;

public interface IWmsDispatchAdapter
{
    Task<DispatchResult> DispatchAsync(DispatchTransportCommand command, CancellationToken ct = default);
}

public sealed record DispatchResult(bool Success, string? MissionId, string? DeliveryId, string? ErrorMessage);

public sealed class NoopWmsDispatchAdapter : IWmsDispatchAdapter
{
    public Task<DispatchResult> DispatchAsync(DispatchTransportCommand command, CancellationToken ct = default) =>
        Task.FromResult(new DispatchResult(false, null, null, "调度适配器未配置，任务保留在平台侧"));
}
