@cool-digital-solutions/interferir-models 1.4.57 → 1.4.59
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/model-indexes.js +1 -0
- package/dist/schemas/pricing-company-analysis-plan.schema.js +14 -0
- package/dist/schemas/pricing-project-analysis.schema.js +14 -0
- package/dist/types/general-config.type.d.ts +1 -2
- package/dist/types/general-config.type.js +0 -1
- package/dist/types/pricing-company-analysis-plan.type.d.ts +7 -0
- package/dist/types/pricing-company-analysis-plan.type.js +6 -0
- package/dist/types/pricing-project-analysis.type.d.ts +4 -0
- package/package.json +1 -1
|
@@ -6,11 +6,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
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
|
+
const pricing_company_analysis_plan_type_1 = require("src/types/pricing-company-analysis-plan.type");
|
|
9
10
|
const PricingCompanyAnalysisPlanSchema = new mongoose_1.Schema({
|
|
10
11
|
projectAnalysis: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true }],
|
|
11
12
|
totalCredit: { type: Number, required: true, min: 0 },
|
|
12
13
|
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true },
|
|
13
14
|
baseCreditPrice: { type: Number, required: true, min: 0 },
|
|
15
|
+
basePricingModel: {
|
|
16
|
+
type: String,
|
|
17
|
+
enum: Object.values(pricing_company_analysis_plan_type_1.PricingModel),
|
|
18
|
+
default: pricing_company_analysis_plan_type_1.PricingModel.VALUE_BASED,
|
|
19
|
+
},
|
|
20
|
+
medianCost: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0,
|
|
23
|
+
},
|
|
24
|
+
medianCostCredit: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0,
|
|
27
|
+
},
|
|
14
28
|
priceMultiplier: { type: Number, required: true, default: 1.0, min: 0.1, max: 10.0 },
|
|
15
29
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
16
30
|
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
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
|
+
const pricing_company_analysis_plan_type_1 = require("src/types/pricing-company-analysis-plan.type");
|
|
9
10
|
const PricingProjectAnalysisSchema = new mongoose_1.Schema({
|
|
10
11
|
strategyHouseId: { type: mongoose_1.Schema.Types.ObjectId, required: true }, // from third api Strategy House ID
|
|
11
12
|
strategyHouseSnapshot: {
|
|
@@ -14,6 +15,19 @@ const PricingProjectAnalysisSchema = new mongoose_1.Schema({
|
|
|
14
15
|
depth: { type: Number },
|
|
15
16
|
baseCreditCost: { type: Number, required: true, min: 0 },
|
|
16
17
|
name: { type: String, required: true },
|
|
18
|
+
basePricingModel: {
|
|
19
|
+
type: String,
|
|
20
|
+
enum: Object.values(pricing_company_analysis_plan_type_1.PricingModel),
|
|
21
|
+
default: pricing_company_analysis_plan_type_1.PricingModel.VALUE_BASED,
|
|
22
|
+
},
|
|
23
|
+
medianCost: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0,
|
|
26
|
+
},
|
|
27
|
+
medianCostCredit: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 0,
|
|
30
|
+
},
|
|
17
31
|
},
|
|
18
32
|
creditMultiplier: { type: Number, required: true, min: 0.1, default: 1 },
|
|
19
33
|
finalCredit: { type: Number, required: true, min: 0 },
|
|
@@ -79,8 +79,7 @@ export declare enum Key {
|
|
|
79
79
|
NASH = "nash",
|
|
80
80
|
REESE = "reese",
|
|
81
81
|
CURIE = "curie",
|
|
82
|
-
BASE_CREDIT_PRICE = "base_credit_price"
|
|
83
|
-
MEDIAN_COST = "median_cost"
|
|
82
|
+
BASE_CREDIT_PRICE = "base_credit_price"
|
|
84
83
|
}
|
|
85
84
|
export interface IGeneralConfig extends BaseSchema {
|
|
86
85
|
generalConfigSub: Types.ObjectId | IGeneralConfigSub;
|
|
@@ -26,11 +26,18 @@ import { Types } from 'mongoose';
|
|
|
26
26
|
import { BaseModel, BaseSchema } from '../config';
|
|
27
27
|
import { IPricingProjectAnalysis } from './pricing-project-analysis.type';
|
|
28
28
|
import { ICompany } from './company.type';
|
|
29
|
+
export declare enum PricingModel {
|
|
30
|
+
VALUE_BASED = "VALUE_BASED",
|
|
31
|
+
COST_BASED = "COST_BASED"
|
|
32
|
+
}
|
|
29
33
|
export interface IPricingCompanyAnalysisPlan extends BaseSchema {
|
|
30
34
|
projectAnalysis: Types.ObjectId[] | IPricingProjectAnalysis[];
|
|
31
35
|
totalCredit: number;
|
|
32
36
|
company: Types.ObjectId | ICompany;
|
|
33
37
|
baseCreditPrice: number;
|
|
38
|
+
basePricingModel: PricingModel;
|
|
39
|
+
medianCost: number;
|
|
40
|
+
medianCostCredit: number;
|
|
34
41
|
priceMultiplier: number;
|
|
35
42
|
}
|
|
36
43
|
export interface IPricingCompanyAnalysisPlanModel extends BaseModel<IPricingCompanyAnalysisPlan> {
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PricingModel = void 0;
|
|
4
|
+
var PricingModel;
|
|
5
|
+
(function (PricingModel) {
|
|
6
|
+
PricingModel["VALUE_BASED"] = "VALUE_BASED";
|
|
7
|
+
PricingModel["COST_BASED"] = "COST_BASED";
|
|
8
|
+
})(PricingModel || (exports.PricingModel = PricingModel = {}));
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { BaseModel, BaseSchema } from '../config';
|
|
26
26
|
import { Types } from 'mongoose';
|
|
27
|
+
import { PricingModel } from './pricing-company-analysis-plan.type';
|
|
27
28
|
export interface IPricingProjectAnalysis extends BaseSchema {
|
|
28
29
|
strategyHouseId: Types.ObjectId;
|
|
29
30
|
strategyHouseSnapshot: {
|
|
@@ -32,6 +33,9 @@ export interface IPricingProjectAnalysis extends BaseSchema {
|
|
|
32
33
|
depth: number;
|
|
33
34
|
baseCreditCost: number;
|
|
34
35
|
name: string;
|
|
36
|
+
basePricingModel: PricingModel;
|
|
37
|
+
medianCost: number;
|
|
38
|
+
medianCostCredit: number;
|
|
35
39
|
};
|
|
36
40
|
creditMultiplier: number;
|
|
37
41
|
finalCredit: number;
|