pims
Version:
An ORM for document-oriented database systems, written in and for TypeScript.
17 lines (16 loc) • 661 B
TypeScript
export declare enum Relationship {
HasMany = 0,
BelongsTo = 1,
HasOne = 2,
HasAndBelongsToMany = 3,
}
export interface RelationshipInfo {
kind: Relationship;
key: string;
foreignKey?: string;
model: (model: any) => any;
}
export declare function HasMany(model: (model: any) => any, foreignKey: string): PropertyDecorator;
export declare function HasOne(model: (model: any) => any, foreignKey: string): PropertyDecorator;
export declare function BelongsTo(model: (model: any) => any, localKey: string): PropertyDecorator;
export declare function HasAndBelongsToMany(model: (model: any) => any): PropertyDecorator;