send and receive message

This commit is contained in:
Peter Maquiran
2024-07-11 10:28:21 +01:00
parent 386ca67315
commit b0325a5558
50 changed files with 720 additions and 372 deletions
@@ -0,0 +1,29 @@
import { z } from "zod"
const DataSchema = z.object({
id: z.string(),
chatRoomId: z.string(),
wxUserId: z.number(),
sender: z.object({
wxUserId: z.number(),
wxFullName: z.string(),
wxeMail: z.string(),
userPhoto: z.string().optional()
}).nullable(),
message: z.string(),
messageType: z.number(),
sentAt: z.string(),
deliverAt: z.string().datetime().nullable(),
canEdit: z.boolean(),
oneShot: z.boolean(),
requireUnlock: z.boolean()
});
export const MessageOutPutDTOSchema = z.object({
success: z.boolean(),
message: z.string(),
data: DataSchema
});
export type MessageOutPutDTO = z.infer<typeof MessageOutPutDTOSchema>