Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to specify what operations to include for each model #72

Open
bcanfield opened this issue Aug 21, 2023 · 1 comment
Open

Option to specify what operations to include for each model #72

bcanfield opened this issue Aug 21, 2023 · 1 comment
Labels
New feature New features to be created

Comments

@bcanfield
Copy link
Owner

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

@bcanfield bcanfield added the New feature New features to be created label Aug 21, 2023
@saashqdev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature New features to be created
Projects
None yet
Development

No branches or pull requests

2 participants