Files
doneit-web/src/app/services/Repositorys/chat/dto/message/messageOutputDTO.ts
T

25 lines
536 B
TypeScript
Raw Normal View History

2024-06-04 16:21:11 +01:00
import { z } from "zod"
2024-06-05 14:31:26 +01:00
const DataSchema = z.object({
id: z.string(),
chatRoomId: z.string(),
wxUserId: z.number(),
sender: z.string().nullable(),
message: z.string(),
messageType: z.number(),
sentAt: z.string().datetime(),
deliverAt: z.string().datetime().nullable(),
canEdit: z.boolean(),
oneShot: z.boolean(),
requireUnlock: z.boolean()
});
const ResponseSchema = z.object({
2024-06-05 10:28:38 +01:00
success: z.boolean(),
message: z.string(),
2024-06-05 14:31:26 +01:00
data: DataSchema
2024-06-04 16:21:11 +01:00
});
2024-06-05 14:31:26 +01:00
export type MessageOutPutDTO = z.infer<typeof ResponseSchema>