-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
cliAnything that is related to command line such as inputs and argumentsAnything that is related to command line such as inputs and arguments
Description
To add Keys users have to input the number of keys he wants in the schema and then give detail of each key
$ msc
? Please input Schema name user
? How many key this Schema has? 1
? Please input Schema Key name username
? Please input Schema Key type String
? Is this Schema Key Required Yes
? What is the default value? Arsalan
There should be an argument --oneline which will add all the schema's key in just one line.
$ msc --online
? Please input Schema name user
? Please add all the key's name: firstname lastname username email
Which will generate the following schema Object
const userSchema = new Schema({
firstname: {
type: String,
required: true,
default: "",
},
lastname: {
type: String,
required: true,
default: "",
},
username: {
type: String,
required: true,
default: "",
},
email: {
type: String,
required: true,
default: "",
},
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
});
This will not ask for any details but key's name only. User can then change the schemas from file manually.
Metadata
Metadata
Assignees
Labels
cliAnything that is related to command line such as inputs and argumentsAnything that is related to command line such as inputs and arguments