|
|
@ -15,7 +15,11 @@ export const getModelSchemas = (ctx: { |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
...(ctx.columns?.reduce( |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
(colsObj, { title, virtual, column, ...fieldProps }) => ({ |
|
|
|
...colsObj, |
|
|
|
...colsObj, |
|
|
|
[title]: fieldProps, |
|
|
|
...(column.system |
|
|
|
|
|
|
|
? {} |
|
|
|
|
|
|
|
: { |
|
|
|
|
|
|
|
[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, |
|
|
|