diff --git a/src/components/dashboard/dashboardElement/dashboardElement.interface.ts b/src/components/dashboard/dashboardElement/dashboardElement.interface.ts index a6c07fc..2054b30 100644 --- a/src/components/dashboard/dashboardElement/dashboardElement.interface.ts +++ b/src/components/dashboard/dashboardElement/dashboardElement.interface.ts @@ -29,11 +29,16 @@ export interface IDashboardElementVis extends IDashboardElement { | 'pieChart'; } +export interface IDashboardElementBasicQueryMeasure { + columnName: string; + operator: string; +} + export interface IDashboardElementBasicQuery extends IDashboardElementVis { type: 'basicQuery'; dimension: string; differential?: string; - measures: string[]; + measures: IDashboardElementBasicQueryMeasure[]; } export interface IDashboardElementCustomQuery extends IDashboardElementVis { diff --git a/src/components/dashboard/dashboardElement/dashboardElement.model.ts b/src/components/dashboard/dashboardElement/dashboardElement.model.ts index 8a60ad4..dd588d0 100644 --- a/src/components/dashboard/dashboardElement/dashboardElement.model.ts +++ b/src/components/dashboard/dashboardElement/dashboardElement.model.ts @@ -30,7 +30,12 @@ const dashboardElementBasicQuerySchema = new mongoose.Schema({ dimension: { type: String }, differential: { type: String }, - measures: [{ type: String }], + measures: [ + { + columnName: { type: String }, + operator: { type: String }, + }, + ], visType: { type: String, required: true }, });