1
0
Fork 0
mirror of synced 2024-10-03 10:36:59 +13:00

Some missed conversions.

This commit is contained in:
mike12345567 2024-01-24 17:09:26 +00:00
parent ccc751d09c
commit 57d512b041
2 changed files with 9 additions and 9 deletions

View file

@ -8,7 +8,7 @@ export enum AutoReason {
FOREIGN_KEY = "foreign_key", FOREIGN_KEY = "foreign_key",
} }
export enum AutoFieldSubTypes { export enum AutoFieldSubType {
CREATED_BY = "createdBy", CREATED_BY = "createdBy",
CREATED_AT = "createdAt", CREATED_AT = "createdAt",
UPDATED_BY = "updatedBy", UPDATED_BY = "updatedBy",
@ -16,7 +16,7 @@ export enum AutoFieldSubTypes {
AUTO_ID = "autoID", AUTO_ID = "autoID",
} }
export enum FormulaTypes { export enum FormulaType {
STATIC = "static", STATIC = "static",
DYNAMIC = "dynamic", DYNAMIC = "dynamic",
} }

View file

@ -2,9 +2,9 @@
// column size, position and whether it can be viewed // column size, position and whether it can be viewed
import { FieldSubtype, FieldType } from "../row" import { FieldSubtype, FieldType } from "../row"
import { import {
AutoFieldSubTypes, AutoFieldSubType,
AutoReason, AutoReason,
FormulaTypes, FormulaType,
RelationshipType, RelationshipType,
} from "./constants" } from "./constants"
@ -22,7 +22,7 @@ interface BaseRelationshipFieldMetadata
fieldName: string fieldName: string
tableId: string tableId: string
tableRev?: string tableRev?: string
subtype?: AutoFieldSubTypes.CREATED_BY | AutoFieldSubTypes.UPDATED_BY subtype?: AutoFieldSubType.CREATED_BY | AutoFieldSubType.UPDATED_BY
} }
// External tables use junction tables, internal tables don't require them // External tables use junction tables, internal tables don't require them
@ -62,7 +62,7 @@ export interface AutoColumnFieldMetadata
extends Omit<BaseFieldSchema, "subtype"> { extends Omit<BaseFieldSchema, "subtype"> {
type: FieldType.AUTO type: FieldType.AUTO
autocolumn: true autocolumn: true
subtype?: AutoFieldSubTypes subtype?: AutoFieldSubType
lastID?: number lastID?: number
// if the column was turned to an auto-column for SQL, explains why (primary, foreign etc) // if the column was turned to an auto-column for SQL, explains why (primary, foreign etc)
autoReason?: AutoReason autoReason?: AutoReason
@ -70,7 +70,7 @@ export interface AutoColumnFieldMetadata
export interface NumberFieldMetadata extends Omit<BaseFieldSchema, "subtype"> { export interface NumberFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
type: FieldType.NUMBER type: FieldType.NUMBER
subtype?: AutoFieldSubTypes.AUTO_ID subtype?: AutoFieldSubType.AUTO_ID
lastID?: number lastID?: number
autoReason?: AutoReason.FOREIGN_KEY autoReason?: AutoReason.FOREIGN_KEY
// used specifically when Budibase generates external tables, this denotes if a number field // used specifically when Budibase generates external tables, this denotes if a number field
@ -85,7 +85,7 @@ export interface DateFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
type: FieldType.DATETIME type: FieldType.DATETIME
ignoreTimezones?: boolean ignoreTimezones?: boolean
timeOnly?: boolean timeOnly?: boolean
subtype?: AutoFieldSubTypes.CREATED_AT | AutoFieldSubTypes.UPDATED_AT subtype?: AutoFieldSubType.CREATED_AT | AutoFieldSubType.UPDATED_AT
} }
export interface LongFormFieldMetadata extends BaseFieldSchema { export interface LongFormFieldMetadata extends BaseFieldSchema {
@ -96,7 +96,7 @@ export interface LongFormFieldMetadata extends BaseFieldSchema {
export interface FormulaFieldMetadata extends BaseFieldSchema { export interface FormulaFieldMetadata extends BaseFieldSchema {
type: FieldType.FORMULA type: FieldType.FORMULA
formula: string formula: string
formulaType?: FormulaTypes formulaType?: FormulaType
} }
export interface BBReferenceFieldMetadata export interface BBReferenceFieldMetadata