Skip to content

Commit 99be0c6

Browse files
committed
Add missing premium data points for organizations
1 parent 6cb2ed6 commit 99be0c6

File tree

3 files changed

+117
-2
lines changed

3 files changed

+117
-2
lines changed

backend/src/database/models/organization.ts

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default (sequelize) => {
7979
employees: {
8080
type: DataTypes.INTEGER,
8181
allowNull: true,
82+
comment: 'total employee count of the company',
8283
},
8384
revenueRange: {
8485
type: DataTypes.JSONB,
@@ -131,7 +132,7 @@ export default (sequelize) => {
131132
type: {
132133
type: DataTypes.TEXT,
133134
allowNull: true,
134-
comment: "The comnapny's type. For example NGO",
135+
comment: "The company's type. For example NGO",
135136
},
136137
employeeCountByCountry: {
137138
type: DataTypes.JSONB,
@@ -154,6 +155,82 @@ export default (sequelize) => {
154155
type: DataTypes.JSONB,
155156
defaultValue: {},
156157
},
158+
affiliatedProfiles: {
159+
type: DataTypes.ARRAY(DataTypes.TEXT),
160+
allowNull: true,
161+
},
162+
allSubsidiaries: {
163+
type: DataTypes.ARRAY(DataTypes.TEXT),
164+
allowNull: true,
165+
},
166+
alternativeDomains: {
167+
type: DataTypes.ARRAY(DataTypes.TEXT),
168+
allowNull: true,
169+
},
170+
alternativeNames: {
171+
type: DataTypes.ARRAY(DataTypes.TEXT),
172+
allowNull: true,
173+
},
174+
averageEmployeeTenure: {
175+
type: DataTypes.INTEGER,
176+
allowNull: true,
177+
},
178+
averageTenureByLevel: {
179+
type: DataTypes.JSONB,
180+
allowNull: true,
181+
},
182+
averageTenureByRole: {
183+
type: DataTypes.JSONB,
184+
allowNull: true,
185+
},
186+
directSubsidiaries: {
187+
type: DataTypes.ARRAY(DataTypes.TEXT),
188+
allowNull: true,
189+
},
190+
employeeChurnRate: {
191+
type: DataTypes.JSONB,
192+
allowNull: true,
193+
},
194+
employeeCountByMonth: {
195+
type: DataTypes.JSONB,
196+
allowNull: true,
197+
},
198+
employeeGrowthRate: {
199+
type: DataTypes.JSONB,
200+
allowNull: true,
201+
},
202+
employeeCountByMonthByLevel: {
203+
type: DataTypes.JSONB,
204+
allowNull: true,
205+
},
206+
employeeCountByMonthByRole: {
207+
type: DataTypes.JSONB,
208+
allowNull: true,
209+
},
210+
gicsSector: {
211+
type: DataTypes.TEXT,
212+
allowNull: true,
213+
},
214+
grossAdditionsByMonth: {
215+
type: DataTypes.JSONB,
216+
allowNull: true,
217+
},
218+
grossDeparturesByMonth: {
219+
type: DataTypes.JSONB,
220+
allowNull: true,
221+
},
222+
inferredRevenue: {
223+
type: DataTypes.INTEGER,
224+
allowNull: true,
225+
},
226+
recentExecutiveDepartures: {
227+
type: DataTypes.JSONB,
228+
allowNull: true,
229+
},
230+
recentExecutiveHires: {
231+
type: DataTypes.JSONB,
232+
allowNull: true,
233+
},
157234
},
158235
{
159236
indexes: [

backend/src/services/premium/enrichment/organizationEnrichmentService.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,25 @@ export default class OrganizationEnrichmentService extends LoggerBase {
166166
employee_count_by_country: 'employeeCountByCountry',
167167
employee_count: 'employees',
168168
location: 'address',
169+
affiliated_profiles: 'affiliatedProfiles',
170+
all_subsidiaries: 'allSubsidiaries',
171+
alternative_domains: 'alternativeDomains',
172+
alternative_names: 'alternativeNames',
173+
average_employee_tenure: 'averageEmployeeTenure',
174+
average_tenure_by_level: 'averageTenureByLevel',
175+
average_tenure_by_role: 'averageTenureByRole',
176+
direct_subsidiaries: 'directSubsidiaries',
177+
employee_churn_rate: 'employeeChurnRate',
178+
employee_count_by_month: 'employeeCountByMonth',
179+
employee_growth_rate: 'employeeGrowthRate',
180+
employee_count_by_month_by_level: 'employeeCountByMonthByLevel',
181+
employee_count_by_month_by_role: 'employeeCountByMonthByRole',
182+
gics_sector: 'gicsSector',
183+
gross_additions_by_month: 'grossAdditionsByMonth',
184+
gross_departures_by_month: 'grossDeparturesByMonth',
185+
inferred_revenue: 'inferredRevenue',
186+
recent_exec_departures: 'recentExecDepartures',
187+
recent_exec_hires: 'recentExecHires',
169188
})
170189
data = OrganizationEnrichmentService.sanitize(data)
171190

backend/src/services/premium/enrichment/types/organizationEnrichmentTypes.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,33 @@ export interface IOrganization {
2121
naics?: IEnrichmentResponse['naics']
2222
industry?: IEnrichmentResponse['industry']
2323
founded?: IEnrichmentResponse['founded']
24-
employees?: IEnrichmentResponse['size']
24+
employees?: IEnrichmentResponse['employee_count']
2525
twitter?: ISocialNetwork
2626
github?: ISocialNetwork
2727
linkedin?: ISocialNetwork
2828
crunchbase?: ISocialNetwork
2929
lastEnrichedAt?: Date
3030
geoLocation?: String
3131
address?: IEnrichmentResponse['location']
32+
affiliatedProfiles?: IEnrichmentResponse['affiliated_profiles']
33+
allSubsidiaries?: IEnrichmentResponse['all_subsidiaries']
34+
alternativeDomains?: IEnrichmentResponse['alternative_domains']
35+
alternativeNames?: IEnrichmentResponse['alternative_names']
36+
averageEmployeeTenure?: IEnrichmentResponse['average_employee_tenure']
37+
averageTenureByLevel?: IEnrichmentResponse['average_tenure_by_level']
38+
averageTenureByRole?: IEnrichmentResponse['average_tenure_by_role']
39+
directSubsidiaries?: IEnrichmentResponse['direct_subsidiaries']
40+
employeeChurnRate?: IEnrichmentResponse['employee_churn_rate']
41+
employeeCountByMonth?: IEnrichmentResponse['employee_count_by_month']
42+
employeeGrowthRate?: IEnrichmentResponse['employee_growth_rate']
43+
employeeCountByMonthByLevel?: IEnrichmentResponse['employee_count_by_month_by_level']
44+
employeeCountByMonthByRole?: IEnrichmentResponse['employee_count_by_month_by_role']
45+
gicsSector?: IEnrichmentResponse['gics_sector']
46+
grossAdditionsByMonth?: IEnrichmentResponse['gross_additions_by_month']
47+
grossDeparturesByMonth?: IEnrichmentResponse['gross_departures_by_month']
48+
inferredRevenue?: IEnrichmentResponse['inferred_revenue']
49+
recentExecutiveDepartures?: IEnrichmentResponse['recent_exec_departures']
50+
recentExecutiveHires?: IEnrichmentResponse['recent_exec_hires']
3251
}
3352

3453
interface ISocialNetwork {

0 commit comments

Comments
 (0)