mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
32 lines
763 B
TypeScript
32 lines
763 B
TypeScript
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(),
|
|
isAdmin: z.boolean()
|
|
});
|
|
|
|
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),
|
|
}),
|
|
})
|
|
|
|
export type RoomByIdMemberItemOutputDTO = z.infer<typeof MemberSchema>
|
|
export type RoomByIdOutputDTO = z.infer<typeof RoomByIdOutputDTOSchema> |