* feat: add ability to sync standard fields on custom object * fix: clean * fix: wrong compute during object creation * fix: missing cascade delete * fix: remove unused injected class * fix: naming * fix: rename factory to paramsFactory and clean * fix: rename ExtendCustomObjectMetadata to BaseCustomObjectMetadata * fix: partial fix inconsistent label and description * Fixes * Fix --------- Co-authored-by: Charles Bochet <charles@twenty.com>
24 lines
674 B
TypeScript
24 lines
674 B
TypeScript
import { ObjectType } from 'typeorm';
|
|
|
|
import { GateDecoratorParams } from 'src/workspace/workspace-sync-metadata/interfaces/gate-decorator.interface';
|
|
|
|
import {
|
|
RelationOnDeleteAction,
|
|
RelationMetadataType,
|
|
} from 'src/metadata/relation-metadata/relation-metadata.entity';
|
|
|
|
export interface RelationMetadataDecoratorParams<T> {
|
|
type: RelationMetadataType;
|
|
inverseSideTarget: () => ObjectType<T>;
|
|
inverseSideFieldKey?: keyof T;
|
|
onDelete?: RelationOnDeleteAction;
|
|
}
|
|
|
|
export interface ReflectRelationMetadata
|
|
extends RelationMetadataDecoratorParams<any> {
|
|
target: object;
|
|
fieldKey: string;
|
|
gate?: GateDecoratorParams;
|
|
onDelete: RelationOnDeleteAction;
|
|
}
|