bcanfield/nexquik

Option to specify what operations to include for each model

Opened this issue · 1 comments

Currently, the create, edit, list, and show operations are being created by default for all specified models.

It would be nice to be able to fine tune this and specify which operations to include for each model.

It seems like eventually we will need to move to a config file, but for now I would like to keep strictly using args.

My initial thought is for this, we could do something like:

program
  .command('create <modelNames...>')
  .description('Create models')
  .action((modelNames) => {
    modelNames.forEach((modelName) => {
      program
        .command(`--model-${modelName} [operations...]`)
        .description(`Specify operations for ${modelName} (comma-separated)`)
        .action((operations) => {
          console.log(`Creating ${modelName} with operations:`, operations);
        });
    });
  });

npx nexquik --model-Model1 Create,List --model-Model2 Edit,Show

Sweet - I could be wrong but you're sort of heading in the direction of Rocket Admin (only better!) https://rocketadmin.com/