@fesmex/models 0.1.2 → 0.1.3

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.
@@ -1,4 +1,14 @@
1
- export { default as ClientContact } from "./models/ClientsContact";
2
- export type { ClientContactType } from "./models/ClientsContact";
3
1
  export { default as Client } from "./models/Clients";
4
2
  export type { ClientType } from "./models/Clients";
3
+ export { default as ClientContact } from "./models/ClientsContact";
4
+ export type { ClientContactType } from "./models/ClientsContact";
5
+ export { default as ClientAddress } from "./models/ClientsAddress";
6
+ export type { ClientAddressType } from "./models/ClientsAddress";
7
+ export { default as ClientPaymentMethod } from "./models/ClientsPaymentMethod";
8
+ export type { ClientPaymentMethodType } from "./models/ClientsPaymentMethod";
9
+ export { default as ClientPaymentTerm } from "./models/ClientsPaymentTerm";
10
+ export type { ClientPaymentTermType } from "./models/ClientsPaymentTerm";
11
+ export { default as ClientPriceList } from "./models/ClientsPriceList";
12
+ export type { ClientPriceListType } from "./models/ClientsPriceList";
13
+ export { default as ClientSalesEmployee } from "./models/ClientsSalesEmployee";
14
+ export type { ClientSalesEmployeeType } from "./models/ClientsSalesEmployee";
@@ -3,8 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Client = exports.ClientContact = void 0;
7
- var ClientsContact_1 = require("./models/ClientsContact");
8
- Object.defineProperty(exports, "ClientContact", { enumerable: true, get: function () { return __importDefault(ClientsContact_1).default; } });
6
+ exports.ClientSalesEmployee = exports.ClientPriceList = exports.ClientPaymentTerm = exports.ClientPaymentMethod = exports.ClientAddress = exports.ClientContact = exports.Client = void 0;
9
7
  var Clients_1 = require("./models/Clients");
10
8
  Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return __importDefault(Clients_1).default; } });
