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