You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.3 KiB
35 lines
1.3 KiB
import { z } from "zod";
|
|
|
|
export const msRefineDeclineSchema = z.object({
|
|
customer_id: z.string().min(1, "请填写客户标识"),
|
|
quote_id: z.string().min(1, "请填写报价单号"),
|
|
quote_session_id: z.string().uuid("会话标识无效"),
|
|
});
|
|
|
|
export const msRefineContinueSchema = msRefineDeclineSchema;
|
|
|
|
export const msRefineDetailsSchema = z.object({
|
|
customer_id: z.string().min(1, "请填写客户标识"),
|
|
quote_id: z.string().min(1, "请填写报价单号"),
|
|
quote_session_id: z.string().uuid("会话标识无效"),
|
|
mothership_details: z.record(z.unknown()).optional(),
|
|
pickup_accessorials: z.array(z.string().min(1).max(64)).max(20).optional(),
|
|
delivery_accessorials: z.array(z.string().min(1).max(64)).max(20).optional(),
|
|
ready_date: z.string().min(1).max(32).optional(),
|
|
ready_time: z.string().min(1).max(32).optional(),
|
|
cargo_lines: z
|
|
.array(
|
|
z.object({
|
|
cargo_type: z.string().min(1).max(64),
|
|
quantity: z.number().finite().positive().max(999),
|
|
weight_lb: z.number().finite().positive().max(100_000),
|
|
length_in: z.number().finite().positive().max(1_000),
|
|
width_in: z.number().finite().positive().max(1_000),
|
|
height_in: z.number().finite().positive().max(1_000),
|
|
}),
|
|
)
|
|
.min(1)
|
|
.max(20)
|
|
.optional(),
|
|
});
|