26 lines
609 B
TypeScript
26 lines
609 B
TypeScript
import z from "zod";
|
|
|
|
export const transportationClassRequestSchema = z.object({
|
|
class: z
|
|
.string("Must be string.")
|
|
.nonempty("Must not empty.")
|
|
.max(100, "Max 100 characters."),
|
|
total_seats: z
|
|
.number("Must be number.")
|
|
.int("Must be integer.")
|
|
.positive("Must be positive."),
|
|
images: z
|
|
.array(
|
|
z.base64("Must be base64 string.").nonempty("Must not empty."),
|
|
"Must be array.",
|
|
)
|
|
.nonempty("Must not empty."),
|
|
});
|
|
|
|
export const transportationClassParamsSchema = z.object({
|
|
id: z
|
|
.ulid("Must be ulid string.")
|
|
.nonempty("Must not empty.")
|
|
.max(30, "Max 30 characters."),
|
|
});
|