// Packs Table: // pack_id (Primary Key) // name, // description, // nb_teachers_accounts, // nb_students_accounts, // lms_access, // additional_price, // price/hours/student exemple 1000/16/1 if no additional price put 0 // status, // most_popular import Logger from '../../utils/Logger'; export type IPackLogs = | 'CREATE_PACK_SUCCESS' | 'CREATE_PACK_ERROR' | 'UPDATE_PACK_SUCCESS' | 'UPDATE_PACK_ERROR' | 'DELETE_PACK_SUCCESS' | 'DELETE_PACK_ERROR' | 'PACK_ERROR_GENERIC' | 'PACK_ERROR_INVALID_INPUT' | 'PACK_ERROR_NOT_FOUND' | 'GET_PACK_SUCCESS' | 'GET_PACKS_SUCCESS' | 'GET_PACKS_ERROR' | 'GET_PACK_ERROR' | 'GET_PACKS_BY_STATUS_SUCCESS' | 'GET_PACKS_BY_STATUS_ERROR' | 'UPDATE_PACK_STATUS_SUCCESS' | 'UPDATE_PACK_STATUS_ERROR'; export const packLogs: IErrors = { CREATE_PACK_SUCCESS: { code: 0, message: 'Pack "{packId}" has been created successfully.', type: 'CREATE_PACK_SUCCESS', }, CREATE_PACK_ERROR: { code: 1, message: 'Error occurred while creating pack: {error}', type: 'CREATE_PACK_ERROR', }, UPDATE_PACK_SUCCESS: { code: 2, message: 'Pack "{packId}" has been updated successfully.', type: 'UPDATE_PACK_SUCCESS', }, UPDATE_PACK_ERROR: { code: 3, message: 'Error occurred while updating pack: {error}', type: 'UPDATE_PACK_ERROR', }, DELETE_PACK_SUCCESS: { code: 4, message: 'Pack "{packId}" has been deleted successfully.', type: 'DELETE_PACK_SUCCESS', }, DELETE_PACK_ERROR: { code: 5, message: 'Error occurred while deleting pack: {error}', type: 'DELETE_PACK_ERROR', }, PACK_ERROR_GENERIC: { code: 6, message: 'Generic error happened while loading packs.', type: 'PACK_ERROR_GENERIC', }, PACK_ERROR_INVALID_INPUT: { code: 7, message: 'Invalid input for Pack : {input}', type: 'PACK_ERROR_INVALID_INPUT', }, PACK_ERROR_NOT_FOUND: { code: 8, message: 'Pack {packId} not found', type: 'PACK_ERROR_NOT_FOUND', }, GET_PACK_SUCCESS: { code: 9, message: 'Pack "{packId}" has been fetched successfully.', type: 'GET_PACK_SUCCESS', }, GET_PACKS_SUCCESS: { code: 10, message: 'Packs has been fetched successfully.', type: 'GET_PACKS_SUCCESS', }, GET_PACKS_ERROR: { code: 11, message: 'Error occurred while fetching packs: {error}', type: 'GET_PACKS_ERROR', }, GET_PACK_ERROR: { code: 12, message: 'Error occurred while fetching pack: {error}', type: 'GET_PACK_ERROR', }, GET_PACKS_BY_STATUS_SUCCESS: { code: 13, message: 'Packs has been fetched successfully by status.', type: 'GET_PACKS_BY_STATUS_SUCCESS', }, GET_PACKS_BY_STATUS_ERROR: { code: 14, message: 'Error occurred while fetching packs by status: {error}', type: 'GET_PACKS_BY_STATUS_ERROR', }, UPDATE_PACK_STATUS_SUCCESS: { code: 15, message: 'Pack "{packId}" status has been updated successfully.', type: 'UPDATE_PACK_STATUS_SUCCESS', }, UPDATE_PACK_STATUS_ERROR: { code: 16, message: 'Error occurred while updating pack status: {error}', type: 'UPDATE_PACK_STATUS_ERROR', }, } as const; export default packLogs; export const packLogger = new Logger('pack');