213 lines
5.3 KiB
TypeScript
213 lines
5.3 KiB
TypeScript
import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';
|
|
|
|
const companyMetadata = {
|
|
nameSingular: 'company',
|
|
namePlural: 'companies',
|
|
labelSingular: 'Company',
|
|
labelPlural: 'Companies',
|
|
targetTableName: 'company',
|
|
description: 'A company',
|
|
icon: 'IconBuildingSkyscraper',
|
|
isActive: true,
|
|
isSystem: false,
|
|
fields: [
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.TEXT,
|
|
name: 'name',
|
|
label: 'Name',
|
|
targetColumnMap: {
|
|
value: 'name',
|
|
},
|
|
description: 'The company name',
|
|
icon: 'IconBuildingSkyscraper',
|
|
isNullable: false,
|
|
defaultValue: { value: '' },
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.TEXT,
|
|
name: 'domainName',
|
|
label: 'Domain Name',
|
|
targetColumnMap: {
|
|
value: 'domainName',
|
|
},
|
|
description:
|
|
'The company website URL. We use this url to fetch the company icon',
|
|
icon: 'IconLink',
|
|
isNullable: true,
|
|
defaultValue: { value: '' },
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.TEXT,
|
|
name: 'address',
|
|
label: 'Address',
|
|
targetColumnMap: {
|
|
value: 'address',
|
|
},
|
|
description: 'The company address',
|
|
icon: 'IconMap',
|
|
isNullable: true,
|
|
defaultValue: { value: '' },
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.NUMBER,
|
|
name: 'employees',
|
|
label: 'Employees',
|
|
targetColumnMap: {
|
|
value: 'employees',
|
|
},
|
|
description: 'Number of employees in the company',
|
|
icon: 'IconUsers',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.LINK,
|
|
name: 'linkedinLink',
|
|
label: 'Linkedin',
|
|
targetColumnMap: {
|
|
label: 'linkedinLinkLabel',
|
|
url: 'linkedinLinkUrl',
|
|
},
|
|
description: 'The company Linkedin account',
|
|
icon: 'IconBrandLinkedin',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.LINK,
|
|
name: 'xLink',
|
|
label: 'X',
|
|
targetColumnMap: {
|
|
label: 'xLinkLabel',
|
|
url: 'xLinkUrl',
|
|
},
|
|
description: 'The company Twitter/X account',
|
|
icon: 'IconBrandX',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.CURRENCY,
|
|
name: 'annualRecurringRevenue',
|
|
label: 'ARR',
|
|
targetColumnMap: {
|
|
amountMicros: 'annualRecurringRevenueAmountMicros',
|
|
currencyCode: 'annualRecurringRevenueCurrencyCode',
|
|
},
|
|
description:
|
|
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
|
icon: 'IconMoneybag',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.BOOLEAN,
|
|
name: 'idealCustomerProfile',
|
|
label: 'ICP',
|
|
targetColumnMap: {
|
|
value: 'idealCustomerProfile',
|
|
},
|
|
description:
|
|
'Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you',
|
|
icon: 'IconTarget',
|
|
isNullable: true,
|
|
},
|
|
// Relations
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'people',
|
|
label: 'People',
|
|
targetColumnMap: {},
|
|
description: 'People linked to the company.',
|
|
icon: 'IconUsers',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'accountOwner',
|
|
label: 'Account Owner',
|
|
targetColumnMap: {
|
|
value: 'accountOwnerId',
|
|
},
|
|
description:
|
|
'Your team member responsible for managing the company account',
|
|
icon: 'IconUserCircle',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.UUID,
|
|
name: 'accountOwnerId',
|
|
label: 'Account Owner ID (foreign key)',
|
|
targetColumnMap: {},
|
|
description: 'Foreign key for account owner',
|
|
icon: undefined,
|
|
isNullable: true,
|
|
isSystem: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'activityTargets',
|
|
label: 'Activities',
|
|
targetColumnMap: {},
|
|
description: 'Activities tied to the company',
|
|
icon: 'IconCheckbox',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'opportunities',
|
|
label: 'Opportunities',
|
|
targetColumnMap: {},
|
|
description: 'Opportunities linked to the company.',
|
|
icon: 'IconTargetArrow',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'favorites',
|
|
label: 'Favorites',
|
|
targetColumnMap: {},
|
|
description: 'Favorites linked to the company',
|
|
icon: 'IconHeart',
|
|
isNullable: true,
|
|
},
|
|
{
|
|
isCustom: false,
|
|
isActive: true,
|
|
type: FieldMetadataType.RELATION,
|
|
name: 'attachments',
|
|
label: 'Attachments',
|
|
targetColumnMap: {},
|
|
description: 'Attachments linked to the company.',
|
|
icon: 'IconFileImport',
|
|
isNullable: true,
|
|
},
|
|
],
|
|
};
|
|
|
|
export default companyMetadata;
|