This commit is contained in:
2025-05-19 11:12:36 +08:00
parent d264b515a1
commit 34c4ac8f86
4 changed files with 71 additions and 2 deletions
@@ -0,0 +1,7 @@
import { SetMetadata } from '@nestjs/common';
import { ObjectType } from 'typeorm';
import { CUSTOM_REPOSITORY_METADATA } from '@/modules/database/constants';
export const CustomRepository = <T>(entity: ObjectType<T>): ClassDecorator =>
SetMetadata(CUSTOM_REPOSITORY_METADATA, entity);