From b523edaf98395f9ceaf6caa4f0cdac5ba2c57601 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 4 Mar 2023 17:26:26 +0800 Subject: [PATCH] refactor(nocodb): remove unused properties and update types in FormViewColumn --- .../nocodb/src/lib/models/FormViewColumn.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/nocodb/src/lib/models/FormViewColumn.ts b/packages/nocodb/src/lib/models/FormViewColumn.ts index 577d5ad5ca..26f73f6dbe 100644 --- a/packages/nocodb/src/lib/models/FormViewColumn.ts +++ b/packages/nocodb/src/lib/models/FormViewColumn.ts @@ -1,6 +1,11 @@ import Noco from '../Noco'; import { CacheGetType, CacheScope, MetaTable } from '../utils/globals'; -import { FormColumnType } from 'nocodb-sdk'; +import { + BoolType, + FormColumnType, + MetaType, + StringOrNullType, +} from 'nocodb-sdk'; import { deserializeJSON, serializeJSON } from '../utils/serialize'; import View from './View'; import NocoCache from '../cache/NocoCache'; @@ -8,25 +13,23 @@ import { extractProps } from '../meta/helpers/extractProps'; export default class FormViewColumn implements FormColumnType { id?: string; - label?: string; - help?: string; - description?: string; - required?: boolean; - show?: boolean; - order?: number; - fk_view_id?: string; fk_column_id?: string; project_id?: string; base_id?: string; - meta?: string | Record; + label?: StringOrNullType; + help?: StringOrNullType; + description?: StringOrNullType; + required?: BoolType; + uuid?: StringOrNullType; + show?: BoolType; + order?: number; + meta?: MetaType; constructor(data: FormViewColumn) { Object.assign(this, data); } - uuid?: any; - public static async get(formViewColumnId: string, ncMeta = Noco.ncMeta) { let viewColumn = formViewColumnId && @@ -187,7 +190,4 @@ export default class FormViewColumn implements FormColumnType { columnId ); } - - created_at?: string; - updated_at?: string; }