postgrelize / ScopeOptions
Type Alias: ScopeOptions ​
ScopeOptions =
Readonly<Record<string,unknown>>
Defined in: src/model/scope-registry.ts:16
Find options stored in a scope (where, attributes, order, limit, ...).
Example ​
ts
const scope: ScopeOptions = { where: { active: true }, order: [['createdAt', 'DESC']], limit: 100 };
User.init({ name: DataTypes.STRING }, { sequelize, defaultScope: scope });