Add targetColumnMap to FieldMetadata (#1863)

* Add targetColumnMap to FieldMetadata

* fix

* remove console.log

* fix test
This commit is contained in:
Weiko
2023-10-04 15:17:53 +02:00
committed by GitHub
parent 8f41792918
commit 42e8869e0e
22 changed files with 262 additions and 276 deletions

View File

@ -10,6 +10,10 @@ import {
import { ObjectMetadata } from 'src/metadata/object-metadata/object-metadata.entity';
export type FieldMetadataTargetColumnMap = {
[key: string]: string;
};
@Entity('field_metadata')
export class FieldMetadata {
@PrimaryGeneratedColumn('uuid')
@ -27,12 +31,27 @@ export class FieldMetadata {
@Column({ nullable: false, name: 'target_column_name' })
targetColumnName: string;
@Column({ nullable: true, name: 'description', type: 'text' })
description: string;
@Column({ nullable: true, name: 'icon' })
icon: string;
@Column({ nullable: true, name: 'placeholder' })
placeholder: string;
@Column({ nullable: true, name: 'target_column_map', type: 'jsonb' })
targetColumnMap: FieldMetadataTargetColumnMap;
@Column('text', { nullable: true, array: true })
enums: string[];
@Column({ default: false, name: 'is_custom' })
isCustom: boolean;
@Column({ default: false, name: 'is_active' })
isActive: boolean;
@Column({ nullable: true, default: true, name: 'is_nullable' })
isNullable: boolean;