import { BelongsToManyGetAssociationsMixinOptions } from './BelongsToManyGetAssociationsMixin'; import { Model } from './Model'; /** * The hasAssociation mixin applied to models with belongsToMany. * An example of usage is as follows: * * ```js * * User.belongsToMany(Role, { through: UserRole }); * * interface UserInstance extends Sequelize.Instance, UserAttributes { * // getRoles... * // setRoles... * // addRoles... * // addRole... * // createRole... * // removeRole... * // removeRoles... * hasRole: Sequelize.BelongsToManyHasAssociationMixin; * // hasRoles... * // countRoles... * } * ``` * * @see https://sequelize.org/master/class/lib/associations/belongs-to-many.js~BelongsToMany.html * @see Instance */ export type BelongsToManyHasAssociationMixin = ( target: Model | TModelPrimaryKey, options?: BelongsToManyHasAssociationMixinOptions, ) => Promise; /** * The options for the hasAssociation mixin of the belongsToMany association. * @see BelongsToManyHasAssociationMixin */ export interface BelongsToManyHasAssociationMixinOptions extends BelongsToManyGetAssociationsMixinOptions {}