Files
doneit-web/src/app/module/chat/data/dto/room/roomByIdOutputDTO.ts
T

32 lines
763 B
TypeScript
Raw Normal View History

2024-06-07 12:29:53 +01:00
import { z } from "zod";
const UserSchema = z.object({
wxUserId: z.number(),
wxFullName: z.string(),
wxeMail: z.string(),
userPhoto: z.string().nullable(),
});
const MemberSchema = z.object({
id: z.string(),
user: UserSchema,
joinAt: z.string(),
2024-07-25 08:51:04 +01:00
isAdmin: z.boolean()
2024-06-07 12:29:53 +01:00
});
export const RoomByIdOutputDTOSchema = z.object({
success: z.boolean(),
message: z.string(),
data: z.object({
id: z.string(),
roomName: z.string(),
createdBy: UserSchema,
createdAt: z.string(),
expirationDate: z.string().nullable(),
roomType: z.number(),
members: z.array(MemberSchema),
}),
2024-06-11 12:15:47 +01:00
})
2024-06-07 12:29:53 +01:00
2024-06-10 17:04:04 +01:00
export type RoomByIdMemberItemOutputDTO = z.infer<typeof MemberSchema>
2024-07-25 08:51:04 +01:00
export type RoomByIdOutputDTO = z.infer<typeof RoomByIdOutputDTOSchema>