Interface: GuardOptions
sequelize-guard / GuardOptions
Interface: GuardOptions
Defined in: types/options.ts:7
Configuration options for SequelizeGuard
Properties
tables?
optionaltables:object
Defined in: types/options.ts:11
Table names configuration
meta?
optionalmeta:string
parents?
optionalparents:string
permissions?
optionalpermissions:string
resources?
optionalresources:string
roles?
optionalroles:string
users?
optionalusers:string
prefix?
optionalprefix:string
Defined in: types/options.ts:24
Prefix for guard tables in database
Default
'guard_'primaryKey?
optionalprimaryKey:string
Defined in: types/options.ts:30
Primary key for guard tables
Default
'id'timestamps?
optionaltimestamps:boolean
Defined in: types/options.ts:36
Add timestamps to tables
Default
falseparanoid?
optionalparanoid:boolean
Defined in: types/options.ts:42
Enable soft deletes of items
Default
falsesync?
optionalsync:boolean
Defined in: types/options.ts:48
Auto create tables, set to false if using migrations
Default
truedebug?
optionaldebug:boolean
Defined in: types/options.ts:54
Debug mode, output logs
Default
falseUserModel?
optionalUserModel:ModelStatic<GuardUserModel> |null
Defined in: types/options.ts:60
Model used for User (pass model, not string name)
Default
nulluserPk?
optionaluserPk:string
Defined in: types/options.ts:66
Primary key used for User Model
Default
'id'safeGuardDeletes?
optionalsafeGuardDeletes:boolean
Defined in: types/options.ts:72
Roles or permissions can't be deleted while associated with other data
Default
trueuserCache?
optionaluserCache:boolean
Defined in: types/options.ts:78
Cache user roles for faster permission resolution
Default
trueuserCacheTtl?
optionaluserCacheTtl:number
Defined in: types/options.ts:84
Time to cache user roles (in seconds)
Default
60