// import { Injectable } from '@nestjs/common'; // import { InjectRepository } from '@nestjs/typeorm'; // import { Repository } from 'typeorm'; // @Injectable() // export class UserAppMappingRepository { // constructor( // @InjectRepository(UserAppMapping) // private readonly userAppMappingRepository: Repository, // ) {} // async save(userId: number, appCode: string): Promise { // const mapping = this.userAppMappingRepository.create({ // user_id: userId, // appcode: appCode, // }); // return await this.userAppMappingRepository.save(mapping); // } // async findByUserIdAndAppCode( // userId: number, // appCode: string, // ): Promise { // return await this.userAppMappingRepository.findOne({ // where: { user_id: userId, appcode: appCode }, // }); // } // }