sequelize-typescript
Version:
Decorators and some other extras for sequelize (v3 + v4)
26 lines (25 loc) • 847 B
TypeScript
import { Model } from "../models/Model";
import { IIncludeAssociation } from "./IIncludeAssociation";
import { IBaseIncludeOptions } from "./IBaseIncludeOptions";
/**
* Complex include options
*/
export interface IIncludeOptions extends IBaseIncludeOptions {
/**
* The model you want to eagerly load
*/
model?: typeof Model;
/**
* The association you want to eagerly load. (This can be used instead of providing a model/as pair)
*/
association?: IIncludeAssociation;
/**
* Load further nested related models
*/
include?: Array<typeof Model | IIncludeOptions>;
/**
* If true, only non-deleted records will be returned. If false, both deleted and non-deleted records will
* be returned. Only applies if `options.paranoid` is true for the model.
*/
paranoid?: boolean;
}