separate flight class api and transportation class api into different module
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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."),
|
||||
});
|
||||
Reference in New Issue
Block a user