Skip to main content
zerotal

Documentation


Documentation / @zerotal/orm / index / MorphedByManyOptions

Interface: MorphedByManyOptions

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:3

Properties

morphName

morphName: string

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:5

Morph name — the pivot {name}_id / {name}_type columns describe the related side.


parentPivotKey

parentPivotKey: string

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:7

FK on the pivot referencing the parent model (e.g. 'tag_id').


pivotTable?

optional pivotTable?: string

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:9

Pivot table name. Defaults to {morphName}s.


withPivot?

optional withPivot?: string[]

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:10


withTimestamps?

optional withTimestamps?: boolean

Defined in: packages/orm/src/model/decorators/morphedByMany.ts:11