/**
 * Service message factory — DRY message constants for all CRUD services.
 *
 * Usage:
 *   const MSG = serviceMessages('Hotel');
 *   throw new NotFoundException(MSG.NOT_FOUND);
 *   throw new ConflictException(MSG.ALREADY_EXISTS('name'));
 *   return { id, message: MSG.CREATED };
 */
export const serviceMessages = (entity: string) => ({
  NOT_FOUND: `${entity} not found`,
  CREATED: `${entity} created successfully`,
  UPDATED: `${entity} updated successfully`,
  DELETED: `${entity} deleted successfully`,
  ALREADY_EXISTS: (field: string) => `${entity} with this ${field} already exists`,
  CANNOT_DELETE_SYSTEM: `System ${entity.toLowerCase()} cannot be deleted`,
  CANNOT_DELETE_SELF: `You cannot delete your own ${entity.toLowerCase()}`,
  CANNOT_MODIFY_SELF: `You cannot modify your own ${entity.toLowerCase()}`,
  FETCHED: `${entity} fetched successfully`,
  FETCHED_ALL: `${entity}s fetched successfully`,
});
