mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
30 lines
669 B
TypeScript
30 lines
669 B
TypeScript
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>
|