import User from '@modules/users/infra/typeorm/entities/User' ; import IUsersRepository from '@modules/users/repositories/IUsersRepository' ; import Project from '@modules/projects/infra/typeorm/entities/Project' ; import IProjectsRepository from '@modules/projects/repositories/IProjectsRepository' ; import LibraryItem from '@modules/library/infra/typeorm/entities/LibraryItem' ; import ILibraryRepository from '@modules/library/repositories/ILibraryRepository' ; import { inject , injectable } from 'tsyringe' ; type Response = { users : User [ ] ; projects : Project [ ] ; library : LibraryItem [ ] ; } ; @ injectable ( ) class ShowProjectService { constructor ( @ inject ( 'UsersRepository' ) private usersRepository , @ inject ( 'ProjectsRepository' ) private projectsRepository , @ inject ( 'LibraryRepository' ) private libraryRepository ) { } public async execute ( term ) { const users = await this . usersRepository . search ( term ) ; return { users , projects : [ ] , library : [ ] } ; } } export default ShowProjectService ;