refactor(data): replace schema classes with readonly models

This commit is contained in:
2026-07-17 13:21:40 +08:00
parent 3437312167
commit ae97366a4a
103 changed files with 1220 additions and 2117 deletions
@@ -1,13 +1,10 @@
import { z } from "zod";
import {
createSchemaModel,
type SchemaModel,
} from "../../schema_model";
export const FeedbackSubmitResponseSchema = z.object({
feedbackId: z.string().min(1),
});
export const FeedbackSubmitResponseSchema = z
.object({
feedbackId: z.string().min(1),
})
.readonly();
export type FeedbackSubmitResponseInput = z.input<
typeof FeedbackSubmitResponseSchema
@@ -15,12 +12,4 @@ export type FeedbackSubmitResponseInput = z.input<
export type FeedbackSubmitResponseData = z.output<
typeof FeedbackSubmitResponseSchema
>;
export type FeedbackSubmitResponse = SchemaModel<
typeof FeedbackSubmitResponseSchema,
"feedbackId"
>;
export const FeedbackSubmitResponse = createSchemaModel<
typeof FeedbackSubmitResponseSchema,
"feedbackId"
>(FeedbackSubmitResponseSchema);
export type FeedbackSubmitResponse = FeedbackSubmitResponseData;