import { RealModel } from '../custom/TransformModel'; import { CreateOptions } from './CreateOptions'; import { Model } from './Model'; /** * The createAssociation mixin applied to models with hasMany. * An example of usage is as follows: * * ```js * * User.hasMany(Role); * * interface UserInstance extends Sequelize.Instance, UserAttributes { * // getRoles... * // setRoles... * // addRoles... * // addRole... * createRole: Sequelize.HasManyCreateAssociationMixin; * // removeRole... * // removeRoles... * // hasRole... * // hasRoles... * // countRoles... * } * ``` * * @see https://sequelize.org/master/class/lib/associations/has-many.js~HasMany.html * @see Instance */ export type HasManyCreateAssociationMixin = ( values?: { [attribute: string]: unknown }, options?: HasManyCreateAssociationMixinOptions, ) => Promise>; /** * The options for the createAssociation mixin of the hasMany association. * @see HasManyCreateAssociationMixin */ export interface HasManyCreateAssociationMixinOptions extends CreateOptions {}