Update seeds to take currency and link type into account
This commit is contained in:
@ -230,11 +230,12 @@ export const seedCompanyFieldMetadata = async (
|
|||||||
isCustom: false,
|
isCustom: false,
|
||||||
workspaceId: SeedWorkspaceId,
|
workspaceId: SeedWorkspaceId,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.NUMBER,
|
type: FieldMetadataType.CURRENCY,
|
||||||
name: 'annualRecurringRevenue',
|
name: 'annualRecurringRevenue',
|
||||||
label: 'ARR',
|
label: 'ARR',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'annualRecurringRevenue',
|
amountMicros: 'annualRecurringRevenueAmountMicros',
|
||||||
|
currencyCode: 'annualRecurringRevenueCurrencyCode',
|
||||||
},
|
},
|
||||||
description:
|
description:
|
||||||
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
||||||
|
|||||||
@ -112,11 +112,12 @@ export const seedOpportunityFieldMetadata = async (
|
|||||||
isCustom: false,
|
isCustom: false,
|
||||||
workspaceId: SeedWorkspaceId,
|
workspaceId: SeedWorkspaceId,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.NUMBER,
|
type: FieldMetadataType.CURRENCY,
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
label: 'Amount',
|
label: 'Amount',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'amount',
|
amountMicros: 'amountAmountMicros',
|
||||||
|
currencyCode: 'amountCurrencyCode',
|
||||||
},
|
},
|
||||||
description: 'Opportunity amount',
|
description: 'Opportunity amount',
|
||||||
icon: 'IconCurrencyDollar',
|
icon: 'IconCurrencyDollar',
|
||||||
|
|||||||
@ -174,11 +174,12 @@ export const seedPersonFieldMetadata = async (
|
|||||||
isCustom: false,
|
isCustom: false,
|
||||||
workspaceId: SeedWorkspaceId,
|
workspaceId: SeedWorkspaceId,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.TEXT,
|
type: FieldMetadataType.LINK,
|
||||||
name: 'linkedinUrl',
|
name: 'linkedinLink',
|
||||||
label: 'Linkedin',
|
label: 'Linkedin',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'linkedinUrl',
|
label: 'linkedinLinkLabel',
|
||||||
|
url: 'linkedinLinkUrl',
|
||||||
},
|
},
|
||||||
description: 'Contact’s Linkedin account',
|
description: 'Contact’s Linkedin account',
|
||||||
icon: 'IconBrandLinkedin',
|
icon: 'IconBrandLinkedin',
|
||||||
@ -192,11 +193,12 @@ export const seedPersonFieldMetadata = async (
|
|||||||
isCustom: false,
|
isCustom: false,
|
||||||
workspaceId: SeedWorkspaceId,
|
workspaceId: SeedWorkspaceId,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.TEXT,
|
type: FieldMetadataType.LINK,
|
||||||
name: 'xUrl',
|
name: 'xLink',
|
||||||
label: 'X',
|
label: 'X',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'xUrl',
|
label: 'xLinkLabel',
|
||||||
|
url: 'xLinkUrl',
|
||||||
},
|
},
|
||||||
description: 'Contact’s X/Twitter account',
|
description: 'Contact’s X/Twitter account',
|
||||||
icon: 'IconUser',
|
icon: 'IconUser',
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export const addCompanyTable: WorkspaceMigrationTableAction[] = [
|
|||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnName: 'linkedinLinklUrl',
|
columnName: 'linkedinLinkUrl',
|
||||||
columnType: 'varchar',
|
columnType: 'varchar',
|
||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
@ -53,8 +53,13 @@ export const addCompanyTable: WorkspaceMigrationTableAction[] = [
|
|||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnName: 'annualRecurringRevenue',
|
columnName: 'annualRecurringRevenueAmountMicros',
|
||||||
columnType: 'float',
|
columnType: 'integer',
|
||||||
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnName: 'annualRecurringRevenueCurrencyCode',
|
||||||
|
columnType: 'varchar',
|
||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,8 +13,13 @@ export const addOpportunityTable: WorkspaceMigrationTableAction[] = [
|
|||||||
action: 'alter',
|
action: 'alter',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
columnName: 'amount',
|
columnName: 'amountAmountMicros',
|
||||||
columnType: 'float',
|
columnType: 'integer',
|
||||||
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnName: 'amountCurrencyCode',
|
||||||
|
columnType: 'varchar',
|
||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,12 +28,22 @@ export const addPersonTable: WorkspaceMigrationTableAction[] = [
|
|||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnName: 'linkedinUrl',
|
columnName: 'linkedinLinkUrl',
|
||||||
columnType: 'varchar',
|
columnType: 'varchar',
|
||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnName: 'xUrl',
|
columnName: 'linkedinLinkLabel',
|
||||||
|
columnType: 'varchar',
|
||||||
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnName: 'xLinkUrl',
|
||||||
|
columnType: 'varchar',
|
||||||
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
columnName: 'xLinkLabel',
|
||||||
columnType: 'varchar',
|
columnType: 'varchar',
|
||||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -71,7 +71,8 @@ const companyMetadata = {
|
|||||||
name: 'linkedinLink',
|
name: 'linkedinLink',
|
||||||
label: 'Linkedin',
|
label: 'Linkedin',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'linkedinLink',
|
label: 'linkedinLinkLabel',
|
||||||
|
url: 'linkedinLinkUrl',
|
||||||
},
|
},
|
||||||
description: 'The company Linkedin account',
|
description: 'The company Linkedin account',
|
||||||
icon: 'IconBrandLinkedin',
|
icon: 'IconBrandLinkedin',
|
||||||
@ -84,7 +85,8 @@ const companyMetadata = {
|
|||||||
name: 'xLink',
|
name: 'xLink',
|
||||||
label: 'X',
|
label: 'X',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'xLink',
|
label: 'xLinkLabel',
|
||||||
|
url: 'xLinkUrl',
|
||||||
},
|
},
|
||||||
description: 'The company Twitter/X account',
|
description: 'The company Twitter/X account',
|
||||||
icon: 'IconBrandX',
|
icon: 'IconBrandX',
|
||||||
@ -93,11 +95,12 @@ const companyMetadata = {
|
|||||||
{
|
{
|
||||||
isCustom: false,
|
isCustom: false,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.NUMBER,
|
type: FieldMetadataType.CURRENCY,
|
||||||
name: 'annualRecurringRevenue',
|
name: 'annualRecurringRevenue',
|
||||||
label: 'ARR',
|
label: 'ARR',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'annualRecurringRevenue',
|
amountMicros: 'annualRecurringRevenueAmountMicros',
|
||||||
|
currencyCode: 'annualRecurringRevenueCurrencyCode',
|
||||||
},
|
},
|
||||||
description:
|
description:
|
||||||
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
||||||
|
|||||||
@ -14,11 +14,12 @@ const opportunityMetadata = {
|
|||||||
{
|
{
|
||||||
isCustom: false,
|
isCustom: false,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
type: FieldMetadataType.NUMBER,
|
type: FieldMetadataType.CURRENCY,
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
label: 'Amount',
|
label: 'Amount',
|
||||||
targetColumnMap: {
|
targetColumnMap: {
|
||||||
value: 'amount',
|
amountMicros: 'amountAmountMicros',
|
||||||
|
currencyCode: 'amountCurrencyCode',
|
||||||
},
|
},
|
||||||
description: 'Opportunity amount',
|
description: 'Opportunity amount',
|
||||||
icon: 'IconCurrencyDollar',
|
icon: 'IconCurrencyDollar',
|
||||||
|
|||||||
Reference in New Issue
Block a user