@cool-digital-solutions/interferir-models 1.4.25 → 1.4.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/pricing-company-analysis-plan.schema.js +1 -1
- package/dist/schemas/pricing-project-analysis.schema.js +9 -7
- package/dist/types/pricing-analysis-credit-usage.type.d.ts +0 -1
- package/dist/types/pricing-company-analysis-plan.type.d.ts +1 -1
- package/dist/types/pricing-project-analysis.type.d.ts +33 -6
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ const mongoose_1 = require("mongoose");
|
|
|
7
7
|
const express_http_context_1 = __importDefault(require("express-http-context"));
|
|
8
8
|
const _config_1 = require("../config");
|
|
9
9
|
const PricingCompanyAnalysisPlanSchema = new mongoose_1.Schema({
|
|
10
|
-
projectAnalysis: { type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true },
|
|
10
|
+
projectAnalysis: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true }],
|
|
11
11
|
totalCredit: { type: Number, required: true, min: 0 },
|
|
12
12
|
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true },
|
|
13
13
|
baseCreditPrice: { type: Number, required: true, min: 0 },
|
|
@@ -7,13 +7,15 @@ const mongoose_1 = require("mongoose");
|
|
|
7
7
|
const express_http_context_1 = __importDefault(require("express-http-context"));
|
|
8
8
|
const _config_1 = require("../config");
|
|
9
9
|
const PricingProjectAnalysisSchema = new mongoose_1.Schema({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
strategyHouseId: { type: mongoose_1.Schema.Types.ObjectId, required: true }, // from third api Strategy House ID
|
|
11
|
+
strategyHouseSnapshot: {
|
|
12
|
+
type: { type: String },
|
|
13
|
+
geography: { type: Number },
|
|
14
|
+
depth: { type: Number },
|
|
15
|
+
baseCreditCost: { type: Number, required: true, min: 0 },
|
|
16
|
+
name: { type: String, required: true },
|
|
17
|
+
},
|
|
18
|
+
creditMultiplier: { type: Number, required: true, min: 0.1, default: 1 },
|
|
17
19
|
finalCredit: { type: Number, required: true, min: 0 },
|
|
18
20
|
creditLimit: { type: Number, required: true, min: 0 },
|
|
19
21
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
@@ -33,7 +33,6 @@ export declare enum PricingAnalysisCreditUsageType {
|
|
|
33
33
|
export interface IPricingAnalysisCreditSnapshot {
|
|
34
34
|
companyBaseCredit: number;
|
|
35
35
|
companyPriceMultiplier: number;
|
|
36
|
-
analysisBaseCredit: number;
|
|
37
36
|
analysisBaseCreditCost: number;
|
|
38
37
|
analysisCreditMultiplier: number;
|
|
39
38
|
analysisFinalCredit: number;
|
|
@@ -27,7 +27,7 @@ import { BaseModel, BaseSchema } from '../config';
|
|
|
27
27
|
import { IPricingProjectAnalysis } from './pricing-project-analysis.type';
|
|
28
28
|
import { ICompany } from './company.type';
|
|
29
29
|
export interface IPricingCompanyAnalysisPlan extends BaseSchema {
|
|
30
|
-
projectAnalysis: Types.ObjectId | IPricingProjectAnalysis;
|
|
30
|
+
projectAnalysis: Types.ObjectId[] | IPricingProjectAnalysis[];
|
|
31
31
|
totalCredit: number;
|
|
32
32
|
company: Types.ObjectId | ICompany;
|
|
33
33
|
baseCreditPrice: number;
|
|
@@ -1,11 +1,38 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { BaseModel, BaseSchema } from '../config';
|
|
26
|
+
import { Types } from 'mongoose';
|
|
2
27
|
export interface IPricingProjectAnalysis extends BaseSchema {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
28
|
+
strategyHouseId: Types.ObjectId;
|
|
29
|
+
strategyHouseSnapshot: {
|
|
30
|
+
type: string;
|
|
31
|
+
geography: number;
|
|
32
|
+
depth: number;
|
|
33
|
+
baseCreditCost: number;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
9
36
|
creditMultiplier: number;
|
|
10
37
|
finalCredit: number;
|
|
11
38
|
creditLimit: number;
|