mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
create room
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const MessageListInputDTOSchema = z.object({
|
||||
roomId: z.string(),
|
||||
});
|
||||
|
||||
export type MessageListInputDTO = z.infer<typeof MessageListInputDTOSchema>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const MessageOutPutDTOSchema = z.object({
|
||||
id: z.string(),
|
||||
sender: z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string().email(),
|
||||
userPhoto: z.string()
|
||||
}),
|
||||
message: z.string().datetime(),
|
||||
messageType: z.string().datetime(),
|
||||
sentAt: z.number(),
|
||||
deliverAt: z.any(),
|
||||
canEdit: z.any(),
|
||||
oneShot: z.any(),
|
||||
requireUnlock: z.any()
|
||||
});
|
||||
|
||||
export type MessageOutPutDTO = z.infer<typeof MessageOutPutDTOSchema>
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const RoomListInputDTOSchema = z.object({
|
||||
export const RoomInputDTOSchema = z.object({
|
||||
roomName: z.string(),
|
||||
createdBy: z.number(),
|
||||
roomType: z.number(),
|
||||
@@ -8,4 +8,4 @@ export const RoomListInputDTOSchema = z.object({
|
||||
});
|
||||
|
||||
|
||||
export type RoomListInputDTO = z.infer<typeof RoomListInputDTOSchema>
|
||||
export type RoomInputDTO = z.infer<typeof RoomInputDTOSchema>
|
||||
+3
-2
@@ -7,7 +7,7 @@ const CreatedBySchema = z.object({
|
||||
userPhoto: z.string()
|
||||
});
|
||||
|
||||
const RoomListOutPutDTOSchema = z.object({
|
||||
const RoomListItemOutPutDTOSchema = z.object({
|
||||
id: z.string(),
|
||||
roomName: z.string(),
|
||||
createdBy: CreatedBySchema,
|
||||
@@ -15,7 +15,8 @@ const RoomListOutPutDTOSchema = z.object({
|
||||
expirationDate: z.string().datetime(),
|
||||
roomType: z.number()
|
||||
});
|
||||
export type RoomListItemOutPutDTO = z.infer<typeof RoomListItemOutPutDTOSchema>
|
||||
|
||||
|
||||
|
||||
const RoomListOutPutDTOSchema = z.array(RoomListItemOutPutDTOSchema);
|
||||
export type RoomListOutPutDTO = z.infer<typeof RoomListOutPutDTOSchema>
|
||||
+8
-1
@@ -3,7 +3,14 @@ import { z } from "zod";
|
||||
const RoomOutPutDTOSchema = z.object({
|
||||
success: z.string(),
|
||||
message: z.string(),
|
||||
data: z.any()
|
||||
data: z.object({
|
||||
id: z.string(),
|
||||
roomName: z.string(),
|
||||
createdBy: z.any(),
|
||||
createdAt: z.date(),
|
||||
expirationDate: z.date(),
|
||||
roomType: z.any()
|
||||
})
|
||||
});
|
||||
|
||||
export type RoomOutPutDTO = z.infer<typeof RoomOutPutDTOSchema>
|
||||
Reference in New Issue
Block a user