Skip to content

Commit

Permalink
include site category data in Readings
Browse files Browse the repository at this point in the history
  • Loading branch information
Baalmart committed Nov 24, 2024
1 parent ca2bd26 commit f60c184
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/device-registry/models/Reading.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ const HealthTipsSchema = new Schema(
{ _id: false }
);

const categorySchema = new Schema(
{
area_name: { type: String },
category: { type: String },
highway: { type: String },
landuse: { type: String },
latitude: { type: Number },
longitude: { type: Number },
natural: { type: String },
search_radius: { type: Number },
waterway: { type: String },
tags: [
{
type: String,
trim: true,
},
],
},
{
_id: false,
}
);

const SiteDetailsSchema = new Schema(
{
_id: Schema.Types.ObjectId,
Expand All @@ -42,6 +65,7 @@ const SiteDetailsSchema = new Schema(
bearing_in_radians: Number,
description: String,
data_provider: String,
site_category: { type: categorySchema },
},
{ _id: false }
);
Expand Down

0 comments on commit f60c184

Please sign in to comment.