* Wip * WIP * Removed concole log * Add relations to workspace init (#2511) * Add relations to workspace init * remove logs * update prefill * add missing isSystem * comment relation fields * Migrate v2 core models to graphql schema (#2509) * migrate v2 core models to graphql schema * Migrate to new workspace member schema * Continue work * migrated-main * Finished accountOwner nested field integration on companies * Introduce bug * Fix --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com> Co-authored-by: Weiko <corentin@twenty.com>
202 lines
4.4 KiB
TypeScript
202 lines
4.4 KiB
TypeScript
const personMetadata = {
|
||
nameSingular: 'personV2',
|
||
namePlural: 'peopleV2',
|
||
labelSingular: 'Person',
|
||
labelPlural: 'People',
|
||
targetTableName: 'person',
|
||
description: 'A person',
|
||
icon: 'IconUser',
|
||
isActive: true,
|
||
isSystem: false,
|
||
fields: [
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'firstName',
|
||
label: 'First name',
|
||
targetColumnMap: {
|
||
value: 'firstName',
|
||
},
|
||
description: 'Contact’s first name',
|
||
icon: 'IconUser',
|
||
isNullable: false,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'lastName',
|
||
label: 'Last name',
|
||
targetColumnMap: {
|
||
value: 'lastName',
|
||
},
|
||
description: 'Contact’s last name',
|
||
icon: 'IconUser',
|
||
isNullable: false,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'EMAIL',
|
||
name: 'email',
|
||
label: 'Email',
|
||
targetColumnMap: {
|
||
value: 'email',
|
||
},
|
||
description: 'Contact’s Email',
|
||
icon: 'IconMail',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'URL',
|
||
name: 'linkedinUrl',
|
||
label: 'Linkedin',
|
||
targetColumnMap: {
|
||
value: 'linkedinUrl',
|
||
},
|
||
description: 'Contact’s Linkedin account',
|
||
icon: 'IconBrandLinkedin',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'URL',
|
||
name: 'xUrl',
|
||
label: 'X',
|
||
targetColumnMap: {
|
||
value: 'xUrl',
|
||
},
|
||
description: 'Contact’s X/Twitter account',
|
||
icon: 'IconUser',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'jobTitle',
|
||
label: 'Job Title',
|
||
targetColumnMap: {
|
||
value: 'jobTitle',
|
||
},
|
||
description: 'Contact’s job title',
|
||
icon: 'IconBriefcase',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'phone',
|
||
label: 'Phone',
|
||
targetColumnMap: {
|
||
value: 'phone',
|
||
},
|
||
description: 'Contact’s phone number',
|
||
icon: 'IconPhone',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'city',
|
||
label: 'City',
|
||
targetColumnMap: {
|
||
value: 'city',
|
||
},
|
||
description: 'Contact’s city',
|
||
icon: 'IconMap',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'TEXT',
|
||
name: 'avatarUrl',
|
||
label: 'Avatar',
|
||
targetColumnMap: {
|
||
value: 'avatarUrl',
|
||
},
|
||
description: 'Contact’s avatar',
|
||
icon: 'IconFileUpload',
|
||
isNullable: false,
|
||
},
|
||
// Relations
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'company',
|
||
label: 'Company',
|
||
targetColumnMap: {
|
||
value: 'companyId',
|
||
},
|
||
description: 'Contact’s company',
|
||
icon: 'IconBuildingSkyscraper',
|
||
isNullable: false,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'pointOfContactForOpportunities',
|
||
label: 'POC for Opportunities',
|
||
targetColumnMap: {},
|
||
description: 'Point of Contact for Opportunities',
|
||
icon: 'IconArrowTarget',
|
||
isNullable: false,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'activityTargets',
|
||
label: 'Activities',
|
||
targetColumnMap: {},
|
||
description: 'Activities tied to the contact',
|
||
icon: 'IconCheckbox',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'opportunities',
|
||
label: 'Opportunities',
|
||
targetColumnMap: {},
|
||
description: 'Opportunities linked to the contact.',
|
||
icon: 'IconTargetArrow',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'favorites',
|
||
label: 'Favorites',
|
||
targetColumnMap: {},
|
||
description: 'Favorites linked to the contact',
|
||
icon: 'IconHeart',
|
||
isNullable: true,
|
||
},
|
||
{
|
||
isCustom: false,
|
||
isActive: true,
|
||
type: 'RELATION',
|
||
name: 'attachments',
|
||
label: 'Attachments',
|
||
targetColumnMap: {},
|
||
description: 'Attachments linked to the contact.',
|
||
icon: 'IconFileImport',
|
||
isNullable: true,
|
||
},
|
||
],
|
||
};
|
||
|
||
export default personMetadata;
|