prorm API Reference
    Preparing search index...

    Interface ModelStatic<T>

    Model static type with all required properties

    interface ModelStatic<T = any> {
        name: string;
        tableName?: string;
        schema?: string;
        primaryKeyAttribute?: string;
        uniqueKeys?: Record<string, string[]>;
        attributes: Record<string, any>;
        associations: Record<string, any>;
        options: ModelOptions;
        getTableName(): string;
        getAttributes(): string[];
        getPrimaryKeyAttribute(): string | undefined;
    }

    Type Parameters

    • T = any
    Index
    name: string

    Model name

    tableName?: string

    Table name

    schema?: string

    Schema (if applicable)

    primaryKeyAttribute?: string

    Primary key attribute name

    uniqueKeys?: Record<string, string[]>

    Unique attributes

    attributes: Record<string, any>

    Attributes definition

    associations: Record<string, any>

    Associations

    options: ModelOptions

    Options