@fesmex/models 0.1.2 → 0.1.4
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/clients/index.d.ts +12 -2
- package/dist/clients/index.js +13 -3
- package/dist/clients/models/ClientsAddress.d.ts +17 -0
- package/dist/clients/models/ClientsAddress.js +19 -0
- package/dist/clients/models/ClientsPaymentMethod.d.ts +12 -0
- package/dist/clients/models/ClientsPaymentMethod.js +14 -0
- package/dist/clients/models/ClientsPaymentTerm.d.ts +12 -0
- package/dist/clients/models/ClientsPaymentTerm.js +14 -0
- package/dist/clients/models/ClientsPriceList.d.ts +12 -0
- package/dist/clients/models/ClientsPriceList.js +14 -0
- package/dist/clients/models/ClientsSalesEmployee.d.ts +12 -0
- package/dist/clients/models/ClientsSalesEmployee.js +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inventory/index.d.ts +8 -0
- package/dist/inventory/index.js +22 -0
- package/dist/inventory/models/Article.d.ts +109 -0
- package/dist/inventory/models/Article.js +14 -0
- package/dist/inventory/models/ArticleClasses.d.ts +25 -0
- package/dist/inventory/models/ArticleClasses.js +8 -0
- package/dist/inventory/models/ArticleGroups.d.ts +25 -0
- package/dist/inventory/models/ArticleGroups.js +8 -0
- package/dist/inventory/models/ArticlePrices.d.ts +205 -0
- package/dist/inventory/models/ArticlePrices.js +14 -0
- package/dist/inventory/models/Currencies.d.ts +31 -0
- package/dist/inventory/models/Currencies.js +9 -0
- package/dist/inventory/models/InventoryStocks.d.ts +145 -0
- package/dist/inventory/models/InventoryStocks.js +12 -0
- package/dist/inventory/models/PriceLists.d.ts +37 -0
- package/dist/inventory/models/PriceLists.js +10 -0
- package/dist/inventory/models/Warehouses.d.ts +43 -0
- package/dist/inventory/models/Warehouses.js +11 -0
- package/dist/quotes/index.d.ts +4 -0
- package/dist/quotes/index.js +14 -0
- package/dist/quotes/models/Quote.d.ts +208 -0
- package/dist/quotes/models/Quote.js +63 -0
- package/dist/quotes/models/QuoteArticle.d.ts +96 -0
- package/dist/quotes/models/QuoteArticle.js +19 -0
- package/dist/quotes/models/QuoteArticleExtra.d.ts +54 -0
- package/dist/quotes/models/QuoteArticleExtra.js +16 -0
- package/dist/quotes/models/QuoteContact.d.ts +49 -0
- package/dist/quotes/models/QuoteContact.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
symbol: string;
|
|
4
|
+
name: string;
|
|
5
|
+
code: string;
|
|
6
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
7
|
+
symbol: string;
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
}> & {
|
|
11
|
+
symbol: string;
|
|
12
|
+
name: string;
|
|
13
|
+
code: string;
|
|
14
|
+
} & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
17
|
+
symbol: string;
|
|
18
|
+
name: string;
|
|
19
|
+
code: string;
|
|
20
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
21
|
+
symbol: string;
|
|
22
|
+
name: string;
|
|
23
|
+
code: string;
|
|
24
|
+
}>> & import("mongoose").FlatRecord<{
|
|
25
|
+
symbol: string;
|
|
26
|
+
name: string;
|
|
27
|
+
code: string;
|
|
28
|
+
}> & {
|
|
29
|
+
_id: import("mongoose").Types.ObjectId;
|
|
30
|
+
}>>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const currencySchema = new mongoose_1.Schema({
|
|
5
|
+
code: { type: String, required: true, unique: true },
|
|
6
|
+
symbol: { type: String, required: true },
|
|
7
|
+
name: { type: String, required: true },
|
|
8
|
+
});
|
|
9
|
+
exports.default = (0, mongoose_1.model)("Currency", currencySchema, "currencies");
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
updated_at: Date;
|
|
4
|
+
count: number;
|
|
5
|
+
article_id: {
|
|
6
|
+
prototype?: Types.ObjectId;
|
|
7
|
+
cacheHexString?: unknown;
|
|
8
|
+
generate?: {};
|
|
9
|
+
createFromTime?: {};
|
|
10
|
+
createFromHexString?: {};
|
|
11
|
+
createFromBase64?: {};
|
|
12
|
+
isValid?: {};
|
|
13
|
+
};
|
|
14
|
+
warehouse_id: {
|
|
15
|
+
prototype?: Types.ObjectId;
|
|
16
|
+
cacheHexString?: unknown;
|
|
17
|
+
generate?: {};
|
|
18
|
+
createFromTime?: {};
|
|
19
|
+
createFromHexString?: {};
|
|
20
|
+
createFromBase64?: {};
|
|
21
|
+
isValid?: {};
|
|
22
|
+
};
|
|
23
|
+
min_stock?: number;
|
|
24
|
+
max_stock?: number;
|
|
25
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
26
|
+
updated_at: Date;
|
|
27
|
+
count: number;
|
|
28
|
+
article_id: {
|
|
29
|
+
prototype?: Types.ObjectId;
|
|
30
|
+
cacheHexString?: unknown;
|
|
31
|
+
generate?: {};
|
|
32
|
+
createFromTime?: {};
|
|
33
|
+
createFromHexString?: {};
|
|
34
|
+
createFromBase64?: {};
|
|
35
|
+
isValid?: {};
|
|
36
|
+
};
|
|
37
|
+
warehouse_id: {
|
|
38
|
+
prototype?: Types.ObjectId;
|
|
39
|
+
cacheHexString?: unknown;
|
|
40
|
+
generate?: {};
|
|
41
|
+
createFromTime?: {};
|
|
42
|
+
createFromHexString?: {};
|
|
43
|
+
createFromBase64?: {};
|
|
44
|
+
isValid?: {};
|
|
45
|
+
};
|
|
46
|
+
min_stock?: number;
|
|
47
|
+
max_stock?: number;
|
|
48
|
+
}> & {
|
|
49
|
+
updated_at: Date;
|
|
50
|
+
count: number;
|
|
51
|
+
article_id: {
|
|
52
|
+
prototype?: Types.ObjectId;
|
|
53
|
+
cacheHexString?: unknown;
|
|
54
|
+
generate?: {};
|
|
55
|
+
createFromTime?: {};
|
|
56
|
+
createFromHexString?: {};
|
|
57
|
+
createFromBase64?: {};
|
|
58
|
+
isValid?: {};
|
|
59
|
+
};
|
|
60
|
+
warehouse_id: {
|
|
61
|
+
prototype?: Types.ObjectId;
|
|
62
|
+
cacheHexString?: unknown;
|
|
63
|
+
generate?: {};
|
|
64
|
+
createFromTime?: {};
|
|
65
|
+
createFromHexString?: {};
|
|
66
|
+
createFromBase64?: {};
|
|
67
|
+
isValid?: {};
|
|
68
|
+
};
|
|
69
|
+
min_stock?: number;
|
|
70
|
+
max_stock?: number;
|
|
71
|
+
} & {
|
|
72
|
+
_id: Types.ObjectId;
|
|
73
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
74
|
+
updated_at: Date;
|
|
75
|
+
count: number;
|
|
76
|
+
article_id: {
|
|
77
|
+
prototype?: Types.ObjectId;
|
|
78
|
+
cacheHexString?: unknown;
|
|
79
|
+
generate?: {};
|
|
80
|
+
createFromTime?: {};
|
|
81
|
+
createFromHexString?: {};
|
|
82
|
+
createFromBase64?: {};
|
|
83
|
+
isValid?: {};
|
|
84
|
+
};
|
|
85
|
+
warehouse_id: {
|
|
86
|
+
prototype?: Types.ObjectId;
|
|
87
|
+
cacheHexString?: unknown;
|
|
88
|
+
generate?: {};
|
|
89
|
+
createFromTime?: {};
|
|
90
|
+
createFromHexString?: {};
|
|
91
|
+
createFromBase64?: {};
|
|
92
|
+
isValid?: {};
|
|
93
|
+
};
|
|
94
|
+
min_stock?: number;
|
|
95
|
+
max_stock?: number;
|
|
96
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
97
|
+
updated_at: Date;
|
|
98
|
+
count: number;
|
|
99
|
+
article_id: {
|
|
100
|
+
prototype?: Types.ObjectId;
|
|
101
|
+
cacheHexString?: unknown;
|
|
102
|
+
generate?: {};
|
|
103
|
+
createFromTime?: {};
|
|
104
|
+
createFromHexString?: {};
|
|
105
|
+
createFromBase64?: {};
|
|
106
|
+
isValid?: {};
|
|
107
|
+
};
|
|
108
|
+
warehouse_id: {
|
|
109
|
+
prototype?: Types.ObjectId;
|
|
110
|
+
cacheHexString?: unknown;
|
|
111
|
+
generate?: {};
|
|
112
|
+
createFromTime?: {};
|
|
113
|
+
createFromHexString?: {};
|
|
114
|
+
createFromBase64?: {};
|
|
115
|
+
isValid?: {};
|
|
116
|
+
};
|
|
117
|
+
min_stock?: number;
|
|
118
|
+
max_stock?: number;
|
|
119
|
+
}>> & import("mongoose").FlatRecord<{
|
|
120
|
+
updated_at: Date;
|
|
121
|
+
count: number;
|
|
122
|
+
article_id: {
|
|
123
|
+
prototype?: Types.ObjectId;
|
|
124
|
+
cacheHexString?: unknown;
|
|
125
|
+
generate?: {};
|
|
126
|
+
createFromTime?: {};
|
|
127
|
+
createFromHexString?: {};
|
|
128
|
+
createFromBase64?: {};
|
|
129
|
+
isValid?: {};
|
|
130
|
+
};
|
|
131
|
+
warehouse_id: {
|
|
132
|
+
prototype?: Types.ObjectId;
|
|
133
|
+
cacheHexString?: unknown;
|
|
134
|
+
generate?: {};
|
|
135
|
+
createFromTime?: {};
|
|
136
|
+
createFromHexString?: {};
|
|
137
|
+
createFromBase64?: {};
|
|
138
|
+
isValid?: {};
|
|
139
|
+
};
|
|
140
|
+
min_stock?: number;
|
|
141
|
+
max_stock?: number;
|
|
142
|
+
}> & {
|
|
143
|
+
_id: Types.ObjectId;
|
|
144
|
+
}>>;
|
|
145
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const inventoryStockSchema = new mongoose_1.Schema({
|
|
5
|
+
article_id: { type: mongoose_1.Types.ObjectId, ref: "Article", required: true },
|
|
6
|
+
warehouse_id: { type: mongoose_1.Types.ObjectId, ref: "Warehouse", required: true },
|
|
7
|
+
count: { type: Number, required: true },
|
|
8
|
+
min_stock: { type: Number },
|
|
9
|
+
max_stock: { type: Number },
|
|
10
|
+
updated_at: { type: Date, default: Date.now },
|
|
11
|
+
});
|
|
12
|
+
exports.default = (0, mongoose_1.model)("InventoryStock", inventoryStockSchema, "inventory_stocks");
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
number: string;
|
|
4
|
+
created_at: Date;
|
|
5
|
+
name: string;
|
|
6
|
+
updated_at?: Date;
|
|
7
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
8
|
+
number: string;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
name: string;
|
|
11
|
+
updated_at?: Date;
|
|
12
|
+
}> & {
|
|
13
|
+
number: string;
|
|
14
|
+
created_at: Date;
|
|
15
|
+
name: string;
|
|
16
|
+
updated_at?: Date;
|
|
17
|
+
} & {
|
|
18
|
+
_id: import("mongoose").Types.ObjectId;
|
|
19
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
20
|
+
number: string;
|
|
21
|
+
created_at: Date;
|
|
22
|
+
name: string;
|
|
23
|
+
updated_at?: Date;
|
|
24
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
25
|
+
number: string;
|
|
26
|
+
created_at: Date;
|
|
27
|
+
name: string;
|
|
28
|
+
updated_at?: Date;
|
|
29
|
+
}>> & import("mongoose").FlatRecord<{
|
|
30
|
+
number: string;
|
|
31
|
+
created_at: Date;
|
|
32
|
+
name: string;
|
|
33
|
+
updated_at?: Date;
|
|
34
|
+
}> & {
|
|
35
|
+
_id: import("mongoose").Types.ObjectId;
|
|
36
|
+
}>>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const priceListSchema = new mongoose_1.Schema({
|
|
5
|
+
number: { type: String, required: true, unique: true },
|
|
6
|
+
name: { type: String, required: true },
|
|
7
|
+
created_at: { type: Date, default: Date.now },
|
|
8
|
+
updated_at: { type: Date },
|
|
9
|
+
});
|
|
10
|
+
exports.default = (0, mongoose_1.model)("PriceList", priceListSchema, "price_lists");
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
declare const _default: import("mongoose").Model<{
|
|
3
|
+
created_at: Date;
|
|
4
|
+
name: string;
|
|
5
|
+
code: string;
|
|
6
|
+
updated_at?: Date;
|
|
7
|
+
location?: string;
|
|
8
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
9
|
+
created_at: Date;
|
|
10
|
+
name: string;
|
|
11
|
+
code: string;
|
|
12
|
+
updated_at?: Date;
|
|
13
|
+
location?: string;
|
|
14
|
+
}> & {
|
|
15
|
+
created_at: Date;
|
|
16
|
+
name: string;
|
|
17
|
+
code: string;
|
|
18
|
+
updated_at?: Date;
|
|
19
|
+
location?: string;
|
|
20
|
+
} & {
|
|
21
|
+
_id: import("mongoose").Types.ObjectId;
|
|
22
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
23
|
+
created_at: Date;
|
|
24
|
+
name: string;
|
|
25
|
+
code: string;
|
|
26
|
+
updated_at?: Date;
|
|
27
|
+
location?: string;
|
|
28
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
29
|
+
created_at: Date;
|
|
30
|
+
name: string;
|
|
31
|
+
code: string;
|
|
32
|
+
updated_at?: Date;
|
|
33
|
+
location?: string;
|
|
34
|
+
}>> & import("mongoose").FlatRecord<{
|
|
35
|
+
created_at: Date;
|
|
36
|
+
name: string;
|
|
37
|
+
code: string;
|
|
38
|
+
updated_at?: Date;
|
|
39
|
+
location?: string;
|
|
40
|
+
}> & {
|
|
41
|
+
_id: import("mongoose").Types.ObjectId;
|
|
42
|
+
}>>;
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const warehouseSchema = new mongoose_1.Schema({
|
|
5
|
+
code: { type: String, required: true, unique: true },
|
|
6
|
+
name: { type: String, required: true },
|
|
7
|
+
location: { type: String },
|
|
8
|
+
created_at: { type: Date, default: Date.now },
|
|
9
|
+
updated_at: { type: Date },
|
|
10
|
+
});
|
|
11
|
+
exports.default = (0, mongoose_1.model)("Warehouse", warehouseSchema, "warehouses");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.QuoteContact = exports.QuoteArticleExtra = exports.QuoteArticle = exports.Quote = void 0;
|
|
7
|
+
var Quote_1 = require("./models/Quote");
|
|
8
|
+
Object.defineProperty(exports, "Quote", { enumerable: true, get: function () { return __importDefault(Quote_1).default; } });
|
|
9
|
+
var QuoteArticle_1 = require("./models/QuoteArticle");
|
|
10
|
+
Object.defineProperty(exports, "QuoteArticle", { enumerable: true, get: function () { return __importDefault(QuoteArticle_1).default; } });
|
|
11
|
+
var QuoteArticleExtra_1 = require("./models/QuoteArticleExtra");
|
|
12
|
+
Object.defineProperty(exports, "QuoteArticleExtra", { enumerable: true, get: function () { return __importDefault(QuoteArticleExtra_1).default; } });
|
|
13
|
+
var QuoteContact_1 = require("./models/QuoteContact");
|
|
14
|
+
Object.defineProperty(exports, "QuoteContact", { enumerable: true, get: function () { return __importDefault(QuoteContact_1).default; } });
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Schema } from "mongoose";
|
|
2
|
+
export declare enum QuoteStatus {
|
|
3
|
+
OPPORTUNITY = "OPPORTUNITY",
|
|
4
|
+
QUOTE = "QUOTE",
|
|
5
|
+
FOLLOWING = "FOLLOWING",
|
|
6
|
+
NEGOTIATION = "NEGOTIATION"
|
|
7
|
+
}
|
|
8
|
+
export declare enum Status {
|
|
9
|
+
OPEN = "OPEN",
|
|
10
|
+
WIN = "WIN",
|
|
11
|
+
LOST = "LOST",
|
|
12
|
+
DELETE = "DELETE"
|
|
13
|
+
}
|
|
14
|
+
export declare enum CreatedMethod {
|
|
15
|
+
MANUAL = "MANUAL",
|
|
16
|
+
CSV = "CSV"
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("mongoose").Model<{
|
|
19
|
+
quote_number: number;
|
|
20
|
+
quote_revision: number;
|
|
21
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
22
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
23
|
+
status: Status;
|
|
24
|
+
quote_status: QuoteStatus;
|
|
25
|
+
should_sync: boolean;
|
|
26
|
+
created_method: CreatedMethod;
|
|
27
|
+
pipedrive_id?: string;
|
|
28
|
+
sap_id?: string;
|
|
29
|
+
deleted_at?: Date;
|
|
30
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
31
|
+
date?: Date;
|
|
32
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
33
|
+
quote_ref?: string;
|
|
34
|
+
company?: string;
|
|
35
|
+
company_pipedrive_id?: string;
|
|
36
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
37
|
+
project_name?: string;
|
|
38
|
+
project_lab?: string;
|
|
39
|
+
payment_condition?: string;
|
|
40
|
+
payment_exp?: string;
|
|
41
|
+
iva?: string;
|
|
42
|
+
sap_quotation_entry?: number;
|
|
43
|
+
sap_order_entry?: number;
|
|
44
|
+
pdf_download_link?: string;
|
|
45
|
+
notes?: string;
|
|
46
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
47
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
48
|
+
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
49
|
+
quote_number: number;
|
|
50
|
+
quote_revision: number;
|
|
51
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
53
|
+
status: Status;
|
|
54
|
+
quote_status: QuoteStatus;
|
|
55
|
+
should_sync: boolean;
|
|
56
|
+
created_method: CreatedMethod;
|
|
57
|
+
pipedrive_id?: string;
|
|
58
|
+
sap_id?: string;
|
|
59
|
+
deleted_at?: Date;
|
|
60
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
61
|
+
date?: Date;
|
|
62
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
63
|
+
quote_ref?: string;
|
|
64
|
+
company?: string;
|
|
65
|
+
company_pipedrive_id?: string;
|
|
66
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
67
|
+
project_name?: string;
|
|
68
|
+
project_lab?: string;
|
|
69
|
+
payment_condition?: string;
|
|
70
|
+
payment_exp?: string;
|
|
71
|
+
iva?: string;
|
|
72
|
+
sap_quotation_entry?: number;
|
|
73
|
+
sap_order_entry?: number;
|
|
74
|
+
pdf_download_link?: string;
|
|
75
|
+
notes?: string;
|
|
76
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
77
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
78
|
+
}> & {
|
|
79
|
+
quote_number: number;
|
|
80
|
+
quote_revision: number;
|
|
81
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
82
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
83
|
+
status: Status;
|
|
84
|
+
quote_status: QuoteStatus;
|
|
85
|
+
should_sync: boolean;
|
|
86
|
+
created_method: CreatedMethod;
|
|
87
|
+
pipedrive_id?: string;
|
|
88
|
+
sap_id?: string;
|
|
89
|
+
deleted_at?: Date;
|
|
90
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
91
|
+
date?: Date;
|
|
92
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
93
|
+
quote_ref?: string;
|
|
94
|
+
company?: string;
|
|
95
|
+
company_pipedrive_id?: string;
|
|
96
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
97
|
+
project_name?: string;
|
|
98
|
+
project_lab?: string;
|
|
99
|
+
payment_condition?: string;
|
|
100
|
+
payment_exp?: string;
|
|
101
|
+
iva?: string;
|
|
102
|
+
sap_quotation_entry?: number;
|
|
103
|
+
sap_order_entry?: number;
|
|
104
|
+
pdf_download_link?: string;
|
|
105
|
+
notes?: string;
|
|
106
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
107
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
108
|
+
} & {
|
|
109
|
+
_id: import("mongoose").Types.ObjectId;
|
|
110
|
+
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
111
|
+
timestamps: {
|
|
112
|
+
createdAt: string;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
quote_number: number;
|
|
117
|
+
quote_revision: number;
|
|
118
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
119
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
120
|
+
status: Status;
|
|
121
|
+
quote_status: QuoteStatus;
|
|
122
|
+
should_sync: boolean;
|
|
123
|
+
created_method: CreatedMethod;
|
|
124
|
+
pipedrive_id?: string;
|
|
125
|
+
sap_id?: string;
|
|
126
|
+
deleted_at?: Date;
|
|
127
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
128
|
+
date?: Date;
|
|
129
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
130
|
+
quote_ref?: string;
|
|
131
|
+
company?: string;
|
|
132
|
+
company_pipedrive_id?: string;
|
|
133
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
134
|
+
project_name?: string;
|
|
135
|
+
project_lab?: string;
|
|
136
|
+
payment_condition?: string;
|
|
137
|
+
payment_exp?: string;
|
|
138
|
+
iva?: string;
|
|
139
|
+
sap_quotation_entry?: number;
|
|
140
|
+
sap_order_entry?: number;
|
|
141
|
+
pdf_download_link?: string;
|
|
142
|
+
notes?: string;
|
|
143
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
144
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
145
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
146
|
+
quote_number: number;
|
|
147
|
+
quote_revision: number;
|
|
148
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
149
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
150
|
+
status: Status;
|
|
151
|
+
quote_status: QuoteStatus;
|
|
152
|
+
should_sync: boolean;
|
|
153
|
+
created_method: CreatedMethod;
|
|
154
|
+
pipedrive_id?: string;
|
|
155
|
+
sap_id?: string;
|
|
156
|
+
deleted_at?: Date;
|
|
157
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
158
|
+
date?: Date;
|
|
159
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
160
|
+
quote_ref?: string;
|
|
161
|
+
company?: string;
|
|
162
|
+
company_pipedrive_id?: string;
|
|
163
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
164
|
+
project_name?: string;
|
|
165
|
+
project_lab?: string;
|
|
166
|
+
payment_condition?: string;
|
|
167
|
+
payment_exp?: string;
|
|
168
|
+
iva?: string;
|
|
169
|
+
sap_quotation_entry?: number;
|
|
170
|
+
sap_order_entry?: number;
|
|
171
|
+
pdf_download_link?: string;
|
|
172
|
+
notes?: string;
|
|
173
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
174
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
175
|
+
}>> & import("mongoose").FlatRecord<{
|
|
176
|
+
quote_number: number;
|
|
177
|
+
quote_revision: number;
|
|
178
|
+
company_id: import("mongoose").Types.ObjectId;
|
|
179
|
+
terms_ids: import("mongoose").Types.ObjectId[];
|
|
180
|
+
status: Status;
|
|
181
|
+
quote_status: QuoteStatus;
|
|
182
|
+
should_sync: boolean;
|
|
183
|
+
created_method: CreatedMethod;
|
|
184
|
+
pipedrive_id?: string;
|
|
185
|
+
sap_id?: string;
|
|
186
|
+
deleted_at?: Date;
|
|
187
|
+
deleted_by?: import("mongoose").Types.ObjectId;
|
|
188
|
+
date?: Date;
|
|
189
|
+
currency_id?: import("mongoose").Types.ObjectId;
|
|
190
|
+
quote_ref?: string;
|
|
191
|
+
company?: string;
|
|
192
|
+
company_pipedrive_id?: string;
|
|
193
|
+
contact_id?: import("mongoose").Types.ObjectId;
|
|
194
|
+
project_name?: string;
|
|
195
|
+
project_lab?: string;
|
|
196
|
+
payment_condition?: string;
|
|
197
|
+
payment_exp?: string;
|
|
198
|
+
iva?: string;
|
|
199
|
+
sap_quotation_entry?: number;
|
|
200
|
+
sap_order_entry?: number;
|
|
201
|
+
pdf_download_link?: string;
|
|
202
|
+
notes?: string;
|
|
203
|
+
created_by?: import("mongoose").Types.ObjectId;
|
|
204
|
+
updated_by?: import("mongoose").Types.ObjectId;
|
|
205
|
+
}> & {
|
|
206
|
+
_id: import("mongoose").Types.ObjectId;
|
|
207
|
+
}>>;
|
|
208
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatedMethod = exports.Status = exports.QuoteStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var QuoteStatus;
|
|
6
|
+
(function (QuoteStatus) {
|
|
7
|
+
QuoteStatus["OPPORTUNITY"] = "OPPORTUNITY";
|
|
8
|
+
QuoteStatus["QUOTE"] = "QUOTE";
|
|
9
|
+
QuoteStatus["FOLLOWING"] = "FOLLOWING";
|
|
10
|
+
QuoteStatus["NEGOTIATION"] = "NEGOTIATION";
|
|
11
|
+
})(QuoteStatus || (exports.QuoteStatus = QuoteStatus = {}));
|
|
12
|
+
var Status;
|
|
13
|
+
(function (Status) {
|
|
14
|
+
Status["OPEN"] = "OPEN";
|
|
15
|
+
Status["WIN"] = "WIN";
|
|
16
|
+
Status["LOST"] = "LOST";
|
|
17
|
+
Status["DELETE"] = "DELETE";
|
|
18
|
+
})(Status || (exports.Status = Status = {}));
|
|
19
|
+
var CreatedMethod;
|
|
20
|
+
(function (CreatedMethod) {
|
|
21
|
+
CreatedMethod["MANUAL"] = "MANUAL";
|
|
22
|
+
CreatedMethod["CSV"] = "CSV";
|
|
23
|
+
})(CreatedMethod || (exports.CreatedMethod = CreatedMethod = {}));
|
|
24
|
+
const quoteSchema = new mongoose_1.Schema({
|
|
25
|
+
quote_number: { type: Number, required: true },
|
|
26
|
+
quote_revision: { type: Number, default: 0 },
|
|
27
|
+
quote_ref: { type: String },
|
|
28
|
+
company: { type: String },
|
|
29
|
+
company_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Client", required: true },
|
|
30
|
+
company_pipedrive_id: { type: String },
|
|
31
|
+
contact_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "ClientContact" },
|
|
32
|
+
project_name: { type: String },
|
|
33
|
+
project_lab: { type: String },
|
|
34
|
+
payment_condition: { type: String },
|
|
35
|
+
payment_exp: { type: String },
|
|
36
|
+
terms_ids: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "QuoteTerm" }],
|
|
37
|
+
currency_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Currency" },
|
|
38
|
+
iva: { type: String },
|
|
39
|
+
date: { type: Date },
|
|
40
|
+
status: { type: String, enum: Object.values(Status), default: Status.OPEN },
|
|
41
|
+
quote_status: {
|
|
42
|
+
type: String,
|
|
43
|
+
enum: Object.values(QuoteStatus),
|
|
44
|
+
default: QuoteStatus.OPPORTUNITY,
|
|
45
|
+
},
|
|
46
|
+
sap_id: { type: String },
|
|
47
|
+
sap_quotation_entry: { type: Number },
|
|
48
|
+
sap_order_entry: { type: Number },
|
|
49
|
+
pipedrive_id: { type: String },
|
|
50
|
+
should_sync: { type: Boolean, default: false },
|
|
51
|
+
pdf_download_link: { type: String },
|
|
52
|
+
notes: { type: String },
|
|
53
|
+
created_method: {
|
|
54
|
+
type: String,
|
|
55
|
+
enum: Object.values(CreatedMethod),
|
|
56
|
+
default: CreatedMethod.MANUAL,
|
|
57
|
+
},
|
|
58
|
+
created_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
59
|
+
updated_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
60
|
+
deleted_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
61
|
+
deleted_at: { type: Date },
|
|
62
|
+
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
63
|
+
exports.default = (0, mongoose_1.model)("Quote", quoteSchema, "quotes");
|