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 isReadonly = !!viewFieldSchema?.readonly
|
||||
result[relTableFieldName] = {
|
||||
...relTableField,
|
||||
...viewFieldSchema,
|
||||
type: relTableField.type,
|
||||
name: relTableField.name,
|
||||
visible: isVisible,
|
||||
readonly: isReadonly,
|
||||
|
|
|
@ -10,6 +10,11 @@ export enum AutoReason {
|
|||
FOREIGN_KEY = "foreign_key",
|
||||
}
|
||||
|
||||
export type FieldSubType =
|
||||
| AutoFieldSubType
|
||||
| JsonFieldSubType
|
||||
| BBReferenceFieldSubType
|
||||
|
||||
export enum AutoFieldSubType {
|
||||
CREATED_BY = "createdBy",
|
||||
CREATED_AT = "createdAt",
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
FieldSchema,
|
||||
FieldType,
|
||||
RelationSchemaField,
|
||||
ViewV2,
|
||||
} from "../documents"
|
||||
import { FieldSchema, RelationSchemaField, ViewV2 } from "../documents"
|
||||
|
||||
export interface ViewV2Enriched extends ViewV2 {
|
||||
schema?: {
|
||||
|
@ -13,7 +8,4 @@ export interface ViewV2Enriched extends ViewV2 {
|
|||
}
|
||||
}
|
||||
|
||||
export interface ViewV2ColumnEnriched extends RelationSchemaField {
|
||||
name: string
|
||||
type: FieldType
|
||||
}
|
||||
export type ViewV2ColumnEnriched = RelationSchemaField & FieldSchema
|
||||
|
|
Loading…
Reference in New Issue