feat : Création de toutes les entités
This commit is contained in:
20
src/models/organizer_members.ts
Normal file
20
src/models/organizer_members.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { timestampSchema, uuidSchema } from './_shared';
|
||||
|
||||
export const organizerMemberRoleSchema = z.enum(['ADMIN', 'EDITOR']);
|
||||
|
||||
export const organizerMemberStatusSchema = z.enum(['ACTIVE', 'PENDING']);
|
||||
|
||||
export const organizerMemberSchema = z.object({
|
||||
id: uuidSchema,
|
||||
organizer_id: uuidSchema,
|
||||
user_id: uuidSchema.nullable(),
|
||||
email: z.string().trim().email().max(255),
|
||||
role: organizerMemberRoleSchema,
|
||||
status: organizerMemberStatusSchema,
|
||||
invited_at: timestampSchema,
|
||||
joined_at: timestampSchema.nullable(),
|
||||
});
|
||||
|
||||
export type OrganizerMember = z.infer<typeof organizerMemberSchema>;
|
||||
Reference in New Issue
Block a user