postgrelize / AfterDestroy
Variable: AfterDestroy ​
constAfterDestroy:ModelStaticMethodDecorator
Defined in: src/decorators/hook-decorators.ts:167
Registers the decorated static method as an afterDestroy hook of the model (like Model.afterDestroy). 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 {
@AfterDestroy
static async onAfterDestroy(user: User, options: unknown) {}
}