Convert metadata tables to camel_case (#2420)

* Convert metadata tables to camelcase

* refactor folder structure

* rename datasourcemetadata

* regenerate metadata schema

* rename dataSourceMetadata to dataSource
This commit is contained in:
Weiko
2023-11-10 15:33:25 +01:00
committed by GitHub
parent 6e7ad5eabc
commit 04c618284f
98 changed files with 1189 additions and 1735 deletions

View File

@ -1,28 +1,56 @@
import { Module } from '@nestjs/common';
import { NestjsQueryGraphQLModule } from '@ptc-org/nestjs-query-graphql';
import {
NestjsQueryGraphQLModule,
PagingStrategies,
} from '@ptc-org/nestjs-query-graphql';
import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm';
import { SortDirection } from '@ptc-org/nestjs-query-core';
import { DataSourceMetadataModule } from 'src/metadata/data-source-metadata/data-source-metadata.module';
import { MigrationRunnerModule } from 'src/metadata/migration-runner/migration-runner.module';
import { DataSourceModule } from 'src/metadata/data-source/data-source.module';
import { TenantMigrationRunnerModule } from 'src/tenant-migration-runner/tenant-migration-runner.module';
import { TenantMigrationModule } from 'src/metadata/tenant-migration/tenant-migration.module';
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
import { ObjectMetadata } from './object-metadata.entity';
import { objectMetadataAutoResolverOpts } from './object-metadata.auto-resolver-opts';
import { ObjectMetadataService } from './object-metadata.service';
import { ObjectMetadataEntity } from './object-metadata.entity';
import { ObjectMetadataService } from './services/object-metadata.service';
import { CreateObjectInput } from './dtos/create-object.input';
import { UpdateObjectInput } from './dtos/update-object.input';
import { ObjectMetadataDTO } from './dtos/object-metadata.dto';
@Module({
imports: [
NestjsQueryGraphQLModule.forFeature({
imports: [
NestjsQueryTypeOrmModule.forFeature([ObjectMetadata], 'metadata'),
DataSourceMetadataModule,
NestjsQueryTypeOrmModule.forFeature([ObjectMetadataEntity], 'metadata'),
DataSourceModule,
TenantMigrationModule,
MigrationRunnerModule,
TenantMigrationRunnerModule,
],
services: [ObjectMetadataService],
resolvers: objectMetadataAutoResolverOpts,
resolvers: [
{
EntityClass: ObjectMetadataEntity,
DTOClass: ObjectMetadataDTO,
CreateDTOClass: CreateObjectInput,
UpdateDTOClass: UpdateObjectInput,
ServiceClass: ObjectMetadataService,
enableTotalCount: true,
pagingStrategy: PagingStrategies.CURSOR,
read: {
defaultSort: [{ field: 'id', direction: SortDirection.DESC }],
},
create: {
many: { disabled: true },
},
update: {
many: { disabled: true },
},
delete: { many: { disabled: true } },
guards: [JwtAuthGuard],
},
],
}),
],
providers: [ObjectMetadataService],