import Logger from '../../utils/Logger'; export type IEnrollmentLogs = | 'CREATE_ENROLLMENT_SUCCESS' | 'CREATE_ENROLLMENT_ERROR' | 'UPDATE_ENROLLMENT_SUCCESS' | 'UPDATE_ENROLLMENT_ERROR' | 'DELETE_ENROLLMENT_SUCCESS' | 'DELETE_ENROLLMENT_ERROR' | 'ENROLLMENT_ERROR_GENERIC' | 'ENROLLMENT_ERROR_INVALID_INPUT' | 'ENROLLMENT_ERROR_NOT_FOUND' | 'GET_ENROLLMENT_SUCCESS' | 'GET_ENROLLMENTS_SUCCESS' | 'GET_ENROLLMENTS_ERROR' | 'GET_ENROLLMENT_ERROR' | 'ASSIGN_TEACHER_TO_COURSE_SUCCESS' | 'FAILED_TO_ASSIGN_TEACHER_TO_COURSE' | 'ASSIGN_TEACHER_TO_COURSE_ERROR' | 'GET_TEACHERS_BY_COURSE_AND_SCHOOL_SUCCESS' | 'GET_TEACHERS_BY_COURSE_AND_SCHOOL_ERROR' ; export const enrollmentLogs: IErrors = { CREATE_ENROLLMENT_SUCCESS: { code: 0, message: 'Enrollment "{enrollmentId}" has been created successfully.', type: 'CREATE_ENROLLMENT_SUCCESS', }, CREATE_ENROLLMENT_ERROR: { code: 1, message: 'Error occurred while creating enrollment: {error}', type: 'CREATE_ENROLLMENT_ERROR', }, UPDATE_ENROLLMENT_SUCCESS: { code: 2, message: 'Enrollment "{enrollmentId}" has been updated successfully.', type: 'UPDATE_ENROLLMENT_SUCCESS', }, UPDATE_ENROLLMENT_ERROR: { code: 3, message: 'Error occurred while updating enrollment: {error}', type: 'UPDATE_ENROLLMENT_ERROR', }, DELETE_ENROLLMENT_SUCCESS: { code: 4, message: 'Enrollment "{enrollment_id}" has been deleted successfully.', type: 'DELETE_ENROLLMENT_SUCCESS', }, DELETE_ENROLLMENT_ERROR: { code: 5, message: 'Error occurred while deleting enrollment: {error}', type: 'DELETE_ENROLLMENT_ERROR', }, ENROLLMENT_ERROR_GENERIC: { code: 6, message: 'Generic error happened while loading enrollments.', type: 'ENROLLMENT_ERROR_GENERIC', }, ENROLLMENT_ERROR_INVALID_INPUT: { code: 7, message: 'Invalid input for Enrollment : {input}', type: 'ENROLLMENT_ERROR_INVALID_INPUT', }, ENROLLMENT_ERROR_NOT_FOUND: { code: 8, message: 'Enrollment {enrollmentId} not found', type: 'ENROLLMENT_ERROR_NOT_FOUND', }, GET_ENROLLMENT_SUCCESS: { code: 9, message: 'Enrollment "{enrollmentId}" has been fetched successfully.', type: 'GET_ENROLLMENT_SUCCESS', }, GET_ENROLLMENTS_SUCCESS: { code: 10, message: 'Enrollments has been fetched successfully.', type: 'GET_ENROLLMENTS_SUCCESS', }, GET_ENROLLMENTS_ERROR: { code: 11, message: 'Error occurred while fetching enrollments: {error}', type: 'GET_ENROLLMENTS_ERROR', }, GET_ENROLLMENT_ERROR: { code: 12, message: 'Error occurred while fetching enrollment: {error}', type: 'GET_ENROLLMENT_ERROR', }, ASSIGN_TEACHER_TO_COURSE_SUCCESS: { code: 13, message: 'Teacher "{teacherId}" has been assigned to course "{courseId}" successfully.', type: 'ASSIGN_TEACHER_TO_COURSE_SUCCESS', }, FAILED_TO_ASSIGN_TEACHER_TO_COURSE: { code: 14, message: 'Failed to assign teacher to course: {error}', type: 'FAILED_TO_ASSIGN_TEACHER_TO_COURSE', }, ASSIGN_TEACHER_TO_COURSE_ERROR: { code: 15, message: 'Error occurred while assigning teacher to course: {error}', type: 'ASSIGN_TEACHER_TO_COURSE_ERROR', }, GET_TEACHERS_BY_COURSE_AND_SCHOOL_SUCCESS: { code: 16, message: 'Teachers for course "{courseId}" and school "{schoolId}" has been fetched successfully.', type: 'GET_TEACHERS_BY_COURSE_AND_SCHOOL_SUCCESS', }, GET_TEACHERS_BY_COURSE_AND_SCHOOL_ERROR: { code: 17, message: 'Error occurred while fetching teachers for course "{courseId}" and school "{schoolId}": {error}', type: 'GET_TEACHERS_BY_COURSE_AND_SCHOOL_ERROR', }, } as const; export default enrollmentLogs; export const enrollmentLogger = new Logger('enrollment');