|
|
@ -15,8 +15,12 @@ export const getModelSchemas = (ctx: { |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
...colsObj, |
|
|
|
...colsObj, |
|
|
|
|
|
|
|
...(column.system |
|
|
|
|
|
|
|
? {} |
|
|
|
|
|
|
|
: { |
|
|
|
[title]: fieldProps, |
|
|
|
[title]: fieldProps, |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
}), |
|
|
|
{}, |
|
|
|
{}, |
|
|
|
) || {}), |
|
|
|
) || {}), |
|
|
|
}, |
|
|
|
}, |
|
|
@ -30,7 +34,7 @@ export const getModelSchemas = (ctx: { |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
...colsObj, |
|
|
|
...colsObj, |
|
|
|
...(virtual |
|
|
|
...(virtual || column.system |
|
|
|
? {} |
|
|
|
? {} |
|
|
|
: { |
|
|
|
: { |
|
|
|
[title]: fieldProps, |
|
|
|
[title]: fieldProps, |
|
|
|