q-koa 11.3.1 → 11.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,6 +126,13 @@ exports.initList = {
|
|
|
126
126
|
defaultValue: [],
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
exports.initTableList = {
|
|
130
|
+
type: Sequelize.JSON,
|
|
131
|
+
comment: '初始化table',
|
|
132
|
+
allowNull: false,
|
|
133
|
+
defaultValue: [],
|
|
134
|
+
}
|
|
135
|
+
|
|
129
136
|
exports.autoData = {
|
|
130
137
|
type: Sequelize.JSON,
|
|
131
138
|
comment: 'initData过滤数据',
|
|
@@ -89,6 +89,7 @@ exports.loadModel = async ({ app, appName }) => {
|
|
|
89
89
|
select: config.select,
|
|
90
90
|
excludes: config.excludes,
|
|
91
91
|
initList: config.initList,
|
|
92
|
+
initTableList: config.initTableList,
|
|
92
93
|
defaultOrder: config.defaultOrder,
|
|
93
94
|
excludeAuth: config.excludeAuth,
|
|
94
95
|
comment: config.comment,
|
|
@@ -175,6 +175,8 @@ exports.showTables = async (ctx) => {
|
|
|
175
175
|
autoData: lodash.get(target, 'autoData', null),
|
|
176
176
|
// 有些model需要前置查询其它model数据
|
|
177
177
|
initList: lodash.get(target, 'initList', []),
|
|
178
|
+
// 有些model的table需要前置查询模型
|
|
179
|
+
initTableList: lodash.get(target, 'initTableList', []),
|
|
178
180
|
// 局部更新列表
|
|
179
181
|
editInline: lodash.get(target, 'editInline', {}),
|
|
180
182
|
// 有些model需要前置查询其它model数据
|