Skip to content

Commit

Permalink
Merge pull request #10 from Duna-System/feat/photogrammetry-highlights
Browse files Browse the repository at this point in the history
Feat/photogrammetry highlights
  • Loading branch information
Marcus-D-Forte authored Jan 25, 2024
2 parents 4da689a + 07d5fce commit 4e5e04f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build/entity/validationEntityDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function createEntityCollectionWithValidation(uri, databaseName, collectionName)
bsonType: 'string',
description: 'Holds a name reference to a parent entity. Not required.',
},
childLocations: {
bsonType: 'array',
description: 'Holds locations of other objects belonging to the entity. Not required.',
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion build/entity/validationEntityModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const entitySchema = new mongoose_1.Schema({
location: { type: String, required: true },
sizeMB: { type: Number, required: true },
shareGroup: { type: String, required: true },
parentName: { type: String, requred: false },
parentName: { type: String, required: false },
childLocations: { type: [String], required: false },
});
exports.entityModel = (0, mongoose_1.model)('entity', entitySchema);
1 change: 1 addition & 0 deletions build/interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface IEntityDb {
sizeMB: number;
shareGroup: ShareGroupType;
parentName?: string;
childLocations?: Array<string>;
}
/**
* Project level quota. Contains summed up entity sized.
Expand Down
5 changes: 5 additions & 0 deletions src/entity/validationEntityDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export async function createEntityCollectionWithValidation(
description:
'Holds a name reference to a parent entity. Not required.',
},
childLocations: {
bsonType: 'array',
description:
'Holds locations of other objects belonging to the entity. Not required.',
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion src/entity/validationEntityModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const entitySchema = new Schema<IEntityDb>({
location: { type: String, required: true },
sizeMB: { type: Number, required: true },
shareGroup: { type: String, required: true },
parentName: { type: String, requred: false },
parentName: { type: String, required: false },
childLocations: { type: [String], required: false },
})

export const entityModel = model<IEntityDb>('entity', entitySchema)
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface IEntityDb {
sizeMB: number
shareGroup: ShareGroupType
parentName?: string
childLocations?: Array<string>
}

/**
Expand Down

0 comments on commit 4e5e04f

Please sign in to comment.