Skip to content

Commit

Permalink
增加表的元数据;
Browse files Browse the repository at this point in the history
  • Loading branch information
dingrui committed Jul 24, 2018
1 parent 112a2b6 commit 96bd68b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const chalk = require('chalk')
const getTableInfo = require('./getTableInfo')
const param = require('../config/param')
const fs = require('fs-extra')
const camelCase = require('camel-case')

module.exports = (metadata) => {
initCrud()
Expand All @@ -16,6 +17,7 @@ module.exports = (metadata) => {
table: {
columns: tableInfo.columns,
primaryKey: tableInfo.primaryKey,
camelCasedPrimaryKey: camelCase(tableInfo.camelCasedPrimaryKey),
name: metadata.tableName
},
ModelName: metadata.modelName,
Expand Down
1 change: 0 additions & 1 deletion lib/getTableInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module.exports = async (tableName) => {
let tableInfo = {
columns: columnNames,
primaryKey: primaryKey,
camelCasedPrimaryKey: camelCase(primaryKey),
name: tableName
}
return tableInfo
Expand Down

0 comments on commit 96bd68b

Please sign in to comment.