Sequelize Guard
API ReferenceInterfaces

Interface: GuardInternalOptions

sequelize-guard v6.0.1


sequelize-guard / GuardInternalOptions

Interface: GuardInternalOptions

Defined in: types/options.ts:90

Internal options with all defaults applied

Extends

Properties

prefix

prefix: string

Defined in: types/options.ts:24

Prefix for guard tables in database

Default

'guard_'

Inherited from

GuardOptions.prefix


primaryKey

primaryKey: string

Defined in: types/options.ts:30

Primary key for guard tables

Default

'id'

Inherited from

GuardOptions.primaryKey


timestamps

timestamps: boolean

Defined in: types/options.ts:36

Add timestamps to tables

Default

false

Inherited from

GuardOptions.timestamps


paranoid

paranoid: boolean

Defined in: types/options.ts:42

Enable soft deletes of items

Default

false

Inherited from

GuardOptions.paranoid


sync

sync: boolean

Defined in: types/options.ts:48

Auto create tables, set to false if using migrations

Default

true

Inherited from

GuardOptions.sync


debug

debug: boolean

Defined in: types/options.ts:54

Debug mode, output logs

Default

false

Inherited from

GuardOptions.debug


UserModel

UserModel: ModelStatic<GuardUserModel> | null

Defined in: types/options.ts:60

Model used for User (pass model, not string name)

Default

null

Inherited from

GuardOptions.UserModel


userPk

userPk: string

Defined in: types/options.ts:66

Primary key used for User Model

Default

'id'

Inherited from

GuardOptions.userPk


safeGuardDeletes

safeGuardDeletes: boolean

Defined in: types/options.ts:72

Roles or permissions can't be deleted while associated with other data

Default

true

Inherited from

GuardOptions.safeGuardDeletes


userCache

userCache: boolean

Defined in: types/options.ts:78

Cache user roles for faster permission resolution

Default

true

Inherited from

GuardOptions.userCache


userCacheTtl

userCacheTtl: number

Defined in: types/options.ts:84

Time to cache user roles (in seconds)

Default

60

Inherited from

GuardOptions.userCacheTtl


tables

tables: Required<NonNullable<GuardOptions["tables"]>>

Defined in: types/options.ts:91

Table names configuration

Overrides

GuardOptions.tables

On this page