Skip to content

Commit

Permalink
refactor: 공통 모듈을 common 디렉토리로 이동 및 import 경로 수정
Browse files Browse the repository at this point in the history
decorator, filter, guard, interceptor 모듈을 common 디렉토리로 이동한다.
pipe, middleware 폴더를 common 디렉토리에 생성한다.
공통 모듈의 위치를 변경하여 디렉토리 구조를 개선한다.
import 경로를 새로운 구조에 맞게 일괄 수정한다.
  • Loading branch information
JHyeok committed Jan 18, 2025
1 parent 2cf0776 commit 1fe0668
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/api/order/repository/order-product.repository.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Repository } from 'typeorm';
import { CustomRepository } from '../../../decorator/typeorm-ex.decorator';
import { CustomRepository } from '../../../common/decorator/typeorm-ex.decorator';
import { OrderProduct } from '../domain/order-product.entity';

@CustomRepository(OrderProduct)
Expand Down
2 changes: 1 addition & 1 deletion src/api/order/repository/order.repository.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Repository } from 'typeorm';
import { CustomRepository } from '../../../decorator/typeorm-ex.decorator';
import { CustomRepository } from '../../../common/decorator/typeorm-ex.decorator';
import { Order } from '../domain/order.entity';

@CustomRepository(Order)
Expand Down
2 changes: 1 addition & 1 deletion src/api/order/repository/product.repository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Repository, In } from 'typeorm';
import { Product } from '../domain/product.entity';
import { CustomRepository } from '../../../decorator/typeorm-ex.decorator';
import { CustomRepository } from '../../../common/decorator/typeorm-ex.decorator';

@CustomRepository(Product)
export class ProductRepository extends Repository<Product> {
Expand Down
2 changes: 1 addition & 1 deletion src/api/user/user.repository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Repository } from 'typeorm';
import { User } from './domain/user.entity';
import { CustomRepository } from '../../decorator/typeorm-ex.decorator';
import { CustomRepository } from '../../common/decorator/typeorm-ex.decorator';
import { plainToInstance } from 'class-transformer';
import { UserName } from './domain/user-name';

Expand Down
4 changes: 2 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { MySQLModule } from './database/mysql.module';
import { HealthModule } from './api/health/health.module';
import { UserModule } from './api/user/user.module';
import { OrderModule } from './api/order/order.module';
import { AllExceptionFilter } from './filter/all-exception.filter';
import { NotFoundExceptionFilter } from './filter/not-found-exception.filter';
import { AllExceptionFilter } from './common/filter/all-exception.filter';
import { NotFoundExceptionFilter } from './common/filter/not-found-exception.filter';

@Module({
imports: [MySQLModule, HealthModule, UserModule, OrderModule],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added src/common/middleware/.gitkeep
Empty file.
Empty file added src/common/pipe/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion src/database/typeorm-ex.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DynamicModule, Provider } from '@nestjs/common';
import { getDataSourceToken } from '@nestjs/typeorm';
import { DataSource } from 'typeorm';
import { TYPEORM_EX_CUSTOM_REPOSITORY } from '../decorator/typeorm-ex.decorator';
import { TYPEORM_EX_CUSTOM_REPOSITORY } from '../common/decorator/typeorm-ex.decorator';

export class TypeOrmExModule {
public static forCustomRepository<T extends new (...args: any[]) => any>(
Expand Down

0 comments on commit 1fe0668

Please sign in to comment.