prorm API Reference
    Preparing search index...

    Interface ModelDiagramOptions

    interface ModelDiagramOptions {
        name: string;
        tableName?: string;
        fields: Record<string, FieldDefinition>;
        associations?: AssociationDefinition[];
        timestamps?: boolean;
        paranoid?: boolean;
        underscored?: boolean;
        comment?: string;
        theme?: "light" | "dark";
        color?: string;
    }
    Index
    name: string

    Model class name, e.g. "User"

    tableName?: string

    Override database table name

    fields: Record<string, FieldDefinition>

    Map of column-name to field definition

    associations?: AssociationDefinition[]
    timestamps?: boolean
    paranoid?: boolean
    underscored?: boolean
    comment?: string
    theme?: "light" | "dark"

    Accepted for backward compatibility and ignored: diagrams render in a single monochrome theme.

    color?: string

    Accepted for backward compatibility and ignored.