This commit is contained in:
parent
2eebead81c
commit
081f5e002d
|
@ -2,7 +2,7 @@
|
|||
"name": "huaxin-admin",
|
||||
"version": "2.0.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@8.10.2",
|
||||
"packageManager": "pnpm@9.1.4",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18",
|
||||
|
|
15076
pnpm-lock.yaml
15076
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,98 +1,102 @@
|
|||
import { ClassSerializerInterceptor, Module } from '@nestjs/common';
|
||||
import {ClassSerializerInterceptor, Module} from '@nestjs/common';
|
||||
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR } from '@nestjs/core';
|
||||
import {ConfigModule} from '@nestjs/config';
|
||||
import {APP_FILTER, APP_GUARD, APP_INTERCEPTOR} from '@nestjs/core';
|
||||
|
||||
import config from '~/config';
|
||||
import { SharedModule } from '~/shared/shared.module';
|
||||
import {SharedModule} from '~/shared/shared.module';
|
||||
|
||||
import { AllExceptionsFilter } from './common/filters/any-exception.filter';
|
||||
import {AllExceptionsFilter} from './common/filters/any-exception.filter';
|
||||
|
||||
import { IdempotenceInterceptor } from './common/interceptors/idempotence.interceptor';
|
||||
import { TimeoutInterceptor } from './common/interceptors/timeout.interceptor';
|
||||
import { TransformInterceptor } from './common/interceptors/transform.interceptor';
|
||||
import { AuthModule } from './modules/auth/auth.module';
|
||||
import { JwtAuthGuard } from './modules/auth/guards/jwt-auth.guard';
|
||||
import { RbacGuard } from './modules/auth/guards/rbac.guard';
|
||||
import { HealthModule } from './modules/health/health.module';
|
||||
import { NetdiskModule } from './modules/netdisk/netdisk.module';
|
||||
import { SseModule } from './modules/sse/sse.module';
|
||||
import { SystemModule } from './modules/system/system.module';
|
||||
import { TasksModule } from './modules/tasks/tasks.module';
|
||||
import { TodoModule } from './modules/todo/todo.module';
|
||||
import { ToolsModule } from './modules/tools/tools.module';
|
||||
import { DatabaseModule } from './shared/database/database.module';
|
||||
import {IdempotenceInterceptor} from './common/interceptors/idempotence.interceptor';
|
||||
import {TimeoutInterceptor} from './common/interceptors/timeout.interceptor';
|
||||
import {TransformInterceptor} from './common/interceptors/transform.interceptor';
|
||||
import {AuthModule} from './modules/auth/auth.module';
|
||||
import {JwtAuthGuard} from './modules/auth/guards/jwt-auth.guard';
|
||||
import {RbacGuard} from './modules/auth/guards/rbac.guard';
|
||||
import {HealthModule} from './modules/health/health.module';
|
||||
import {NetdiskModule} from './modules/netdisk/netdisk.module';
|
||||
import {SseModule} from './modules/sse/sse.module';
|
||||
import {SystemModule} from './modules/system/system.module';
|
||||
import {TasksModule} from './modules/tasks/tasks.module';
|
||||
import {TodoModule} from './modules/todo/todo.module';
|
||||
import {ToolsModule} from './modules/tools/tools.module';
|
||||
import {DatabaseModule} from './shared/database/database.module';
|
||||
|
||||
import { SocketModule } from './socket/socket.module';
|
||||
import { ContractModule } from './modules/contract/contract.module';
|
||||
import { MaterialsInventoryModule } from './modules/materials_inventory/materials_inventory.module';
|
||||
import { CompanyModule } from './modules/company/company.module';
|
||||
import { ProductModule } from './modules/product/product.module';
|
||||
import { ProjectModule } from './modules/project/project.module';
|
||||
import { VehicleUsageModule } from './modules/vehicle_usage/vehicle_usage.module';
|
||||
import { SaleQuotationModule } from './modules/sale_quotation/sale_quotation.module';
|
||||
import { DomainModule } from './modules/domian/domain.module';
|
||||
import {SocketModule} from './socket/socket.module';
|
||||
import {ContractModule} from './modules/contract/contract.module';
|
||||
import {MaterialsInventoryModule} from './modules/materials_inventory/materials_inventory.module';
|
||||
import {CompanyModule} from './modules/company/company.module';
|
||||
import {ProductModule} from './modules/product/product.module';
|
||||
import {ProjectModule} from './modules/project/project.module';
|
||||
import {VehicleUsageModule} from './modules/vehicle_usage/vehicle_usage.module';
|
||||
import {SaleQuotationModule} from './modules/sale_quotation/sale_quotation.module';
|
||||
import {DomainModule} from './modules/domian/domain.module';
|
||||
import {BabyRecordModule} from "~/modules/baby_record/baby_record.module";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
expandVariables: true,
|
||||
// 指定多个 env 文件时,第一个优先级最高
|
||||
envFilePath: ['.env.local', `.env.${process.env.NODE_ENV}`, '.env'],
|
||||
load: [...Object.values(config)]
|
||||
}),
|
||||
SharedModule,
|
||||
DatabaseModule,
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
expandVariables: true,
|
||||
// 指定多个 env 文件时,第一个优先级最高
|
||||
envFilePath: ['.env.local', `.env.${process.env.NODE_ENV}`, '.env'],
|
||||
load: [...Object.values(config)]
|
||||
}),
|
||||
SharedModule,
|
||||
DatabaseModule,
|
||||
|
||||
AuthModule,
|
||||
SystemModule,
|
||||
TasksModule.forRoot(),
|
||||
ToolsModule,
|
||||
SocketModule,
|
||||
HealthModule,
|
||||
SseModule,
|
||||
NetdiskModule,
|
||||
AuthModule,
|
||||
SystemModule,
|
||||
TasksModule.forRoot(),
|
||||
ToolsModule,
|
||||
SocketModule,
|
||||
HealthModule,
|
||||
SseModule,
|
||||
NetdiskModule,
|
||||
|
||||
// biz
|
||||
// biz
|
||||
|
||||
// end biz
|
||||
// end biz
|
||||
|
||||
TodoModule,
|
||||
// 合同模块
|
||||
ContractModule,
|
||||
TodoModule,
|
||||
// 合同模块
|
||||
ContractModule,
|
||||
|
||||
// 原材料库存
|
||||
MaterialsInventoryModule,
|
||||
// 原材料库存
|
||||
MaterialsInventoryModule,
|
||||
|
||||
// 公司管理
|
||||
CompanyModule,
|
||||
// 公司管理
|
||||
CompanyModule,
|
||||
|
||||
// 产品管理
|
||||
ProductModule,
|
||||
// 产品管理
|
||||
ProductModule,
|
||||
|
||||
// 项目管理
|
||||
ProjectModule,
|
||||
// 项目管理
|
||||
ProjectModule,
|
||||
|
||||
// 车辆管理
|
||||
VehicleUsageModule,
|
||||
// 车辆管理
|
||||
VehicleUsageModule,
|
||||
|
||||
//报价管理
|
||||
SaleQuotationModule,
|
||||
//域
|
||||
DomainModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: APP_FILTER, useClass: AllExceptionsFilter },
|
||||
//报价管理
|
||||
SaleQuotationModule,
|
||||
//域
|
||||
DomainModule,
|
||||
// 宝宝管理
|
||||
BabyRecordModule
|
||||
],
|
||||
providers: [
|
||||
{provide: APP_FILTER, useClass: AllExceptionsFilter},
|
||||
|
||||
{ provide: APP_INTERCEPTOR, useClass: ClassSerializerInterceptor },
|
||||
{ provide: APP_INTERCEPTOR, useClass: TransformInterceptor },
|
||||
{ provide: APP_INTERCEPTOR, useFactory: () => new TimeoutInterceptor(15 * 1000) },
|
||||
{ provide: APP_INTERCEPTOR, useClass: IdempotenceInterceptor },
|
||||
{provide: APP_INTERCEPTOR, useClass: ClassSerializerInterceptor},
|
||||
{provide: APP_INTERCEPTOR, useClass: TransformInterceptor},
|
||||
{provide: APP_INTERCEPTOR, useFactory: () => new TimeoutInterceptor(15 * 1000)},
|
||||
{provide: APP_INTERCEPTOR, useClass: IdempotenceInterceptor},
|
||||
|
||||
{ provide: APP_GUARD, useClass: JwtAuthGuard },
|
||||
{ provide: APP_GUARD, useClass: RbacGuard }
|
||||
],
|
||||
controllers: []
|
||||
{provide: APP_GUARD, useClass: JwtAuthGuard},
|
||||
{provide: APP_GUARD, useClass: RbacGuard}
|
||||
],
|
||||
controllers: []
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule {
|
||||
}
|
||||
|
|
|
@ -46,3 +46,8 @@ export enum ResourceDeviceEnum {
|
|||
APP = 0,
|
||||
PC = 1
|
||||
}
|
||||
|
||||
// 宝宝动作
|
||||
export enum BabyActionEnum {
|
||||
Pee, Shit, Breast, Bottle
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import {Module} from '@nestjs/common';
|
||||
import {TypeOrmModule} from '@nestjs/typeorm';
|
||||
import {StorageModule} from '../tools/storage/storage.module';
|
||||
import {ParamConfigModule} from '../system/param-config/param-config.module';
|
||||
import {ProjectModule} from '../project/project.module';
|
||||
import {ProjectEntity} from '../project/project.entity';
|
||||
import {BabyRecordEntity} from "~/modules/baby_record/baby_record.entity";
|
||||
import {BabyRecordService} from "~/modules/baby_record/baby_record.service";
|
||||
import {BabyRecordController} from "~/modules/baby_record/baby_record.controller";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([BabyRecordEntity,]),
|
||||
ParamConfigModule,
|
||||
StorageModule,
|
||||
ProjectModule
|
||||
],
|
||||
controllers: [BabyRecordController],
|
||||
providers: [BabyRecordService]
|
||||
})
|
||||
export class BabyRecordModule {
|
||||
}
|
|
@ -10,10 +10,11 @@ import { MaterialsInOutEntity } from './in_out/materials_in_out.entity';
|
|||
import { ParamConfigModule } from '../system/param-config/param-config.module';
|
||||
import { ProjectModule } from '../project/project.module';
|
||||
import { ProjectEntity } from '../project/project.entity';
|
||||
import {BabyRecordEntity} from "~/modules/baby_record/baby_record.entity";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([MaterialsInventoryEntity, MaterialsInOutEntity,ProjectEntity]),
|
||||
TypeOrmModule.forFeature([MaterialsInventoryEntity, MaterialsInOutEntity,ProjectEntity,BabyRecordEntity]),
|
||||
ParamConfigModule,
|
||||
StorageModule,
|
||||
ProjectModule
|
||||
|
|
Loading…
Reference in New Issue