Renamed Student to Attendee
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export * from './lib/problem-details.js';
|
||||
export * from './lib/result.js';
|
||||
export * from './schemas/attendees.js';
|
||||
export * from './schemas/enums.js';
|
||||
export * from './schemas/groups.js';
|
||||
export * from './schemas/health-check.js';
|
||||
@@ -7,5 +8,4 @@ export * from './schemas/onboarding.js';
|
||||
export * from './schemas/pagination.js';
|
||||
export * from './schemas/payments.js';
|
||||
export * from './schemas/problem-details.js';
|
||||
export * from './schemas/students.js';
|
||||
export * from './schemas/waitlist.js';
|
||||
@@ -6,7 +6,7 @@ const pageSchema = createPageSchema();
|
||||
const pageSizeSchema = createPageSizeSchema(10);
|
||||
const paginationSchema = createPaginationSchema();
|
||||
|
||||
export const StudentDtoSchema = z.object({
|
||||
export const AttendeeDtoSchema = z.object({
|
||||
id: z.string(),
|
||||
groupId: z.string(),
|
||||
fullName: z.string(),
|
||||
@@ -18,16 +18,16 @@ export const StudentDtoSchema = z.object({
|
||||
createdAt: isoDateTimeSchema,
|
||||
updatedAt: isoDateTimeSchema,
|
||||
});
|
||||
export type StudentDto = z.output<typeof StudentDtoSchema>;
|
||||
export type AttendeeDto = z.output<typeof AttendeeDtoSchema>;
|
||||
|
||||
export const StudentQuerySchema = z.object({
|
||||
export const AttendeeQuerySchema = z.object({
|
||||
page: pageSchema,
|
||||
pageSize: pageSizeSchema,
|
||||
});
|
||||
export type StudentQuery = z.output<typeof StudentQuerySchema>;
|
||||
export type AttendeeQuery = z.output<typeof AttendeeQuerySchema>;
|
||||
|
||||
export const StudentListSchema = z.object({
|
||||
data: z.array(StudentDtoSchema),
|
||||
export const AttendeeListSchema = z.object({
|
||||
data: z.array(AttendeeDtoSchema),
|
||||
pagination: paginationSchema,
|
||||
});
|
||||
export type StudentList = z.output<typeof StudentListSchema>;
|
||||
export type AttendeeList = z.output<typeof AttendeeListSchema>;
|
||||
@@ -11,7 +11,7 @@ export const paymentStatusSchema = z.enum(['PENDING', 'PAID', 'OVERDUE', 'CANCEL
|
||||
export const PaymentDtoSchema = z.object({
|
||||
id: z.string(),
|
||||
groupId: z.string(),
|
||||
studentId: z.string(),
|
||||
attendeeId: z.string(),
|
||||
amount: z.coerce.number().positive(),
|
||||
currency: z.string(),
|
||||
status: paymentStatusSchema,
|
||||
|
||||
Reference in New Issue
Block a user