Version: 4.3

Interface: PrimaryKeyOptions<T>

Type parameters

Name
T

Hierarchy

  • { columnType?: string ; comment?: string ; customType?: Type<any> ; default?: string | string[] | number | number[] | boolean | null ; defaultRaw?: string ; fieldName?: string ; fieldNames?: string[] ; formula?: string | (alias: string) => string ; hidden?: boolean ; index?: boolean | string ; lazy?: boolean ; length?: number ; name?: string ; nullable?: boolean ; onCreate?: (entity: T) => any ; onUpdate?: (entity: T) => any ; persist?: boolean ; primary?: boolean ; serializedName?: string ; serializedPrimaryKey?: boolean ; serializer?: (value: any) => any ; type?: "string" | "number" | "boolean" | "bigint" | "ObjectId" | string | unknown | bigint | Date | Constructor<Type<any>> | Type<any> ; unique?: boolean | string ; unsigned?: boolean ; version?: boolean }

    PrimaryKeyOptions

Properties

columnType

Optional columnType: string

Inherited from __type.columnType

Defined in packages/core/src/decorators/Property.ts:42


comment

Optional comment: string

Inherited from __type.comment

Defined in packages/core/src/decorators/Property.ts:62


customType

Optional customType: Type<any>

Inherited from __type.customType

Defined in packages/core/src/decorators/Property.ts:41


default

Optional default: string | string[] | number | number[] | boolean | null

Inherited from __type.default

Defined in packages/core/src/decorators/Property.ts:47


defaultRaw

Optional defaultRaw: string

Inherited from __type.defaultRaw

Defined in packages/core/src/decorators/Property.ts:48


fieldName

Optional fieldName: string

Inherited from __type.fieldName

Defined in packages/core/src/decorators/Property.ts:39


fieldNames

Optional fieldNames: string[]

Inherited from __type.fieldNames

Defined in packages/core/src/decorators/Property.ts:40


formula

Optional formula: string | (alias: string) => string

Inherited from __type.formula

Defined in packages/core/src/decorators/Property.ts:49


hidden

Optional hidden: boolean

Inherited from __type.hidden

Defined in packages/core/src/decorators/Property.ts:53


index

Optional index: boolean | string

Inherited from __type.index

Defined in packages/core/src/decorators/Property.ts:55


lazy

Optional lazy: boolean

Inherited from __type.lazy

Defined in packages/core/src/decorators/Property.ts:57


length

Optional length: number

Inherited from __type.length

Defined in packages/core/src/decorators/Property.ts:44


name

Optional name: string

Inherited from __type.name

Defined in packages/core/src/decorators/Property.ts:38


nullable

Optional nullable: boolean

Inherited from __type.nullable

Defined in packages/core/src/decorators/Property.ts:50


onCreate

Optional onCreate: (entity: T) => any

Inherited from __type.onCreate

Defined in packages/core/src/decorators/Property.ts:45


onUpdate

Optional onUpdate: (entity: T) => any

Inherited from __type.onUpdate

Defined in packages/core/src/decorators/Property.ts:46


persist

Optional persist: boolean

Inherited from __type.persist

Defined in packages/core/src/decorators/Property.ts:52


primary

Optional primary: boolean

Inherited from __type.primary

Defined in packages/core/src/decorators/Property.ts:58


serializedName

Optional serializedName: string

Inherited from __type.serializedName

Defined in packages/core/src/decorators/Property.ts:61


serializedPrimaryKey

Optional serializedPrimaryKey: boolean

Inherited from __type.serializedPrimaryKey

Defined in packages/core/src/decorators/Property.ts:59


serializer

Optional serializer: (value: any) => any

Inherited from __type.serializer

Defined in packages/core/src/decorators/Property.ts:60


type

Optional type: "string" | "number" | "boolean" | "bigint" | "ObjectId" | string | unknown | bigint | Date | Constructor<Type<any>> | Type<any>

Inherited from __type.type

Defined in packages/core/src/decorators/Property.ts:43


unique

Optional unique: boolean | string

Inherited from __type.unique

Defined in packages/core/src/decorators/Property.ts:56


unsigned

Optional unsigned: boolean

Inherited from __type.unsigned

Defined in packages/core/src/decorators/Property.ts:51


version

Optional version: boolean

Inherited from __type.version

Defined in packages/core/src/decorators/Property.ts:54

Last updated on by Martin Adámek