refactor(data): merge DTO models into schemas

This commit is contained in:
2026-07-17 12:47:18 +08:00
parent 2796010971
commit eac3d8f0a7
274 changed files with 1466 additions and 1956 deletions
@@ -0,0 +1,22 @@
export const FEEDBACK_CATEGORIES = [
"problem",
"suggestion",
"payment",
"other",
] as const;
export type FeedbackCategory = (typeof FEEDBACK_CATEGORIES)[number];
export interface FeedbackContext {
appVersion: string;
platform: string;
browser: string;
viewport: string;
}
export interface SubmitFeedbackInput {
category: FeedbackCategory;
content: string;
context: FeedbackContext;
images: readonly File[];
}
+5
View File
@@ -1 +1,6 @@
/**
* @file Automatically generated by barrelsby.
*/
export * from "./feedback_submission";
export * from "./response";
@@ -1,5 +1,10 @@
import { z } from "zod";
import {
createSchemaModel,
type SchemaModel,
} from "../../schema_model";
export const FeedbackSubmitResponseSchema = z.object({
feedbackId: z.string().min(1),
});
@@ -10,3 +15,12 @@ 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);
@@ -1 +1,5 @@
/**
* @file Automatically generated by barrelsby.
*/
export * from "./feedback_submit_response";