q-koa 11.3.0 → 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过滤数据',
|
|
@@ -168,6 +175,13 @@ exports.modelUpsert = {
|
|
|
168
175
|
defaultValue: {},
|
|
169
176
|
}
|
|
170
177
|
|
|
178
|
+
exports.modelDelete = {
|
|
179
|
+
type: Sequelize.JSON,
|
|
180
|
+
comment: '删除编辑值',
|
|
181
|
+
allowNull: false,
|
|
182
|
+
defaultValue: {},
|
|
183
|
+
}
|
|
184
|
+
|
|
171
185
|
exports.editInline = {
|
|
172
186
|
type: Sequelize.JSON,
|
|
173
187
|
comment: '局部更新',
|
|
@@ -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,
|
|
@@ -102,6 +103,7 @@ exports.loadModel = async ({ app, appName }) => {
|
|
|
102
103
|
show_virtual: config.show_virtual,
|
|
103
104
|
modelQuery: config.modelQuery,
|
|
104
105
|
modelUpsert: config.modelUpsert,
|
|
106
|
+
modelDelete: config.modelDelete,
|
|
105
107
|
editInline: config.editInline,
|
|
106
108
|
deleteCheckList: config.deleteCheckList,
|
|
107
109
|
bulkCreateList: config.bulkCreateList,
|
|
@@ -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数据
|
|
@@ -183,6 +185,8 @@ exports.showTables = async (ctx) => {
|
|
|
183
185
|
modelQuery: lodash.get(target, 'modelQuery', {}),
|
|
184
186
|
// 插入字段,覆盖之前
|
|
185
187
|
modelUpsert: lodash.get(target, 'modelUpsert', {}),
|
|
188
|
+
// 编辑软删除
|
|
189
|
+
modelDelete: lodash.get(target, 'modelDelete', {}),
|
|
186
190
|
// 删除时检查是不是含有
|
|
187
191
|
deleteCheckList: lodash.get(target, 'deleteCheckList', []),
|
|
188
192
|
// 批量更新字段
|