@terabits/grapi
Version:
Grapi Schema Generator For GraphQL Server
24 lines (23 loc) • 636 B
TypeScript
import Model from '../model';
export declare enum RelationType {
uniOneToOne = "UNI_ONE_TO_ONE",
uniManyToOne = "UNI_MANY_TO_ONE",
uniOneToMany = "UNI_ONE_TO_MANY",
biOneToOne = "BI_ONE_TO_ONE",
biOneToMany = "BI_ONE_TO_MANY",
biManyToMany = "BI_MANY_TO_MANY"
}
export declare enum RelationShip {
OneToOne = "RelationOneToOne",
OneToMany = "RelationOneToMany",
ManyToMany = "RelationManyToMany"
}
export interface ModelRelation {
type: RelationType;
name?: string;
source: Model;
sourceField: string;
target: Model;
targetField?: string;
metadata?: Record<string, any>;
}