@fesmex/models 0.1.21 → 0.1.23

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/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import * as mongoose from 'mongoose';
2
- import mongoose__default, { Types, Document } from 'mongoose';
1
+ import mongoose, { Types, Document } from 'mongoose';
3
2
 
4
3
  interface ClientType {
5
4
  sn_code?: string | null;
@@ -135,15 +134,15 @@ interface CustomerType {
135
134
  mobile?: string;
136
135
  password: string;
137
136
  status: CustomerStatus;
138
- fiscal_profile_id?: mongoose__default.Types.ObjectId;
137
+ fiscal_profile_id?: mongoose.Types.ObjectId;
139
138
  created_at: Date;
140
139
  updated_at?: Date;
141
140
  deleted_at?: Date;
142
141
  }
143
- declare const _default$5: mongoose__default.Model<any, {}, {}, {}, any, any>;
142
+ declare const _default$5: mongoose.Model<any, {}, {}, {}, any, any>;
144
143
 
145
144
  interface FiscalProfileType {
146
- customer_id: mongoose__default.Types.ObjectId;
145
+ customer_id: mongoose.Types.ObjectId;
147
146
  rfc: string;
148
147
  razon_social: string;
149
148
  uso_cfdi: string;
@@ -152,7 +151,7 @@ interface FiscalProfileType {
152
151
  created_at: Date;
153
152
  updated_at?: Date;
154
153
  }
155
- declare const _default$4: mongoose__default.Model<any, {}, {}, {}, any, any>;
154
+ declare const _default$4: mongoose.Model<any, {}, {}, {}, any, any>;
156
155
 
157
156
  declare enum OrderStatus {
158
157
  PENDING = "pending",
@@ -238,18 +237,18 @@ interface UserType {
238
237
  sap_employee_id?: string;
239
238
  sap_id?: string;
240
239
  created_at: Date;
241
- created_by?: mongoose__default.Types.ObjectId | string;
240
+ created_by?: mongoose.Types.ObjectId | string;
242
241
  updated_at?: Date;
243
- updated_by?: mongoose__default.Types.ObjectId;
242
+ updated_by?: mongoose.Types.ObjectId;
244
243
  deleted_at?: Date;
245
- deleted_by?: mongoose__default.Types.ObjectId;
244
+ deleted_by?: mongoose.Types.ObjectId;
246
245
  }
247
- declare const _default$1: mongoose__default.Model<any, {}, {}, {}, any, any>;
246
+ declare const _default$1: mongoose.Model<any, {}, {}, {}, any, any>;
248
247
 
249
248
  interface AnnouncementType {
250
- created_by: mongoose__default.Types.ObjectId;
251
- updated_by?: mongoose__default.Types.ObjectId;
252
- deleted_by?: mongoose__default.Types.ObjectId;
249
+ created_by: mongoose.Types.ObjectId;
250
+ updated_by?: mongoose.Types.ObjectId;
251
+ deleted_by?: mongoose.Types.ObjectId;
253
252
  created_at: Date;
254
253
  updated_at?: Date;
255
254
  deleted_at?: Date;
@@ -257,6 +256,6 @@ interface AnnouncementType {
257
256
  text: string;
258
257
  roles: UserRole[];
259
258
  }
260
- declare const _default: mongoose__default.Model<any, {}, {}, {}, any, any>;
259
+ declare const _default: mongoose.Model<any, {}, {}, {}, any, any>;
261
260
 
262
261
  export { _default as Announcement, type AnnouncementType, _default$i as Article, _default$g as ArticleClass, _default$h as ArticleGroup, _default$f as ArticlePrice, _default$p as Client, _default$n as ClientAddress, type ClientAddressType, _default$o as ClientContact, type ClientContactType, _default$m as ClientPaymentMethod, type ClientPaymentMethodType, _default$l as ClientPaymentTerm, type ClientPaymentTermType, _default$k as ClientPriceList, type ClientPriceListType, _default$j as ClientSalesEmployee, type ClientSalesEmployeeType, type ClientType, CreatedMethod, _default$e as Currency, _default$5 as Customer, CustomerStatus, type CustomerType, _default$4 as FiscalProfile, type FiscalProfileType, type ISyncLog, _default$c as InventoryStock, _default$3 as Order, OrderStatus, _default$2 as OrderStatusLog, type OrderStatusLogType, _default$b as PriceList, _default$a as Quote, _default$9 as QuoteArticle, _default$8 as QuoteArticleExtra, _default$7 as QuoteContact, QuoteStatus, _default$6 as QuoteTerm, Status, SyncLog, SyncLogAction, SyncLogStatus, SyncLogType, UserRole, UserStatus, type UserType, _default$1 as Users, _default$d as Warehouse };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import * as mongoose from 'mongoose';
2
- import mongoose__default, { Types, Document } from 'mongoose';
1
+ import mongoose, { Types, Document } from 'mongoose';
3
2
 
4
3
  interface ClientType {
5
4
  sn_code?: string | null;
@@ -135,15 +134,15 @@ interface CustomerType {
135
134
  mobile?: string;
136
135
  password: string;
137
136
  status: CustomerStatus;
138
- fiscal_profile_id?: mongoose__default.Types.ObjectId;
137
+ fiscal_profile_id?: mongoose.Types.ObjectId;
139
138
  created_at: Date;
140
139
  updated_at?: Date;
141
140
  deleted_at?: Date;
142
141
  }
143
- declare const _default$5: mongoose__default.Model<any, {}, {}, {}, any, any>;
142
+ declare const _default$5: mongoose.Model<any, {}, {}, {}, any, any>;
144
143
 
145
144
  interface FiscalProfileType {
146
- customer_id: mongoose__default.Types.ObjectId;
145
+ customer_id: mongoose.Types.ObjectId;
147
146
  rfc: string;
148
147
  razon_social: string;
149
148
  uso_cfdi: string;
@@ -152,7 +151,7 @@ interface FiscalProfileType {
152
151
  created_at: Date;
153
152
  updated_at?: Date;
154
153
  }
155
- declare const _default$4: mongoose__default.Model<any, {}, {}, {}, any, any>;
154
+ declare const _default$4: mongoose.Model<any, {}, {}, {}, any, any>;
156
155
 
157
156
  declare enum OrderStatus {
158
157
  PENDING = "pending",
@@ -238,18 +237,18 @@ interface UserType {
238
237
  sap_employee_id?: string;
239
238
  sap_id?: string;
240
239
  created_at: Date;
241
- created_by?: mongoose__default.Types.ObjectId | string;
240
+ created_by?: mongoose.Types.ObjectId | string;
242
241
  updated_at?: Date;
243
- updated_by?: mongoose__default.Types.ObjectId;
242
+ updated_by?: mongoose.Types.ObjectId;
244
243
  deleted_at?: Date;
245
- deleted_by?: mongoose__default.Types.ObjectId;
244
+ deleted_by?: mongoose.Types.ObjectId;
246
245
  }
247
- declare const _default$1: mongoose__default.Model<any, {}, {}, {}, any, any>;
246
+ declare const _default$1: mongoose.Model<any, {}, {}, {}, any, any>;
248
247
 
249
248
  interface AnnouncementType {
250
- created_by: mongoose__default.Types.ObjectId;
251
- updated_by?: mongoose__default.Types.ObjectId;
252
- deleted_by?: mongoose__default.Types.ObjectId;
249
+ created_by: mongoose.Types.ObjectId;
250
+ updated_by?: mongoose.Types.ObjectId;
251
+ deleted_by?: mongoose.Types.ObjectId;
253
252
  created_at: Date;
254
253
  updated_at?: Date;
255
254
  deleted_at?: Date;
@@ -257,6 +256,6 @@ interface AnnouncementType {
257
256
  text: string;
258
257
  roles: UserRole[];
259
258
  }
260
- declare const _default: mongoose__default.Model<any, {}, {}, {}, any, any>;
259
+ declare const _default: mongoose.Model<any, {}, {}, {}, any, any>;
261
260
 
262
261
  export { _default as Announcement, type AnnouncementType, _default$i as Article, _default$g as ArticleClass, _default$h as ArticleGroup, _default$f as ArticlePrice, _default$p as Client, _default$n as ClientAddress, type ClientAddressType, _default$o as ClientContact, type ClientContactType, _default$m as ClientPaymentMethod, type ClientPaymentMethodType, _default$l as ClientPaymentTerm, type ClientPaymentTermType, _default$k as ClientPriceList, type ClientPriceListType, _default$j as ClientSalesEmployee, type ClientSalesEmployeeType, type ClientType, CreatedMethod, _default$e as Currency, _default$5 as Customer, CustomerStatus, type CustomerType, _default$4 as FiscalProfile, type FiscalProfileType, type ISyncLog, _default$c as InventoryStock, _default$3 as Order, OrderStatus, _default$2 as OrderStatusLog, type OrderStatusLogType, _default$b as PriceList, _default$a as Quote, _default$9 as QuoteArticle, _default$8 as QuoteArticleExtra, _default$7 as QuoteContact, QuoteStatus, _default$6 as QuoteTerm, Status, SyncLog, SyncLogAction, SyncLogStatus, SyncLogType, UserRole, UserStatus, type UserType, _default$1 as Users, _default$d as Warehouse };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/clients/models/Clients.ts
2
- import { Schema, model, models } from "mongoose";
2
+ import mongoose, { Schema, model } from "mongoose";
3
3
  var clientSchema = new Schema(
4
4
  {
5
5
  sn_code: { type: String, index: true },
@@ -16,10 +16,10 @@ var clientSchema = new Schema(
16
16
  },
17
17
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
18
18
  );
19
- var Clients_default = models.Client || model("Client", clientSchema, "clients");
19
+ var Clients_default = mongoose.models.Client || model("Client", clientSchema, "clients");
20
20
 
21
21
  // src/clients/models/ClientsContact.ts
22
- import { Schema as Schema2, model as model2, models as models2 } from "mongoose";
22
+ import mongoose2, { Schema as Schema2, model as model2 } from "mongoose";
23
23
  var clientContactSchema = new Schema2(
24
24
  {
25
25
  client_id: {
@@ -37,10 +37,10 @@ var clientContactSchema = new Schema2(
37
37
  },
38
38
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
39
39
  );
40
- var ClientsContact_default = models2.ClientContact || model2("ClientContact", clientContactSchema, "client_contacts");
40
+ var ClientsContact_default = mongoose2.models.ClientContact || model2("ClientContact", clientContactSchema, "client_contacts");
41
41
 
42
42
  // src/clients/models/ClientsAddress.ts
43
- import { Schema as Schema3, model as model3, models as models3 } from "mongoose";
43
+ import mongoose3, { Schema as Schema3, model as model3 } from "mongoose";
44
44
  var clientAddressSchema = new Schema3(
45
45
  {
46
46
  client_id: {
@@ -59,14 +59,14 @@ var clientAddressSchema = new Schema3(
59
59
  },
60
60
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
61
61
  );
62
- var ClientsAddress_default = models3.ClientAddress || model3(
62
+ var ClientsAddress_default = mongoose3.models.ClientAddress || model3(
63
63
  "ClientAddress",
64
64
  clientAddressSchema,
65
65
  "client_addresses"
66
66
  );
67
67
 
68
68
  // src/clients/models/ClientsPaymentMethod.ts
69
- import { Schema as Schema4, model as model4, models as models4 } from "mongoose";
69
+ import mongoose4, { Schema as Schema4, model as model4 } from "mongoose";
70
70
  var clientPaymentMethodSchema = new Schema4(
71
71
  {
72
72
  client_id: {
@@ -80,14 +80,14 @@ var clientPaymentMethodSchema = new Schema4(
80
80
  },
81
81
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
82
82
  );
83
- var ClientsPaymentMethod_default = models4.ClientPaymentMethod || model4(
83
+ var ClientsPaymentMethod_default = mongoose4.models.ClientPaymentMethod || model4(
84
84
  "ClientPaymentMethod",
85
85
  clientPaymentMethodSchema,
86
86
  "client_payment_methods"
87
87
  );
88
88
 
89
89
  // src/clients/models/ClientsPaymentTerm.ts
90
- import { Schema as Schema5, model as model5, models as models5 } from "mongoose";
90
+ import mongoose5, { Schema as Schema5, model as model5 } from "mongoose";
91
91
  var clientPaymentTermSchema = new Schema5(
92
92
  {
93
93
  client_id: {
@@ -101,14 +101,14 @@ var clientPaymentTermSchema = new Schema5(
101
101
  },
102
102
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
103
103
  );
104
- var ClientsPaymentTerm_default = models5.ClientPaymentTerm || model5(
104
+ var ClientsPaymentTerm_default = mongoose5.models.ClientPaymentTerm || model5(
105
105
  "ClientPaymentTerm",
106
106
  clientPaymentTermSchema,
107
107
  "client_payment_terms"
108
108
  );
109
109
 
110
110
  // src/clients/models/ClientsPriceList.ts
111
- import { Schema as Schema6, model as model6, models as models6 } from "mongoose";
111
+ import mongoose6, { Schema as Schema6, model as model6 } from "mongoose";
112
112
  var clientPriceListSchema = new Schema6(
113
113
  {
114
114
  client_id: {
@@ -122,14 +122,14 @@ var clientPriceListSchema = new Schema6(
122
122
  },
123
123
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
124
124
  );
125
- var ClientsPriceList_default = models6.ClientPriceList || model6(
125
+ var ClientsPriceList_default = mongoose6.models.ClientPriceList || model6(
126
126
  "ClientPriceList",
127
127
  clientPriceListSchema,
128
128
  "client_price_lists"
129
129
  );
130
130
 
131
131
  // src/clients/models/ClientsSalesEmployee.ts
132
- import { Schema as Schema7, model as model7, models as models7 } from "mongoose";
132
+ import mongoose7, { Schema as Schema7, model as model7 } from "mongoose";
133
133
  var clientSalesEmployeeSchema = new Schema7(
134
134
  {
135
135
  client_id: {
@@ -143,14 +143,14 @@ var clientSalesEmployeeSchema = new Schema7(
143
143
  },
144
144
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
145
145
  );
146
- var ClientsSalesEmployee_default = models7.ClientSalesEmployee || model7(
146
+ var ClientsSalesEmployee_default = mongoose7.models.ClientSalesEmployee || model7(
147
147
  "ClientSalesEmployee",
148
148
  clientSalesEmployeeSchema,
149
149
  "client_sales_employees"
150
150
  );
151
151
 
152
152
  // src/inventory/models/Article.ts
153
- import { Schema as Schema8, model as model8, models as models8, Types as Types7 } from "mongoose";
153
+ import mongoose8, { Schema as Schema8, model as model8, Types as Types7 } from "mongoose";
154
154
  var articleSchema = new Schema8({
155
155
  article_number: { type: String, required: true, unique: true },
156
156
  // SAP ItemCode
@@ -162,26 +162,26 @@ var articleSchema = new Schema8({
162
162
  created_at: { type: Date, default: Date.now },
163
163
  updated_at: { type: Date }
164
164
  });
165
- var Article_default = models8.Article || model8("Article", articleSchema, "articles");
165
+ var Article_default = mongoose8.models.Article || model8("Article", articleSchema, "articles");
166
166
 
167
167
  // src/inventory/models/ArticleGroups.ts
168
- import { Schema as Schema9, model as model9, models as models9 } from "mongoose";
168
+ import mongoose9, { Schema as Schema9, model as model9 } from "mongoose";
169
169
  var articleGroupSchema = new Schema9({
170
170
  name: { type: String, required: true },
171
171
  description: { type: String }
172
172
  });
173
- var ArticleGroups_default = models9.ArticleGroup || model9("ArticleGroup", articleGroupSchema, "article_groups");
173
+ var ArticleGroups_default = mongoose9.models.ArticleGroup || model9("ArticleGroup", articleGroupSchema, "article_groups");
174
174
 
175
175
  // src/inventory/models/ArticleClasses.ts
176
- import { Schema as Schema10, model as model10, models as models10 } from "mongoose";
176
+ import mongoose10, { Schema as Schema10, model as model10 } from "mongoose";
177
177
  var articleClassSchema = new Schema10({
178
178
  name: { type: String, required: true },
179
179
  description: { type: String }
180
180
  });
181
- var ArticleClasses_default = models10.ArticleClass || model10("ArticleClass", articleClassSchema, "article_classes");
181
+ var ArticleClasses_default = mongoose10.models.ArticleClass || model10("ArticleClass", articleClassSchema, "article_classes");
182
182
 
183
183
  // src/inventory/models/ArticlePrices.ts
184
- import { Schema as Schema11, model as model11, models as models11, Types as Types8 } from "mongoose";
184
+ import mongoose11, { Schema as Schema11, model as model11, Types as Types8 } from "mongoose";
185
185
  var articlePriceSchema = new Schema11({
186
186
  article_id: { type: Types8.ObjectId, ref: "Article", required: true },
187
187
  price_list_id: { type: Types8.ObjectId, ref: "PriceList", required: true },
@@ -192,19 +192,19 @@ var articlePriceSchema = new Schema11({
192
192
  created_at: { type: Date, default: Date.now },
193
193
  updated_at: { type: Date }
194
194
  });
195
- var ArticlePrices_default = models11.ArticlePrice || model11("ArticlePrice", articlePriceSchema, "article_prices");
195
+ var ArticlePrices_default = mongoose11.models.ArticlePrice || model11("ArticlePrice", articlePriceSchema, "article_prices");
196
196
 
197
197
  // src/inventory/models/Currencies.ts
198
- import { Schema as Schema12, model as model12, models as models12 } from "mongoose";
198
+ import mongoose12, { Schema as Schema12, model as model12 } from "mongoose";
199
199
  var currencySchema = new Schema12({
200
200
  code: { type: String, required: true, unique: true },
201
201
  symbol: { type: String, required: true },
202
202
  name: { type: String, required: true }
203
203
  });
204
- var Currencies_default = models12.Currency || model12("Currency", currencySchema, "currencies");
204
+ var Currencies_default = mongoose12.models.Currency || model12("Currency", currencySchema, "currencies");
205
205
 
206
206
  // src/inventory/models/Warehouses.ts
207
- import { Schema as Schema13, model as model13, models as models13 } from "mongoose";
207
+ import mongoose13, { Schema as Schema13, model as model13 } from "mongoose";
208
208
  var warehouseSchema = new Schema13({
209
209
  code: { type: String, required: true, unique: true },
210
210
  name: { type: String, required: true },
@@ -212,10 +212,10 @@ var warehouseSchema = new Schema13({
212
212
  created_at: { type: Date, default: Date.now },
213
213
  updated_at: { type: Date }
214
214
  });
215
- var Warehouses_default = models13.Warehouse || model13("Warehouse", warehouseSchema, "warehouses");
215
+ var Warehouses_default = mongoose13.models.Warehouse || model13("Warehouse", warehouseSchema, "warehouses");
216
216
 
217
217
  // src/inventory/models/InventoryStocks.ts
218
- import { Schema as Schema14, model as model14, models as models14, Types as Types9 } from "mongoose";
218
+ import mongoose14, { Schema as Schema14, model as model14, Types as Types9 } from "mongoose";
219
219
  var inventoryStockSchema = new Schema14({
220
220
  article_id: { type: Types9.ObjectId, ref: "Article", required: true },
221
221
  warehouse_id: { type: Types9.ObjectId, ref: "Warehouse", required: true },
@@ -224,20 +224,20 @@ var inventoryStockSchema = new Schema14({
224
224
  max_stock: { type: Number },
225
225
  updated_at: { type: Date, default: Date.now }
226
226
  });
227
- var InventoryStocks_default = models14.InventoryStock || model14("InventoryStock", inventoryStockSchema, "inventory_stocks");
227
+ var InventoryStocks_default = mongoose14.models.InventoryStock || model14("InventoryStock", inventoryStockSchema, "inventory_stocks");
228
228
 
229
229
  // src/inventory/models/PriceLists.ts
230
- import { Schema as Schema15, model as model15, models as models15 } from "mongoose";
230
+ import mongoose15, { Schema as Schema15, model as model15 } from "mongoose";
231
231
  var priceListSchema = new Schema15({
232
232
  number: { type: String, required: true, unique: true },
233
233
  name: { type: String, required: true },
234
234
  created_at: { type: Date, default: Date.now },
235
235
  updated_at: { type: Date }
236
236
  });
237
- var PriceLists_default = models15.PriceList || model15("PriceList", priceListSchema, "price_lists");
237
+ var PriceLists_default = mongoose15.models.PriceList || model15("PriceList", priceListSchema, "price_lists");
238
238
 
239
239
  // src/quotes/models/Quote.ts
240
- import { Schema as Schema16, model as model16, models as models16 } from "mongoose";
240
+ import mongoose16, { Schema as Schema16, model as model16 } from "mongoose";
241
241
  var QuoteStatus = /* @__PURE__ */ ((QuoteStatus2) => {
242
242
  QuoteStatus2["OPPORTUNITY"] = "OPPORTUNITY";
243
243
  QuoteStatus2["QUOTE"] = "QUOTE";
@@ -299,10 +299,10 @@ var quoteSchema = new Schema16(
299
299
  },
300
300
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
301
301
  );
302
- var Quote_default = models16.Quote || model16("Quote", quoteSchema, "quotes");
302
+ var Quote_default = mongoose16.models.Quote || model16("Quote", quoteSchema, "quotes");
303
303
 
304
304
  // src/quotes/models/QuoteArticle.ts
305
- import { Schema as Schema17, model as model17, models as models17 } from "mongoose";
305
+ import mongoose17, { Schema as Schema17, model as model17 } from "mongoose";
306
306
  var quoteArticleSchema = new Schema17(
307
307
  {
308
308
  quote_id: { type: Schema17.Types.ObjectId, ref: "Quote", required: true },
@@ -321,10 +321,10 @@ var quoteArticleSchema = new Schema17(
321
321
  },
322
322
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
323
323
  );
324
- var QuoteArticle_default = models17.QuoteArticle || model17("QuoteArticle", quoteArticleSchema, "quote_articles");
324
+ var QuoteArticle_default = mongoose17.models.QuoteArticle || model17("QuoteArticle", quoteArticleSchema, "quote_articles");
325
325
 
326
326
  // src/quotes/models/QuoteArticleExtra.ts
327
- import { Schema as Schema18, model as model18, models as models18 } from "mongoose";
327
+ import mongoose18, { Schema as Schema18, model as model18 } from "mongoose";
328
328
  var quoteArticleExtraSchema = new Schema18(
329
329
  {
330
330
  quote_article_id: {
@@ -340,10 +340,10 @@ var quoteArticleExtraSchema = new Schema18(
340
340
  },
341
341
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
342
342
  );
343
- var QuoteArticleExtra_default = models18.QuoteArticleExtra || model18("QuoteArticleExtra", quoteArticleExtraSchema, "quote_article_extras");
343
+ var QuoteArticleExtra_default = mongoose18.models.QuoteArticleExtra || model18("QuoteArticleExtra", quoteArticleExtraSchema, "quote_article_extras");
344
344
 
345
345
  // src/quotes/models/QuoteContact.ts
346
- import { Schema as Schema19, model as model19, models as models19 } from "mongoose";
346
+ import mongoose19, { Schema as Schema19, model as model19 } from "mongoose";
347
347
  var quoteContactSchema = new Schema19({
348
348
  quote_id: { type: Schema19.Types.ObjectId, ref: "Quote", required: true },
349
349
  name: String,
@@ -352,10 +352,10 @@ var quoteContactSchema = new Schema19({
352
352
  pipedrive_id: String,
353
353
  created_at: { type: Date, default: Date.now }
354
354
  });
355
- var QuoteContact_default = models19.QuoteContact || model19("QuoteContact", quoteContactSchema, "quote_contacts");
355
+ var QuoteContact_default = mongoose19.models.QuoteContact || model19("QuoteContact", quoteContactSchema, "quote_contacts");
356
356
 
357
357
  // src/quotes/models/QuoteTerm.ts
358
- import { Schema as Schema20, model as model20, models as models20 } from "mongoose";
358
+ import mongoose20, { Schema as Schema20, model as model20 } from "mongoose";
359
359
  var quoteTermSchema = new Schema20(
360
360
  {
361
361
  title: String,
@@ -367,10 +367,10 @@ var quoteTermSchema = new Schema20(
367
367
  },
368
368
  { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } }
369
369
  );
370
- var QuoteTerm_default = models20.QuoteTerm || model20("QuoteTerm", quoteTermSchema, "quote_terms");
370
+ var QuoteTerm_default = mongoose20.models.QuoteTerm || model20("QuoteTerm", quoteTermSchema, "quote_terms");
371
371
 
372
372
  // src/customers/models/Customers.ts
373
- import { Schema as Schema21, model as model21, models as models21 } from "mongoose";
373
+ import mongoose21, { Schema as Schema21, model as model21 } from "mongoose";
374
374
  import bcrypt from "bcryptjs";
375
375
  var CustomerStatus = /* @__PURE__ */ ((CustomerStatus2) => {
376
376
  CustomerStatus2["ACTIVE"] = "active";
@@ -400,10 +400,10 @@ customerSchema.pre("save", async function(next) {
400
400
  }
401
401
  next();
402
402
  });
403
- var Customers_default = models21.Customer || model21("Customer", customerSchema, "customers");
403
+ var Customers_default = mongoose21.models.Customer || model21("Customer", customerSchema, "customers");
404
404
 
405
405
  // src/customers/models/FiscalProfileType.ts
406
- import { Schema as Schema22, model as model22, models as models22 } from "mongoose";
406
+ import mongoose22, { Schema as Schema22, model as model22 } from "mongoose";
407
407
  var fiscalProfileSchema = new Schema22({
408
408
  customer_id: { type: Schema22.Types.ObjectId, ref: "Customer", required: true },
409
409
  rfc: { type: String, required: true },
@@ -414,10 +414,10 @@ var fiscalProfileSchema = new Schema22({
414
414
  created_at: { type: Date, default: Date.now },
415
415
  updated_at: { type: Date }
416
416
  });
417
- var FiscalProfileType_default = models22.FiscalProfile || model22("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
417
+ var FiscalProfileType_default = mongoose22.models.FiscalProfile || model22("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
418
418
 
419
419
  // src/orders/models/Orders.ts
420
- import { Schema as Schema23, model as model23, models as models23 } from "mongoose";
420
+ import mongoose23, { Schema as Schema23, model as model23 } from "mongoose";
421
421
  var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
422
422
  OrderStatus2["PENDING"] = "pending";
423
423
  OrderStatus2["CONFIRMED"] = "confirmed";
@@ -449,10 +449,10 @@ var orderSchema = new Schema23({
449
449
  created_at: { type: Date, default: Date.now },
450
450
  updated_at: { type: Date }
451
451
  });
452
- var Orders_default = models23.Order || model23("Order", orderSchema, "orders");
452
+ var Orders_default = mongoose23.models.Order || model23("Order", orderSchema, "orders");
453
453
 
454
454
  // src/orders/models/OrderStatusLogs.ts
455
- import { Schema as Schema24, model as model24, models as models24 } from "mongoose";
455
+ import mongoose24, { Schema as Schema24, model as model24 } from "mongoose";
456
456
  var orderStatusLogSchema = new Schema24({
457
457
  order_id: {
458
458
  type: Schema24.Types.ObjectId,
@@ -477,10 +477,10 @@ var orderStatusLogSchema = new Schema24({
477
477
  type: String
478
478
  }
479
479
  });
480
- var OrderStatusLogs_default = models24.OrderStatusLog || model24("OrderStatusLog", orderStatusLogSchema, "order_status_logs");
480
+ var OrderStatusLogs_default = mongoose24.models.OrderStatusLog || model24("OrderStatusLog", orderStatusLogSchema, "order_status_logs");
481
481
 
482
482
  // src/sap/models/SyncLog.ts
483
- import { Schema as Schema25, model as model25, models as models25 } from "mongoose";
483
+ import mongoose25, { Schema as Schema25, model as model25 } from "mongoose";
484
484
  var SyncLogType = /* @__PURE__ */ ((SyncLogType2) => {
485
485
  SyncLogType2["SAP_QUOTATION"] = "SAP_QUOTATION";
486
486
  SyncLogType2["SAP_SALES_ORDER"] = "SAP_SALES_ORDER";
@@ -546,13 +546,13 @@ var syncLogSchema = new Schema25(
546
546
  );
547
547
  syncLogSchema.index({ entity_type: 1, entity_id: 1, status: 1 });
548
548
  syncLogSchema.index({ status: 1, next_retry_at: 1 });
549
- var SyncLog = models25.SyncLog || model25("SyncLog", syncLogSchema, "sync_logs");
549
+ var SyncLog = mongoose25.models.SyncLog || model25("SyncLog", syncLogSchema, "sync_logs");
550
550
 
551
551
  // src/announcements/models/Announcements.ts
552
- import { Schema as Schema27, model as model27, models as models27 } from "mongoose";
552
+ import mongoose27, { Schema as Schema27, model as model27 } from "mongoose";
553
553
 
554
554
  // src/users/models/Users.ts
555
- import { Schema as Schema26, model as model26, models as models26 } from "mongoose";
555
+ import mongoose26, { Schema as Schema26, model as model26 } from "mongoose";
556
556
  import bcrypt2 from "bcryptjs";
557
557
  var UserRole = /* @__PURE__ */ ((UserRole2) => {
558
558
  UserRole2["ADMIN"] = "admin";
@@ -601,7 +601,7 @@ usersSchema.pre("save", async function(next) {
601
601
  }
602
602
  next();
603
603
  });
604
- var Users_default = models26.User || model26("User", usersSchema, "users");
604
+ var Users_default = mongoose26.models.User || model26("User", usersSchema, "users");
605
605
 
606
606
  // src/announcements/models/Announcements.ts
607
607
  var announcementSchema = new Schema27({
@@ -644,7 +644,7 @@ var announcementSchema = new Schema27({
644
644
  }
645
645
  }
646
646
  });
647
- var Announcements_default = models27.Announcement || model27("Announcement", announcementSchema, "announcements");
647
+ var Announcements_default = mongoose27.models.Announcement || model27("Announcement", announcementSchema, "announcements");
648
648
  export {
649
649
  Announcements_default as Announcement,
650
650
  Article_default as Article,