-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07f89f2
commit 5fb0a77
Showing
76 changed files
with
159 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//rich module | ||
export * from "./modules/rich.module" | ||
|
||
export * from "./modules/excel/excel.service" | ||
export * from "./modules/cache/cache.service" | ||
export * from "./modules/file/file.utils" | ||
|
||
|
||
|
||
export * from "./modules/permission/permission.guard" | ||
export * from "./modules/permission/permission.decorator" | ||
|
||
export * from "./modules/auth/auth.guard" | ||
|
||
|
||
//commons | ||
export * from "./modules/common/common.module" | ||
export * from "./modules/common/common.service" | ||
export * from "./modules/common/models/common.entity" | ||
export * from "./modules/common/Dtos/common.params.dto" | ||
export * from "./modules/common/Dtos/common.search.dto" | ||
|
||
export * from "./modules/permission/permission.gurd.service" | ||
export * from "./modules/permission/permission.module" | ||
export * from "./modules/permission/models/permission.entity" | ||
|
||
|
||
export * from "./modules/request_log/request_log.middleware" | ||
export * from "./modules/request_log/request_log.service" | ||
export * from "./modules/request_log/models/request_log.entity" | ||
|
||
export * from "./modules/auth/auth.module" | ||
|
||
export * from "./modules/cache/cache.module" | ||
|
||
|
||
export * from "./modules/request_log/request_log.module" | ||
|
||
export * from "./modules/role/role.module" | ||
export * from "./modules/role/models/role.entity" | ||
|
||
export * from "./modules/user/user.module" | ||
export * from "./modules/user/models/user.entity" | ||
export * from "./modules/user/user.service" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
src/auth/auth.controller.ts → rich/modules/auth/auth.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { CacheService } from 'src/cache/cache.service'; | ||
import { CacheService } from '../cache/cache.service'; | ||
|
||
@Injectable() | ||
export class AuthService extends CacheService {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/common/common.module.ts → rich/modules/common/common.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/common/common.service.ts → rich/modules/common/common.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/excel/excel.service.ts → rich/modules/excel/excel.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { CommonParamsDto } from "../../common/Dtos/common.params.dto"; | ||
|
||
export class PermissionDeleteDto extends CommonParamsDto {} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { CommonSearchDto } from "../../common/Dtos/common.search.dto"; | ||
|
||
export class PermissionSearchDto extends CommonSearchDto { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { CommonParamsDto } from "../../common/Dtos/common.params.dto"; | ||
|
||
export class PermissionShowDto extends CommonParamsDto {} |
2 changes: 1 addition & 1 deletion
2
src/permission/Dtos/permission.update.dto.ts → .../permission/Dtos/permission.update.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/permission/models/permission.entity.ts → ...es/permission/models/permission.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/permission/permission.controller.ts → ...dules/permission/permission.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 0 additions & 1 deletion
1
src/permission/permission.guard.ts → rich/modules/permission/permission.guard.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/permission/permission.gurd.service.ts → ...les/permission/permission.gurd.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/permission/permission.module.ts → rich/modules/permission/permission.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/permission/permission.service.ts → .../modules/permission/permission.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/request_log/models/request_log.entity.ts → .../request_log/models/request_log.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
import { MulterModule } from '@nestjs/platform-express'; | ||
import { APP_GUARD } from '@nestjs/core'; | ||
import { AuthModule } from './auth/auth.module'; | ||
import { UserModule } from './user/user.module'; | ||
import { PermissionModule } from './permission/permission.module'; | ||
import { RoleModule } from './role/role.module'; | ||
import { CommonModule } from './common/common.module'; | ||
import { RequestLog } from './request_log/models/request_log.entity'; | ||
import { RequestLogModule } from './request_log/request_log.module'; | ||
import { PermissionGuard } from './permission/permission.guard'; | ||
import { PermissionGuardService } from './permission/permission.gurd.service'; | ||
import { RequestLogService } from './request_log/request_log.service'; | ||
import { AppLoggerMiddleware } from './request_log/request_log.middleware'; | ||
import { CacheModule } from './cache/cache.module'; | ||
|
||
@Module({}) | ||
export class RichModule implements NestModule { | ||
configure(consumer: MiddlewareConsumer): void { | ||
consumer.apply(AppLoggerMiddleware).forRoutes('*'); | ||
} | ||
} | ||
|
||
export const RichImports = (dbConfig: object) => [ | ||
TypeOrmModule.forRoot(dbConfig), | ||
AuthModule, | ||
UserModule, | ||
PermissionModule, | ||
RoleModule, | ||
CommonModule, | ||
TypeOrmModule.forFeature([RequestLog]), | ||
RequestLogModule, | ||
CacheModule, | ||
MulterModule.register({ | ||
dest: './upload', | ||
}) | ||
] | ||
|
||
export const RichProviders = [ | ||
{ | ||
provide: APP_GUARD, | ||
useClass: PermissionGuard | ||
}, | ||
PermissionGuardService, | ||
RequestLogService | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/role/models/role.entity.ts → rich/modules/role/models/role.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.