API/src/enums/base.enum.ts

89 lines
2.6 KiB
TypeScript
Raw 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.

export enum ProductStatus {
PUBLISH = 'publish', // 已发布
DRAFT = 'draft', // 草稿
PENDING = 'pending', // 待审核
PRIVATE = 'private', // 私有
TRASH = 'trash', // 回收站
AUTO_DRAFT = 'auto-draft', // 自动草稿
FUTURE = 'future', // 定时发布
INHERIT = 'inherit', // 继承状态
}
export enum ProductStockStatus {
INSTOCK = 'instock',
OUT_OF_STOCK = 'outofstock',
ON_BACK_ORDER = 'onbackorder',
}
export enum ProductType {
SIMPLE = 'simple',
VARIABLE = 'variable',
WOOSB = 'woosb',
}
export enum PurchaseOrderStatus {
DRAFT = 'draft',
SUBMITTED = 'submitted',
RECEIVED = 'received',
}
export enum StockRecordOperationType {
IN = 'in',
OUT = 'out',
}
// Order status. Options: pending, processing, on-hold, completed, cancelled, refunded, failed and trash. Default is pending.
// 原始订单状态
export enum OrderStatus {
PENDING = 'pending', // default // 待付款
PROCESSING = 'processing', // 正在处理
ON_HOLD = 'on-hold', // 保留
COMPLETED = 'completed', // 已完成
CANCEL = 'cancelled', // 已取消
REFUNDED = 'refunded', // 已退款
FAILED = 'failed', // 失败订单
DRAFT = 'draft', // 草稿
AUTO_DRAFT = 'auto-draft', // 自动草稿TODO:不知道为什么出现)
// TRASH = 'trash',
// refund 也就是退款相关的状态
RETURN_REQUESTED = 'return-requested', // 已申请退款
RETURN_APPROVED = 'return-approved', // 退款申请已通过
RETURN_CANCELLED = 'return-cancelled', // 已取消退款
}
export enum ErpOrderStatus {
PENDING = 'pending', // 待确认
PROCESSING = 'processing', //待发货
COMPLETED = 'completed', //已完成
CANCEL = 'cancelled', //已取消
REFUNDED = 'refunded', //已退款
FAILED = 'failed', //失败
AFTER_SALE_PROCESSING = 'after_sale_pending', // 售后处理中
PENDING_RESHIPMENT = 'pending_reshipment', // 待补发
PENDING_REFUND = 'pending_refund', // 待退款
RETURN_REQUESTED = 'return-requested', // 已申请退款
RETURN_APPROVED = 'return-approved', // 退款申请已通过
RETURN_CANCELLED = 'return-cancelled', // 已取消退款
}
export enum ShipmentType {
CANADAPOST = 'canadapost',
FREIGHTCOM = 'freightcom',
}
export enum staticValue {
// 万能验证码
STATIC_CAPTCHA = 'yoone2025!@YOONE0923'
}
// WooCommerce Subscription status
// Reference: https://woocommerce.com/document/subscriptions/statuses/
export enum SubscriptionStatus {
ACTIVE = 'active', // 活跃
PENDING = 'pending', // 待处理/待激活
ON_HOLD = 'on-hold', // 暂停
CANCELLED = 'cancelled', // 已取消
EXPIRED = 'expired', // 已过期
PENDING_CANCELLATION = 'pending-cancel', // 待取消
}