pristine-member-nest-api-database 1.0.41 → 1.0.43

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.
@@ -36,6 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.mongoMember = void 0;
37
37
  const mongoose_1 = __importStar(require("mongoose"));
38
38
  mongoose_1.default.set("strictPopulate", false);
39
+ // File schema
40
+ const fileSchema = new mongoose_1.Schema({
41
+ baseURL: { type: String, required: true },
42
+ fileName: { type: String, required: true },
43
+ fileExtension: { type: String, required: true },
44
+ });
39
45
  const memberSchema = new mongoose_1.Schema({
40
46
  memberId: { type: Number },
41
47
  memberCode: { type: String, default: "" },
@@ -43,9 +49,13 @@ const memberSchema = new mongoose_1.Schema({
43
49
  isMemberOfMasterBranch: { type: Boolean, default: false },
44
50
  taxIdentificationNo: { type: String },
45
51
  vatNo: { type: String },
52
+ vatAttachment: fileSchema,
46
53
  svatNo: { type: String },
54
+ svatAttachment: fileSchema,
47
55
  brNo: { type: String, default: "" },
56
+ brAttachment: fileSchema,
48
57
  nicNo: { type: String, default: "" },
58
+ nicAttachment: fileSchema,
49
59
  webSite: { type: String, default: "" },
50
60
  generalTelNo: { type: String },
51
61
  generalEmail: { type: String },
@@ -58,19 +68,20 @@ const memberSchema = new mongoose_1.Schema({
58
68
  city: { type: String },
59
69
  country: { type: String },
60
70
  },
71
+ otherAttachment: [fileSchema],
61
72
  typeOfOrganization: {
62
73
  type: mongoose_1.Schema.Types.ObjectId,
63
74
  ref: "OrganizationType.Master",
64
75
  },
65
76
  natureOfBusiness: {
66
- type: mongoose_1.Schema.Types.ObjectId,
77
+ type: [mongoose_1.Schema.Types.ObjectId],
67
78
  ref: "NatureOfBusiness.Master",
68
79
  },
69
80
  mainProductsOrServices: {
70
- type: mongoose_1.Schema.Types.ObjectId,
81
+ type: [mongoose_1.Schema.Types.ObjectId],
71
82
  ref: "Products.ServicesMaster",
72
83
  },
73
- countryOfExportsOrImports: { type: String, default: "" },
84
+ countryOfExportsOrImports: { type: [String], default: [] },
74
85
  noOfExecutiveEmployees: { type: Number, default: 0 },
75
86
  noOfNoneOfExecutiveEmployees: { type: Number, default: 0 },
76
87
  keyExecutivesDetails: {
@@ -126,6 +137,8 @@ const memberSchema = new mongoose_1.Schema({
126
137
  contactEmail1: { type: String },
127
138
  contactDesignation: { type: String },
128
139
  contactAddress: { type: String },
140
+ contactAddress2: { type: String },
141
+ city: { type: String },
129
142
  isSAPSynced: { type: Boolean, default: false },
130
143
  lastSyncedOn: { type: Date, default: null },
131
144
  },
@@ -1,5 +1,6 @@
1
1
  import mongoose, { Document, Schema } from "mongoose";
2
2
  import { Audit } from "../interface/Audit.interface";
3
+ import IFile from "../interface/IFile.interface";
3
4
 
4
5
  type keyExecutivesDetails = {
5
6
  chairmanName: string;
@@ -42,6 +43,8 @@ type MemberContactInfo = {
42
43
  contactEmail1: string;
43
44
  contactDesignation: string;
44
45
  contactAddress: string;
46
+ contactAddress2: String;
47
+ city: String;
45
48
  isSAPSynced: boolean;
46
49
  lastSyncedOn: Date;
47
50
  };
@@ -107,19 +110,24 @@ interface MemberDocument extends Document {
107
110
  isMemberOfMasterBranch: boolean;
108
111
  taxIdentificationNo: string;
109
112
  vatNo: string;
113
+ vatAttachment: IFile;
110
114
  svatNo: string;
115
+ svatAttachment: IFile;
111
116
  brNo: string;
117
+ brAttachment: IFile;
112
118
  nicNo: string;
119
+ nicAttachment: IFile;
113
120
  webSite: string;
114
121
  generalTelNo: string;
115
122
  generalEmail: string;
116
123
  isTaxRegistered: boolean;
117
124
  conglomerateAddress: ConglomerateAddress;
125
+ otherAttachment: IFile;
118
126
 
119
127
  typeOfOrganization: mongoose.Types.ObjectId;
120
- natureOfBusiness: mongoose.Types.ObjectId;
121
- mainProductsOrServices: mongoose.Types.ObjectId;
122
- countryOfExportsOrImports: string;
128
+ natureOfBusiness: mongoose.Types.ObjectId[];
129
+ mainProductsOrServices: mongoose.Types.ObjectId[];
130
+ countryOfExportsOrImports: string[];
123
131
  noOfExecutiveEmployees: number;
124
132
  noOfNoneOfExecutiveEmployees: number;
125
133
  keyExecutivesDetails: keyExecutivesDetails;
@@ -136,6 +144,13 @@ interface MemberDocument extends Document {
136
144
 
137
145
  mongoose.set("strictPopulate", false);
138
146
 
147
+ // File schema
148
+ const fileSchema = new Schema<IFile>({
149
+ baseURL: { type: String, required: true },
150
+ fileName: { type: String, required: true },
151
+ fileExtension: { type: String, required: true },
152
+ });
153
+
139
154
  const memberSchema = new Schema<MemberDocument>({
140
155
  memberId: { type: Number },
141
156
  memberCode: { type: String, default: "" },
@@ -143,9 +158,13 @@ const memberSchema = new Schema<MemberDocument>({
143
158
  isMemberOfMasterBranch: { type: Boolean, default: false },
144
159
  taxIdentificationNo: { type: String },
145
160
  vatNo: { type: String },
161
+ vatAttachment: fileSchema,
146
162
  svatNo: { type: String },
163
+ svatAttachment: fileSchema,
147
164
  brNo: { type: String, default: "" },
165
+ brAttachment: fileSchema,
148
166
  nicNo: { type: String, default: "" },
167
+ nicAttachment: fileSchema,
149
168
  webSite: { type: String, default: "" },
150
169
  generalTelNo: { type: String },
151
170
  generalEmail: { type: String },
@@ -158,22 +177,22 @@ const memberSchema = new Schema<MemberDocument>({
158
177
  city: { type: String },
159
178
  country: { type: String },
160
179
  },
161
-
180
+ otherAttachment: [fileSchema],
162
181
  typeOfOrganization: {
163
182
  type: Schema.Types.ObjectId,
164
183
  ref: "OrganizationType.Master",
165
184
  },
166
185
 
167
186
  natureOfBusiness: {
168
- type: Schema.Types.ObjectId,
187
+ type: [Schema.Types.ObjectId],
169
188
  ref: "NatureOfBusiness.Master",
170
189
  },
171
190
 
172
191
  mainProductsOrServices: {
173
- type: Schema.Types.ObjectId,
192
+ type: [Schema.Types.ObjectId],
174
193
  ref: "Products.ServicesMaster",
175
194
  },
176
- countryOfExportsOrImports: { type: String, default: "" },
195
+ countryOfExportsOrImports: { type: [String], default: [] },
177
196
  noOfExecutiveEmployees: { type: Number, default: 0 },
178
197
  noOfNoneOfExecutiveEmployees: { type: Number, default: 0 },
179
198
  keyExecutivesDetails: {
@@ -230,6 +249,8 @@ const memberSchema = new Schema<MemberDocument>({
230
249
  contactEmail1: { type: String },
231
250
  contactDesignation: { type: String },
232
251
  contactAddress: { type: String },
252
+ contactAddress2: { type: String },
253
+ city: { type: String },
233
254
  isSAPSynced: { type: Boolean, default: false },
234
255
  lastSyncedOn: { type: Date, default: null },
235
256
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "application verification database changes with gs1 branch. not tested. ",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {