Skip to content

Commit 739723c

Browse files
committed
feat: Select model property type from Scaffold.ModelTypes list
1 parent ef9de61 commit 739723c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/actions/add-model/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,21 @@ async function gatherModelProperties () {
7070
} // gatherModelProperties
7171

7272
async function * gatherModelProperty () {
73+
console.log(c.bold('Model properties:'))
7374
while (true) {
7475
let propertyDetails = {}
7576

7677
const questions = [
7778
{
7879
type: 'input',
7980
name: 'key',
80-
message: 'Property name'
81+
message: 'Property name (hit Enter to quit)'
8182
},
8283
{
83-
type: 'input',
84+
type: 'select',
8485
name: 'typeHint',
85-
message: 'Property type'
86+
message: 'Property type',
87+
choices: Scaffold.ModelTypes()
8688
},
8789
{
8890
type: 'confirm',

0 commit comments

Comments
 (0)