prorm API Reference
    Preparing search index...

    Variable CLIConst

    CLI: {
        model: (
            modelName: string,
            fields: Record<string, string>,
            options?: {
                tableName?: string;
                timestamps?: boolean;
                paranoid?: boolean;
                primaryKey?: boolean;
                autoIncrement?: boolean;
                allowNull?: boolean;
                unique?: boolean;
                defaultValue?: any;
            },
        ) => string;
        generateModels: (
            definitions: Record<string, Record<string, string>>,
        ) => string[];
        configure: (options: Partial<ModelCLIConfig>) => void;
        getOutputDir: () => string;
        setOutputDir: (dir: string) => void;
        listModels: () => string[];
        removeModel: (modelName: string) => boolean;
    } = ...

    CLI object for chained usage: CLI.model('User', { ... })

    Type Declaration

    • model: (
          modelName: string,
          fields: Record<string, string>,
          options?: {
              tableName?: string;
              timestamps?: boolean;
              paranoid?: boolean;
              primaryKey?: boolean;
              autoIncrement?: boolean;
              allowNull?: boolean;
              unique?: boolean;
              defaultValue?: any;
          },
      ) => string
    • generateModels: (definitions: Record<string, Record<string, string>>) => string[]
    • configure: (options: Partial<ModelCLIConfig>) => void
    • getOutputDir: () => string
    • setOutputDir: (dir: string) => void
    • listModels: () => string[]
    • removeModel: (modelName: string) => boolean