mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add atribute to message
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const SenderSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string()
|
||||
});
|
||||
|
||||
const DataSchema = z.object({
|
||||
id: z.string(),
|
||||
sender: SenderSchema,
|
||||
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 MessageListOutputSchema = z.object({
|
||||
success: z.boolean(),
|
||||
message: z.string().nullable(),
|
||||
data: z.array(DataSchema)
|
||||
});
|
||||
|
||||
|
||||
export type MessageListOutput = z.infer<typeof MessageListOutputSchema>
|
||||
@@ -2,7 +2,7 @@ import { z } from "zod"
|
||||
|
||||
const DataSchema = z.object({
|
||||
id: z.string(),
|
||||
chatRoomId: z.string(),
|
||||
roomId: z.string(),
|
||||
wxUserId: z.number(),
|
||||
sender: z.object({
|
||||
wxUserId: z.number(),
|
||||
@@ -17,14 +17,17 @@ const DataSchema = z.object({
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
requireUnlock: z.boolean(),
|
||||
requestId: z.string()
|
||||
requestId: z.string(),
|
||||
reactions: z.array(z.object({})),
|
||||
info: z.array(z.object({})),
|
||||
attachments: z.array(z.object({}))
|
||||
});
|
||||
|
||||
|
||||
export const MessageOutPutDTOSchema = z.object({
|
||||
success: z.boolean(),
|
||||
message: z.string(),
|
||||
data: DataSchema
|
||||
data: DataSchema.array()
|
||||
});
|
||||
|
||||
export type MessageOutPutDataDTO = z.infer<typeof DataSchema>
|
||||
|
||||
Reference in New Issue
Block a user