API 参考
    正在准备搜索索引...

    类 EntitySchemaOptions<T>

    Interface for entity metadata mappings stored inside "schemas" instead of models decorated by decorators.

    类型参数

    • T
    索引

    构造函数

    属性

    checks?: EntitySchemaCheckOptions[]

    Entity check options.

    columns: { [P in string | number | symbol]?: EntitySchemaColumnOptions }

    Entity column's options.

    database?: string

    Database name. Used in MySql and Sql Server.

    discriminatorValue?: string

    Custom discriminator value for Single Table Inheritance.

    embeddeds?: {
        [P in string | number | symbol]: EntitySchemaEmbeddedColumnOptions
    }

    Embedded Entities options

    exclusions?: EntitySchemaExclusionOptions[]

    Entity exclusion options.

    expression?: string | ((connection: DataSource) => SelectQueryBuilder<any>)

    View expression.

    Entity indices options.

    inheritance?: EntitySchemaInheritanceOptions

    Inheritance options.

    name: string

    Entity name.

    Specifies a property name by which queries will perform ordering by default when fetching rows.

    relationIds?: {
        [P in string | number | symbol]?: EntitySchemaRelationIdOptions
    }

    Entity relation id options.

    relations?: { [P in string | number | symbol]?: EntitySchemaRelationOptions }

    Entity relation's options.

    schema?: string

    Schema name. Used in Postgres and Sql Server.

    synchronize?: boolean

    Indicates if schema synchronization is enabled or disabled for this entity. If it will be set to false then schema sync will and migrations ignore this entity. By default schema synchronization is enabled for all entities.

    tableName?: string

    Table name.

    target?: Function

    Target bind to this entity schema. Optional.

    type?: TableType

    Table type.

    uniques?: EntitySchemaUniqueOptions[]

    Entity uniques options.

    withoutRowid?: boolean

    If set to 'true' this option disables Sqlite's default behaviour of secretly creating an integer primary key column named 'rowid' on table creation.