UNPKG

@adonisjs/lucid

Version:

SQL ORM built on top of Active Record pattern

53 lines (52 loc) 1.22 kB
import { BaseCommand } from '@adonisjs/core/ace'; import { type CommandOptions } from '@adonisjs/core/types/ace'; export default class MakeModel extends BaseCommand { static commandName: string; static description: string; static options: CommandOptions; /** * The name of the model file. */ name: string; /** * Defines if we generate the migration for the model. */ migration: boolean; /** * Defines if we generate the controller for the model. */ controller: boolean; /** * Defines if we generate the transformer for the model. */ transformer: boolean; /** * Defines if we generate the factory for the model. */ factory: boolean; /** * Read the contents from this file (if the flag exists) and use * it as the raw contents */ contentsFrom: string; /** * Run migrations */ private runMakeMigration; /** * Make controller */ private runMakeController; /** * Make transformer */ private runMakeTransformer; /** * Make factory */ private runMakeFactory; /** * Execute command */ run(): Promise<void>; }