diff --git a/build/interfaces.d.ts b/build/interfaces.d.ts index bcaac28..e70995e 100644 --- a/build/interfaces.d.ts +++ b/build/interfaces.d.ts @@ -34,6 +34,7 @@ export interface ProjectQuota { pointCloudUsedMB: number; imageUsedMB: number; BIMUsedMB: number; + photogrammetryUsedMB: number; } /** * User level quota. Contains quota and used space from all projects. @@ -42,9 +43,11 @@ export interface UserQuota { pointCloudQuotaMB: number; imageSizeQuotaMB: number; BIMSizeQuotaMB: number; + photogrammetryQuotaMB: number; pointCloudUsedMB: number; imageUsedMB: number; BIMUsedMB: number; + photogrammetryUsedMB: number; } export interface IProjectDb { _id: string; @@ -57,6 +60,7 @@ export interface IProjectDb { clouds: Array; images: Array; bim: Array; + photogrammetry: Array; projectQuota: ProjectQuota; createdAt: number; modifiedAt: number; @@ -104,5 +108,6 @@ export declare enum EntityType { PointCloud = "clouds", Image = "images", BIM = "bim", + Photogrammetry = "photogrammerty", Unknown = "unknown" } diff --git a/build/interfaces.js b/build/interfaces.js index 21cd19e..6e1ed8b 100644 --- a/build/interfaces.js +++ b/build/interfaces.js @@ -28,5 +28,6 @@ var EntityType; EntityType["PointCloud"] = "clouds"; EntityType["Image"] = "images"; EntityType["BIM"] = "bim"; + EntityType["Photogrammetry"] = "photogrammerty"; EntityType["Unknown"] = "unknown"; })(EntityType || (exports.EntityType = EntityType = {})); diff --git a/build/projects/services/ProjectService.js b/build/projects/services/ProjectService.js index 1616183..068cc88 100644 --- a/build/projects/services/ProjectService.js +++ b/build/projects/services/ProjectService.js @@ -52,6 +52,7 @@ class ProjectService { .populate('clouds') .populate('bim') .populate('images') + .populate('photogrammetry') .lean() .exec(); if (!project_record) { diff --git a/build/projects/validationProjectsDb.js b/build/projects/validationProjectsDb.js index f44a3f7..be6a23b 100644 --- a/build/projects/validationProjectsDb.js +++ b/build/projects/validationProjectsDb.js @@ -36,6 +36,7 @@ function createProjectCollectionWithValidation(uri, databaseName, collection_pro 'clouds', 'images', 'bim', + 'photogrammetry', 'projectQuota', 'createdAt', 'modifiedAt', @@ -45,42 +46,47 @@ function createProjectCollectionWithValidation(uri, databaseName, collection_pro properties: { _id: { bsonType: 'string', - description: 'ID do projeto (string)', + description: 'project ID (string)', }, user_id: { bsonType: 'string', - description: 'ID do usuário (string)', + description: 'user ID (string)', }, name: { bsonType: 'string', - description: 'Nome do projeto (string)', + description: 'Project name (string)', }, clientName: { bsonType: 'string', - description: 'Nome do cliente (string)', + description: 'Client name (string)', }, type: { bsonType: 'string', - description: 'Tipo do projeto (string)', + description: 'Project type (string)', }, favorite: { bsonType: 'bool', - description: 'Indicador de favorito (boolean)', + description: 'Favorite indicator (boolean)', }, clouds: { bsonType: 'array', items: { bsonType: 'string' }, - description: 'Lista de nuvens associadas (array de strings)', + description: 'List of associated pointcloud entities (string array)', }, images: { bsonType: 'array', items: { bsonType: 'string' }, - description: 'Lista de imagens associadas (array de strings)', + description: 'List of associated image entities (string array)', }, bim: { bsonType: 'array', items: { bsonType: 'string' }, - description: 'Lista de modelos BIM associados (array de strings)', + description: 'List of associated BIM entities (string array)', + }, + phtogrammetry: { + bsonType: 'array', + items: { bsonType: 'string' }, + description: 'Photogrammetry entity [unique] (string array)', }, projectQuota: { bsonType: 'object', @@ -88,37 +94,42 @@ function createProjectCollectionWithValidation(uri, databaseName, collection_pro 'pointCloudUsedMB', 'imageUsedMB', 'BIMUsedMB', + 'photogrammetryUsedMB', ], properties: { pointCloudUsedMB: { bsonType: 'number', - description: 'Uso de nuvem de pontos (number)', + description: 'Size in MB used by pointcloud entities (number)', }, imageUsedMB: { bsonType: 'number', - description: 'Uso de tamanho da imagem (number)', + description: 'Size in MB used by image entities (number)', }, BIMUsedMB: { bsonType: 'number', - description: 'Uso de tamanho do BIM (number)', + description: 'Size in MB used by BIM entities (number)', + }, + photogrammetryUsedMB: { + bsonType: 'number', + description: 'Size in MB used by photogrammetry entities (number)', }, }, }, createdAt: { bsonType: 'number', - description: 'Timestamp de criação (number)', + description: 'project creation timestamp (number)', }, modifiedAt: { bsonType: 'number', - description: 'Timestamp de modificação (number)', + description: 'project modification timestamp (number)', }, publicAccessToken: { bsonType: 'string', - description: 'Token de acesso público (string)', + description: 'Public access token (for shared projects) (string)', }, status: { bsonType: 'string', - description: 'Status do projeto (string)', + description: 'Project status (string)', }, }, }, diff --git a/build/projects/validationProjectsModel.js b/build/projects/validationProjectsModel.js index bbfe911..017dba0 100644 --- a/build/projects/validationProjectsModel.js +++ b/build/projects/validationProjectsModel.js @@ -13,10 +13,12 @@ const projectSchema = new mongoose_1.Schema({ clouds: { type: [String], default: [], ref: 'entity' }, images: { type: [String], default: [], ref: 'entity' }, bim: { type: [String], default: [], ref: 'entity' }, + photogrammetry: { type: [String], default: [], ref: 'entity' }, projectQuota: { pointCloudUsedMB: { type: Number, required: true }, imageUsedMB: { type: Number, required: true }, BIMUsedMB: { type: Number, required: true }, + photogrammetryUsedMB: { type: Number, required: true }, }, createdAt: { type: Number, required: true }, modifiedAt: { type: Number, required: true }, diff --git a/build/users/services/createUserService.js b/build/users/services/createUserService.js index 0ba4235..76903de 100644 --- a/build/users/services/createUserService.js +++ b/build/users/services/createUserService.js @@ -39,9 +39,11 @@ function createUserService(user) { BIMSizeQuotaMB: 5000, pointCloudQuotaMB: 5000, imageSizeQuotaMB: 5000, + photogrammetryQuotaMB: 5000, BIMUsedMB: 0, imageUsedMB: 0, pointCloudUsedMB: 0, + photogrammetryUsedMB: 0, }, }); const savedUser = yield newUser.save(); diff --git a/build/users/validationUserModel.js b/build/users/validationUserModel.js index bc43485..1f19b82 100644 --- a/build/users/validationUserModel.js +++ b/build/users/validationUserModel.js @@ -23,9 +23,11 @@ const UserSchema = new mongoose_1.default.Schema({ pointCloudQuotaMB: { type: Number, required: true }, imageSizeQuotaMB: { type: Number, required: true }, BIMSizeQuotaMB: { type: Number, required: true }, + photogrammetryQuotaMB: { type: Number, required: true }, pointCloudUsedMB: { type: Number, required: true }, imageUsedMB: { type: Number, required: true }, BIMUsedMB: { type: Number, required: true }, + photogrammetryUsedMB: { type: Number, required: true }, }, validatedMail: { type: Boolean, required: true, default: false }, }); diff --git a/src/interfaces.ts b/src/interfaces.ts index 9db3202..23fb47c 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -36,6 +36,7 @@ export interface ProjectQuota { pointCloudUsedMB: number imageUsedMB: number BIMUsedMB: number + photogrammetryUsedMB: number } /** @@ -45,9 +46,11 @@ export interface UserQuota { pointCloudQuotaMB: number imageSizeQuotaMB: number BIMSizeQuotaMB: number + photogrammetryQuotaMB: number pointCloudUsedMB: number imageUsedMB: number BIMUsedMB: number + photogrammetryUsedMB: number } export interface IProjectDb { @@ -61,6 +64,7 @@ export interface IProjectDb { clouds: Array images: Array bim: Array + photogrammetry: Array projectQuota: ProjectQuota createdAt: number modifiedAt: number @@ -111,5 +115,6 @@ export enum EntityType { PointCloud = 'clouds', Image = 'images', BIM = 'bim', + Photogrammetry = 'photogrammerty', Unknown = 'unknown', } diff --git a/src/projects/services/ProjectService.ts b/src/projects/services/ProjectService.ts index 869c8cb..9a25abd 100644 --- a/src/projects/services/ProjectService.ts +++ b/src/projects/services/ProjectService.ts @@ -47,6 +47,7 @@ export class ProjectService { .populate('clouds') .populate('bim') .populate('images') + .populate('photogrammetry') .lean() .exec() diff --git a/src/projects/validationProjectsDb.ts b/src/projects/validationProjectsDb.ts index 4a3cef9..402faee 100644 --- a/src/projects/validationProjectsDb.ts +++ b/src/projects/validationProjectsDb.ts @@ -28,6 +28,7 @@ export async function createProjectCollectionWithValidation( 'clouds', 'images', 'bim', + 'photogrammetry', 'projectQuota', 'createdAt', 'modifiedAt', @@ -37,45 +38,51 @@ export async function createProjectCollectionWithValidation( properties: { _id: { bsonType: 'string', - description: 'ID do projeto (string)', + description: 'project ID (string)', }, user_id: { bsonType: 'string', - description: 'ID do usuário (string)', + description: 'user ID (string)', }, name: { bsonType: 'string', - description: 'Nome do projeto (string)', + description: 'Project name (string)', }, clientName: { bsonType: 'string', - description: 'Nome do cliente (string)', + description: 'Client name (string)', }, type: { bsonType: 'string', - description: 'Tipo do projeto (string)', + description: 'Project type (string)', }, favorite: { bsonType: 'bool', - description: 'Indicador de favorito (boolean)', + description: 'Favorite indicator (boolean)', }, clouds: { bsonType: 'array', items: { bsonType: 'string' }, description: - 'Lista de nuvens associadas (array de strings)', + 'List of associated pointcloud entities (string array)', }, images: { bsonType: 'array', items: { bsonType: 'string' }, description: - 'Lista de imagens associadas (array de strings)', + 'List of associated image entities (string array)', }, bim: { bsonType: 'array', items: { bsonType: 'string' }, description: - 'Lista de modelos BIM associados (array de strings)', + 'List of associated BIM entities (string array)', + }, + phtogrammetry: { + bsonType: 'array', + items: { bsonType: 'string' }, + description: + 'Photogrammetry entity [unique] (string array)', }, projectQuota: { bsonType: 'object', @@ -83,38 +90,47 @@ export async function createProjectCollectionWithValidation( 'pointCloudUsedMB', 'imageUsedMB', 'BIMUsedMB', + 'photogrammetryUsedMB', ], properties: { pointCloudUsedMB: { bsonType: 'number', - description: 'Uso de nuvem de pontos (number)', + description: + 'Size in MB used by pointcloud entities (number)', }, imageUsedMB: { bsonType: 'number', description: - 'Uso de tamanho da imagem (number)', + 'Size in MB used by image entities (number)', }, BIMUsedMB: { bsonType: 'number', - description: 'Uso de tamanho do BIM (number)', + description: + 'Size in MB used by BIM entities (number)', + }, + photogrammetryUsedMB: { + bsonType: 'number', + description: + 'Size in MB used by photogrammetry entities (number)', }, }, }, createdAt: { bsonType: 'number', - description: 'Timestamp de criação (number)', + description: 'project creation timestamp (number)', }, modifiedAt: { bsonType: 'number', - description: 'Timestamp de modificação (number)', + description: 'project modification timestamp (number)', }, publicAccessToken: { bsonType: 'string', - description: 'Token de acesso público (string)', + description: + 'Public access token (for shared projects) (string)', }, status: { bsonType: 'string', - description: 'Status do projeto (string)', + description: 'Project status (string)', }, }, }, diff --git a/src/projects/validationProjectsModel.ts b/src/projects/validationProjectsModel.ts index a758cc9..f73f813 100644 --- a/src/projects/validationProjectsModel.ts +++ b/src/projects/validationProjectsModel.ts @@ -12,10 +12,12 @@ const projectSchema = new Schema({ clouds: { type: [String], default: [], ref: 'entity' }, images: { type: [String], default: [], ref: 'entity' }, bim: { type: [String], default: [], ref: 'entity' }, + photogrammetry: { type: [String], default: [], ref: 'entity' }, projectQuota: { pointCloudUsedMB: { type: Number, required: true }, imageUsedMB: { type: Number, required: true }, BIMUsedMB: { type: Number, required: true }, + photogrammetryUsedMB: { type: Number, required: true }, }, createdAt: { type: Number, required: true }, modifiedAt: { type: Number, required: true }, diff --git a/src/users/services/createUserService.ts b/src/users/services/createUserService.ts index 7356f0e..002633d 100644 --- a/src/users/services/createUserService.ts +++ b/src/users/services/createUserService.ts @@ -30,9 +30,11 @@ export async function createUserService(user: IUsers): Promise { BIMSizeQuotaMB: 5000, pointCloudQuotaMB: 5000, imageSizeQuotaMB: 5000, + photogrammetryQuotaMB: 5000, BIMUsedMB: 0, imageUsedMB: 0, pointCloudUsedMB: 0, + photogrammetryUsedMB: 0, }, }) diff --git a/src/users/validationUserModel.ts b/src/users/validationUserModel.ts index b22779f..ed7e466 100644 --- a/src/users/validationUserModel.ts +++ b/src/users/validationUserModel.ts @@ -19,9 +19,11 @@ const UserSchema = new mongoose.Schema({ pointCloudQuotaMB: { type: Number, required: true }, imageSizeQuotaMB: { type: Number, required: true }, BIMSizeQuotaMB: { type: Number, required: true }, + photogrammetryQuotaMB: { type: Number, required: true }, pointCloudUsedMB: { type: Number, required: true }, imageUsedMB: { type: Number, required: true }, BIMUsedMB: { type: Number, required: true }, + photogrammetryUsedMB: { type: Number, required: true }, }, validatedMail: { type: Boolean, required: true, default: false }, })