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;
} = ...
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[]
-
-
getOutputDir: () => string
-
setOutputDir: (dir: string) => void
-
listModels: () => string[]
-
removeModel: (modelName: string) => boolean
CLI object for chained usage: CLI.model('User', { ... })