refactor: 集中管理共享状态常量
This commit is contained in:
1 parent
868a4251ce
commit
3b05df6edf
3 files changed
+21
-2
No files matched your search
@@ -4,6 +4,24 @@ export type ContactPreference = "wechat" | "phone" | "none";
|
||||
export type FulfillmentType = "pickup" | "delivery";
|
||||
export type OrderStatus = BookingStatus;
|
||||
|
||||
export const HTTP_STATUS = {
|
||||
OK: 200,
|
||||
CREATED: 201,
|
||||
BAD_REQUEST: 400,
|
||||
UNAUTHORIZED: 401,
|
||||
FORBIDDEN: 403,
|
||||
NOT_FOUND: 404,
|
||||
INTERNAL_SERVER_ERROR: 500,
|
||||
} as const;
|
||||
|
||||
export const BOOKING_STATUS = {
|
||||
RECEIVED: "received",
|
||||
CONTACTING: "contacting",
|
||||
CONFIRMED: "confirmed",
|
||||
COMPLETED: "completed",
|
||||
CANCELLED: "cancelled",
|
||||
} as const satisfies Record<Uppercase<BookingStatus>, BookingStatus>;
|
||||
|
||||
export interface PublicService {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
Reference in new issue
Block a user