postgrelize / BeforeBulkCreate
Variable: BeforeBulkCreate ​
constBeforeBulkCreate:ModelStaticMethodDecorator
Defined in: src/decorators/hook-decorators.ts:242
Registers the decorated static method as a beforeBulkCreate hook of the model (like Model.beforeBulkCreate). The method receives the hook arguments; static methods only. Registered when sequelize.addModels applies the class. Accepts the TC39 and the legacy experimentalDecorators call signature.
Example ​
ts
class User extends Model {
@BeforeBulkCreate
static async onBeforeBulkCreate(users: User[], options: unknown) {}
}