Removing repeated constant.

This commit is contained in:
mike12345567 2021-02-16 10:07:15 +00:00
parent 3a106c937c
commit fd76369467
1 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,5 @@
import { TableNames } from "../index"
export const FIELDS = { export const FIELDS = {
STRING: { STRING: {
name: "Text", name: "Text",
@ -117,8 +119,6 @@ export const Roles = {
BUILDER: "BUILDER", BUILDER: "BUILDER",
} }
export const USER_TABLE_ID = "ta_users"
export function isAutoColumnUserRelationship(subtype) { export function isAutoColumnUserRelationship(subtype) {
return ( return (
subtype === AUTO_COLUMN_SUB_TYPES.CREATED_BY || subtype === AUTO_COLUMN_SUB_TYPES.CREATED_BY ||
@ -163,7 +163,7 @@ export function buildAutoColumn(tableName, name, subtype) {
constraints, constraints,
} }
if (isAutoColumnUserRelationship(subtype)) { if (isAutoColumnUserRelationship(subtype)) {
base.tableId = USER_TABLE_ID base.tableId = TableNames.USERS
base.fieldName = `${tableName}-${name}` base.fieldName = `${tableName}-${name}`
} }
return base return base