UNPKG

1.05 kBTypeScriptView Raw
1import { ForeignKeyOptions } from 'sequelize';
2import { ForeignKeyMeta } from './foreign-key-meta';
3import { ModelClassGetter } from '../../model/shared/model-class-getter';
4import { ModelType } from '../../model/model/model';
5export declare function getForeignKeyOptions<TCreationAttributes, TModelAttributes, TCreationAttributesThrough, TModelAttributesThrough>(relatedClass: ModelType<TCreationAttributes, TModelAttributes>, classWithForeignKey?: ModelType<TCreationAttributesThrough, TModelAttributesThrough>, foreignKey?: string | ForeignKeyOptions): ForeignKeyOptions;
6/**
7 * Adds foreign key meta data for specified class
8 */
9export declare function addForeignKey<TCreationAttributes, TModelAttributes>(target: any, relatedClassGetter: ModelClassGetter<TCreationAttributes, TModelAttributes>, foreignKey: string): void;
10/**
11 * Returns foreign key meta data from specified class
12 */
13export declare function getForeignKeys<TCreationAttributes, TModelAttributes>(target: any): ForeignKeyMeta<TCreationAttributes, TModelAttributes>[] | undefined;