import { Entity, EntityId } from '@pocket-architect/core'; import { Schema } from './Schema'; import { SchemaObject } from './SchemaObject'; export declare enum RelationType { OneToOne = "1:1", ManyToOne = "n:1", OneToMany = "1:n", ManyToMany = "n:n" } export interface IRelationEntity { id: string; columnName: string; nullable?: boolean; } export interface IRelation { id: string; name: string; type: RelationType; source: IRelationEntity; target: IRelationEntity; junctionPayload?: { id: string; }; description?: string; } export declare class RelationId extends EntityId { readonly isRelation = true; } export declare class Relation extends Entity { protected _schema: Schema; protected _source: SchemaObject; protected _target: SchemaObject; static create(props: IRelation, schema: Schema, source: SchemaObject, target: SchemaObject): Relation; get name(): string; private set name(value); get source(): SchemaObject; get sourceSchema(): IRelationEntity; get targetSchema(): IRelationEntity; get target(): SchemaObject; get type(): string; get description(): string; updateProps(props: IRelation): void; toJSON(): IRelation; }