This commit is contained in:
Louis 2024-08-26 18:12:52 +08:00
parent 2eebead81c
commit 081f5e002d
6 changed files with 8547 additions and 6719 deletions

View File

@ -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",

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,38 @@
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: [
@ -80,19 +81,22 @@ import { DomainModule } from './modules/domian/domain.module';
//报价管理 //报价管理
SaleQuotationModule, SaleQuotationModule,
//域 //域
DomainModule DomainModule,
// 宝宝管理
BabyRecordModule
], ],
providers: [ providers: [
{ provide: APP_FILTER, useClass: AllExceptionsFilter }, {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 {
}

View File

@ -46,3 +46,8 @@ export enum ResourceDeviceEnum {
APP = 0, APP = 0,
PC = 1 PC = 1
} }
// 宝宝动作
export enum BabyActionEnum {
Pee, Shit, Breast, Bottle
}

View File

@ -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 {
}

View File

@ -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