material_manage_system/internal/service/errors.go
2026-10-09 11:10:13 +08:00

16 lines
755 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package service
import "errors"
var ErrMaterialNotFound = errors.New("material not found")
var ErrMaterialObsolete = errors.New("material is obsolete")
var ErrInvalidWarningStock = errors.New("warning stock must be greater than or equal to 0")
// ErrInventoryScopeUnavailable 表示当前公司没有可用的库存维度:仓库或库位尚未配置,
// 或在需要启用的写操作里被停用。Resolver 用 %w 包上具体提示(缺仓库 / 缺库位 /
// 仓库停用 / 库位停用),Handler 写请求据此回 409;读取历史数据不调用需要完整维度的
// 解析器,因此未配置仓库、库位时仍能查询已有库存与流水。
var ErrInventoryScopeUnavailable = errors.New("本公司仓库或库位不可用")