import { RealModel } from '../custom/TransformModel'; import { FindOptions } from './FindOptions'; import { Model } from './Model'; /** * The getAssociation mixin applied to models with belongsTo. * An example of usage is as follows: * * ```js * * User.belongsTo(Role); * * interface UserInstance extends Sequelize.Instance, UserAttrib { * getRole: Sequelize.BelongsToGetAssociationMixin; * // setRole... * // createRole... * } * ``` * * @see https://sequelize.org/master/class/lib/associations/belongs-to.js~BelongsTo.html * @see Instance */ export type BelongsToGetAssociationMixin = ( options?: BelongsToGetAssociationMixinOptions, ) => Promise>; /** * The options for the getAssociation mixin of the belongsTo association. * @see BelongsToGetAssociationMixin */ export interface BelongsToGetAssociationMixinOptions extends FindOptions { /** * Apply a scope on the related model, or remove its default scope by passing false. */ scope?: string | string[] | boolean; }