Files
twenty_crm/server/src/tenant/schema-builder/object-definitions/url.object-definition.ts
Jérémy M 6a700ad1a5 feat: schema-builder and resolver-builder can handle relations (#2398)
* feat: wip add relation

* feat: add relation for custom and standards objects

* fix: use enum instead of magic string

* fix: remove dead code & fix tests

* fix: typo

* fix: BooleanFilter is missing

* fix: Malformed result error
2023-11-10 12:32:02 +01:00

33 lines
875 B
TypeScript

import { ObjectMetadataInterface } from 'src/tenant/schema-builder/interfaces/object-metadata.interface';
import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';
export const urlObjectDefinition = {
id: FieldMetadataType.URL.toString(),
nameSingular: 'Url',
namePlural: 'Url',
labelSingular: 'Url',
labelPlural: 'Url',
targetTableName: 'url',
fields: [
{
id: 'text',
type: FieldMetadataType.TEXT,
objectId: FieldMetadataType.URL.toString(),
name: 'text',
label: 'Text',
targetColumnMap: { value: 'text' },
},
{
id: 'link',
type: FieldMetadataType.TEXT,
objectId: FieldMetadataType.URL.toString(),
name: 'link',
label: 'Link',
targetColumnMap: { value: 'link' },
},
],
fromRelations: [],
toRelations: [],
} as ObjectMetadataInterface;