mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
43 lines
926 B
TypeScript
43 lines
926 B
TypeScript
|
|
import { z } from 'zod';
|
||
|
|
|
||
|
|
const attendeeSchema = z.object({
|
||
|
|
name: z.string(),
|
||
|
|
emailAddress: z.string(),
|
||
|
|
attendeeType: z.number(),
|
||
|
|
wxUserId: z.number()
|
||
|
|
});
|
||
|
|
|
||
|
|
const attachmentSchema = z.object({
|
||
|
|
docId: z.number(),
|
||
|
|
sourceName: z.string(),
|
||
|
|
description: z.string(),
|
||
|
|
applicationId: z.number()
|
||
|
|
});
|
||
|
|
|
||
|
|
const recurrenceSchema = z.object({
|
||
|
|
frequency: z.number(),
|
||
|
|
occurrences: z.number()
|
||
|
|
});
|
||
|
|
|
||
|
|
const EventInputDTOSchema = z.object({
|
||
|
|
userId: z.number(),
|
||
|
|
ownerType: z.number(),
|
||
|
|
subject: z.string(),
|
||
|
|
body: z.string(),
|
||
|
|
location: z.string(),
|
||
|
|
startDate: z.string().datetime(),
|
||
|
|
endDate: z.string().datetime(),
|
||
|
|
type: z.number(),
|
||
|
|
category: z.number(),
|
||
|
|
attendees: z.array(attendeeSchema),
|
||
|
|
attachments: z.array(attachmentSchema),
|
||
|
|
recurrence: recurrenceSchema,
|
||
|
|
organizerId: z.number(),
|
||
|
|
isAllDayEvent: z.boolean()
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
export type EventInputDTO = z.infer<typeof EventInputDTOSchema>
|
||
|
|
|