9
+ var ClientsContact_1 = require("./models/ClientsContact");
10
+ Object.defineProperty(exports, "ClientContact", { enumerable: true, get: function () { return __importDefault(ClientsContact_1).default; } });
11
+ var ClientsAddress_1 = require("./models/ClientsAddress");
12
+ Object.defineProperty(exports, "ClientAddress", { enumerable: true, get: function () { return __importDefault(ClientsAddress_1).default; } });
13
+ var ClientsPaymentMethod_1 = require("./models/ClientsPaymentMethod");
14
+ Object.defineProperty(exports, "ClientPaymentMethod", { enumerable: true, get: function () { return __importDefault(ClientsPaymentMethod_1).default; } });
15
+ var ClientsPaymentTerm_1 = require("./models/ClientsPaymentTerm");
16
+ Object.defineProperty(exports, "ClientPaymentTerm", { enumerable: true, get: function () { return __importDefault(ClientsPaymentTerm_1).default; } });
17
+ var ClientsPriceList_1 = require("./models/ClientsPriceList");
18
+ Object.defineProperty(exports, "ClientPriceList", { enumerable: true, get: function () { return __importDefault(ClientsPriceList_1).default; } });
19
+ var ClientsSalesEmployee_1 = require("./models/ClientsSalesEmployee");
20
+ Object.defineProperty(exports, "ClientSalesEmployee", { enumerable: true, get: function () { return __importDefault(ClientsSalesEmployee_1).default; } });
@@ -0,0 +1,17 @@
1
+ import { Types } from "mongoose";
2
+ export interface ClientAddressType {
3
+ client_id: Types.ObjectId;
4
+ address_name?: string | null;
5
+ street?: string | null;
6
+ neighborhood?: string | null;
7
+ postal_code?: string | null;
8
+ city?: string | null;
9
+ state?: string | null;
10
+ country?: string | null;
11
+ created_at?: Date;
12
+ updated_at?: Date;
13
+ }
14
+ declare const _default: import("mongoose").Model<ClientAddressType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientAddressType> & ClientAddressType & {
15
+ _id: Types.ObjectId;
16
+ }, any>;
17
+ export default _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientAddressSchema = new mongoose_1.Schema({
5
+ client_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "Client",
8
+ required: true,
9
+ index: true,
10
+ },
11
+ address_name: { type: String },
12
+ street: { type: String },
13
+ neighborhood: { type: String },
14
+ postal_code: { type: String },
15
+ city: { type: String },
16
+ state: { type: String },
17
+ country: { type: String },
18
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
19
+ exports.default = (0, mongoose_1.model)("ClientAddress", clientAddressSchema, "client_addresses");
@@ -0,0 +1,12 @@
1
+ import { Types } from "mongoose";
2
+ export interface ClientPaymentMethodType {
3
+ client_id: Types.ObjectId;
4
+ code?: string | null;
5
+ description?: string | null;
6
+ created_at?: Date;
7
+ updated_at?: Date;
8
+ }
9
+ declare const _default: import("mongoose").Model<ClientPaymentMethodType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientPaymentMethodType> & ClientPaymentMethodType & {
10
+ _id: Types.ObjectId;
11
+ }, any>;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientPaymentMethodSchema = new mongoose_1.Schema({
5
+ client_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "Client",
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ code: { type: String },
12
+ description: { type: String },
13
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
14
+ exports.default = (0, mongoose_1.model)("ClientPaymentMethod", clientPaymentMethodSchema, "client_payment_methods");
@@ -0,0 +1,12 @@
1
+ import { Types } from "mongoose";
2
+ export interface ClientPaymentTermType {
3
+ client_id: Types.ObjectId;
4
+ code?: string | null;
5
+ name?: string | null;
6
+ created_at?: Date;
7
+ updated_at?: Date;
8
+ }
9
+ declare const _default: import("mongoose").Model<ClientPaymentTermType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientPaymentTermType> & ClientPaymentTermType & {
10
+ _id: Types.ObjectId;
11
+ }, any>;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientPaymentTermSchema = new mongoose_1.Schema({
5
+ client_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "Client",
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ code: { type: String },
12
+ name: { type: String },
13
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
14
+ exports.default = (0, mongoose_1.model)("ClientPaymentTerm", clientPaymentTermSchema, "client_payment_terms");
@@ -0,0 +1,12 @@
1
+ import { Types } from "mongoose";
2
+ export interface ClientPriceListType {
3
+ client_id: Types.ObjectId;
4
+ number?: string | null;
5
+ name?: string | null;
6
+ created_at?: Date;
7
+ updated_at?: Date;
8
+ }
9
+ declare const _default: import("mongoose").Model<ClientPriceListType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientPriceListType> & ClientPriceListType & {
10
+ _id: Types.ObjectId;
11
+ }, any>;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientPriceListSchema = new mongoose_1.Schema({
5
+ client_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "Client",
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ number: { type: String },
12
+ name: { type: String },
13
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
14
+ exports.default = (0, mongoose_1.model)("ClientPriceList", clientPriceListSchema, "client_price_lists");
@@ -0,0 +1,12 @@
1
+ import { Types } from "mongoose";
2
+ export interface ClientSalesEmployeeType {
3
+ client_id: Types.ObjectId;
4
+ employee_code?: string | null;
5
+ employee_name?: string | null;
6
+ created_at?: Date;
7
+ updated_at?: Date;
8
+ }
9
+ declare const _default: import("mongoose").Model<ClientSalesEmployeeType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientSalesEmployeeType> & ClientSalesEmployeeType & {
10
+ _id: Types.ObjectId;
11
+ }, any>;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientSalesEmployeeSchema = new mongoose_1.Schema({
5
+ client_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "Client",
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ employee_code: { type: String },
12
+ employee_name: { type: String },
13
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
14
+ exports.default = (0, mongoose_1.model)("ClientSalesEmployee", clientSalesEmployeeSchema, "client_sales_employees");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fesmex/models",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [