import { Provide } from '@midwayjs/decorator';
// import { InjectEntityModel } from '@midwayjs/typegoose';
// import { ReturnModelType } from '@typegoose/typegoose';
// import { DataSourceMongoEntity } from '../entity/data_source_mongo';

@Provide()
export class DataMongoService {
  // @InjectEntityModel(DataSourceMongoEntity)
  // dataSourceMongoEntityModel: ReturnModelType<typeof DataSourceMongoEntity>;
  // async getTest() {
  //   // create data
  //   const { _id: id } = await this.dataSourceMongoEntityModel.create({
  //     name: 'JohnDoe',
  //     jobs: ['Cleaner'],
  //   } as DataSourceMongoEntity); // an "as" assertion, to have types for all properties
  //   // find data
  //   const user = await this.dataSourceMongoEntityModel.findById(id).exec();
  //   console.log(user);
  // }
}
