Enrich view with all schema
This commit is contained in:
parent
3ab39fb44c
commit
dc9e1cbbc7
|
@ -193,8 +193,8 @@ export async function enrichSchema(
|
||||||
const isVisible = !!viewFieldSchema?.visible
|
const isVisible = !!viewFieldSchema?.visible
|
||||||
const isReadonly = !!viewFieldSchema?.readonly
|
const isReadonly = !!viewFieldSchema?.readonly
|
||||||
result[relTableFieldName] = {
|
result[relTableFieldName] = {
|
||||||
|
...relTableField,
|
||||||
...viewFieldSchema,
|
...viewFieldSchema,
|
||||||
type: relTableField.type,
|
|
||||||
name: relTableField.name,
|
name: relTableField.name,
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
readonly: isReadonly,
|
readonly: isReadonly,
|
||||||
|
|
|
@ -10,6 +10,11 @@ export enum AutoReason {
|
||||||
FOREIGN_KEY = "foreign_key",
|
FOREIGN_KEY = "foreign_key",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type FieldSubType =
|
||||||
|
| AutoFieldSubType
|
||||||
|
| JsonFieldSubType
|
||||||
|
| BBReferenceFieldSubType
|
||||||
|
|
||||||
export enum AutoFieldSubType {
|
export enum AutoFieldSubType {
|
||||||
CREATED_BY = "createdBy",
|
CREATED_BY = "createdBy",
|
||||||
CREATED_AT = "createdAt",
|
CREATED_AT = "createdAt",
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
import {
|
import { FieldSchema, RelationSchemaField, ViewV2 } from "../documents"
|
||||||
FieldSchema,
|
|
||||||
FieldType,
|
|
||||||
RelationSchemaField,
|
|
||||||
ViewV2,
|
|
||||||
} from "../documents"
|
|
||||||
|
|
||||||
export interface ViewV2Enriched extends ViewV2 {
|
export interface ViewV2Enriched extends ViewV2 {
|
||||||
schema?: {
|
schema?: {
|
||||||
|
@ -13,7 +8,4 @@ export interface ViewV2Enriched extends ViewV2 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ViewV2ColumnEnriched extends RelationSchemaField {
|
export type ViewV2ColumnEnriched = RelationSchemaField & FieldSchema
|
||||||
name: string
|
|
||||||
type: FieldType
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue