Interface: GuardInternalOptions
sequelize-guard / GuardInternalOptions
Interface: GuardInternalOptions
Defined in: types/options.ts:90
Internal options with all defaults applied
Extends
Required<GuardOptions>
Properties
prefix
prefix:
string
Defined in: types/options.ts:24
Prefix for guard tables in database
Default
'guard_'Inherited from
primaryKey
primaryKey:
string
Defined in: types/options.ts:30
Primary key for guard tables
Default
'id'Inherited from
timestamps
timestamps:
boolean
Defined in: types/options.ts:36
Add timestamps to tables
Default
falseInherited from
paranoid
paranoid:
boolean
Defined in: types/options.ts:42
Enable soft deletes of items
Default
falseInherited from
sync
sync:
boolean
Defined in: types/options.ts:48
Auto create tables, set to false if using migrations
Default
trueInherited from
debug
debug:
boolean
Defined in: types/options.ts:54
Debug mode, output logs
Default
falseInherited from
UserModel
UserModel:
ModelStatic<GuardUserModel> |null
Defined in: types/options.ts:60
Model used for User (pass model, not string name)
Default
nullInherited from
userPk
userPk:
string
Defined in: types/options.ts:66
Primary key used for User Model
Default
'id'Inherited from
safeGuardDeletes
safeGuardDeletes:
boolean
Defined in: types/options.ts:72
Roles or permissions can't be deleted while associated with other data
Default
trueInherited from
userCache
userCache:
boolean
Defined in: types/options.ts:78
Cache user roles for faster permission resolution
Default
trueInherited from
userCacheTtl
userCacheTtl:
number
Defined in: types/options.ts:84
Time to cache user roles (in seconds)
Default
60Inherited from
tables
tables:
Required<NonNullable<GuardOptions["tables"]>>
Defined in: types/options.ts:91
Table names configuration