@fesmex/models 0.1.0 → 0.1.1

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,2 +1,4 @@
1
1
  export { default as ClientContact } from "./models/ClientsContact";
2
2
  export type { ClientContactType } from "./models/ClientsContact";
3
+ export { default as Client } from "./models/Clients";
4
+ export type { ClientType } from "./models/Clients";
@@ -3,6 +3,8 @@ 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.ClientContact = void 0;
6
+ exports.Client = exports.ClientContact = void 0;
7
7
  var ClientsContact_1 = require("./models/ClientsContact");
8
8
  Object.defineProperty(exports, "ClientContact", { enumerable: true, get: function () { return __importDefault(ClientsContact_1).default; } });
9
+ var Clients_1 = require("./models/Clients");
10
+ Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return __importDefault(Clients_1).default; } });
@@ -0,0 +1,19 @@
1
+ export interface ClientType {
2
+ sn_code?: string | null;
3
+ sn_name?: string | null;
4
+ tax_id?: string | null;
5
+ currency?: string | null;
6
+ phone_1?: string | null;
7
+ email?: string | null;
8
+ comments?: string | null;
9
+ pipedrive_id?: string | null;
10
+ sap_id?: string | null;
11
+ deleted_at?: Date | null;
12
+ deleted_by?: string | null;
13
+ created_at?: Date;
14
+ updated_at?: Date;
15
+ }
16
+ declare const _default: import("mongoose").Model<ClientType, {}, {}, {}, import("mongoose").Document<unknown, {}, ClientType> & ClientType & {
17
+ _id: import("mongoose").Types.ObjectId;
18
+ }, any>;
19
+ export default _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const clientSchema = new mongoose_1.Schema({
5
+ sn_code: { type: String, index: true },
6
+ sn_name: { type: String, required: true },
7
+ tax_id: { type: String },
8
+ currency: { type: String },
9
+ phone_1: { type: String },
10
+ email: { type: String },
11
+ comments: { type: String },
12
+ pipedrive_id: { type: String },
13
+ sap_id: { type: String },
14
+ deleted_at: { type: Date, default: null },
15
+ deleted_by: { type: String, default: null },
16
+ }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
17
+ exports.default = (0, mongoose_1.model)("Client", clientSchema, "clients");
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@fesmex/models",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
- "files": ["dist"],
6
+ "files": [
7
+ "dist"
8
+ ],
7
9
  "scripts": {
8
10
  "build": "tsc -p tsconfig.json"
9
11
  },
@@ -14,4 +16,4 @@
14
16
  "typescript": "^5",
15
17
  "@types/mongoose": "^5"
16
18
  }
17
- }
19
+ }