separate flight class api and transportation class api into different module

This commit is contained in:
ItsMalma
2025-11-29 12:06:39 +07:00
parent 1fd90fdeab
commit 84a04da1e6
11 changed files with 271 additions and 74 deletions

View File

@@ -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."),
});