mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save send message
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const MessageOutPutDTOSchema = z.object({
|
||||
success: z.boolean(),
|
||||
const DataSchema = z.object({
|
||||
id: z.string(),
|
||||
chatRoomId: z.string(),
|
||||
wxUserId: z.number(),
|
||||
sender: z.string().nullable(),
|
||||
message: z.string(),
|
||||
data: z.any()
|
||||
messageType: z.number(),
|
||||
sentAt: z.string().datetime(),
|
||||
deliverAt: z.string().datetime().nullable(),
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
requireUnlock: z.boolean()
|
||||
});
|
||||
|
||||
export type MessageOutPutDTO = z.infer<typeof MessageOutPutDTOSchema>
|
||||
|
||||
const ResponseSchema = z.object({
|
||||
success: z.boolean(),
|
||||
message: z.string(),
|
||||
data: DataSchema
|
||||
});
|
||||
|
||||
export type MessageOutPutDTO = z.infer<typeof ResponseSchema>
|
||||
|
||||
Reference in New Issue
Block a user