pristine-member-nest-api-database 1.0.7 → 1.0.8
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/Database.code-workspace +6 -6
- package/dist/index.js +1 -0
- package/dist/models/ProductsServices.model.js +41 -0
- package/index.ts +24 -23
- package/interface/Audit.interface.ts +4 -4
- package/models/AccessLog.model.ts +26 -26
- package/models/Appliance.ir.model.ts +24 -24
- package/models/BankTransfer.model.ts +42 -42
- package/models/BarcodeCategory.model.ts +24 -24
- package/models/Branch.model.ts +48 -48
- package/models/BranchType.model.ts +24 -24
- package/models/Counter.model.ts +15 -15
- package/models/Country.model.ts +24 -24
- package/models/FieldCategory.model.ts +27 -26
- package/models/Item.ir.model.ts +29 -29
- package/models/ItemGroup.ir.model.ts +24 -24
- package/models/ItemRequest.ir.model.ts +100 -100
- package/models/MeetingRoom.ir.model.ts +24 -24
- package/models/Member.model.ts +200 -200
- package/models/MembershipStatus.model.ts +24 -24
- package/models/MembershipType.model.ts +24 -24
- package/models/ProductsServices.model.ts +31 -0
- package/models/SeatingArrangement.ir.model.ts +24 -24
- package/models/ServiceRequest.ir.model.ts +167 -167
- package/models/User.model.ts +71 -71
- package/models/UserRole.model.ts +15 -15
- package/models/VehicleCategory.ir.model.ts +24 -24
- package/models/payment.model.ts +98 -98
- package/package.json +19 -19
- package/src/dbConnect.ts +6 -6
- package/tsconfig.json +109 -109
package/models/Member.model.ts
CHANGED
|
@@ -1,201 +1,201 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
type ConglomerateAddress = {
|
|
5
|
-
addressLine1: string;
|
|
6
|
-
addressLine2: string;
|
|
7
|
-
addressLine3: string;
|
|
8
|
-
block: string;
|
|
9
|
-
city: string;
|
|
10
|
-
country: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type MemberContactInfo = {
|
|
14
|
-
bpShortCode: string;
|
|
15
|
-
firstName: string;
|
|
16
|
-
lastName: string;
|
|
17
|
-
contactTelNo1: string;
|
|
18
|
-
contactEmail1: string;
|
|
19
|
-
contactDesignation: string;
|
|
20
|
-
contactAddress: string;
|
|
21
|
-
isSAPSynced: boolean;
|
|
22
|
-
lastSyncedOn: Date;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type barcodeBranch = {
|
|
26
|
-
barcodeBranchMemberCode: string;
|
|
27
|
-
barcodeCategoryCode: string;
|
|
28
|
-
issueDate: Date;
|
|
29
|
-
isIssued: boolean;
|
|
30
|
-
countryCodeCode: string;
|
|
31
|
-
barCode: string;
|
|
32
|
-
changeDate: Date;
|
|
33
|
-
validFrom: Date;
|
|
34
|
-
validTo: Date;
|
|
35
|
-
registeredDate: Date;
|
|
36
|
-
remarks: string
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
type MemberAssociation = {
|
|
40
|
-
branch: mongoose.Types.ObjectId;
|
|
41
|
-
associationMemberCode: string;
|
|
42
|
-
membershipStatus: mongoose.Types.ObjectId;
|
|
43
|
-
membershipType: mongoose.Types.ObjectId;
|
|
44
|
-
electedDate: Date;
|
|
45
|
-
contactInfo: MemberContactInfo;
|
|
46
|
-
isTerminated: boolean;
|
|
47
|
-
terminatedDate: Date;
|
|
48
|
-
reasonForTermination: string;
|
|
49
|
-
barcodeAssociation: barcodeBranch[];
|
|
50
|
-
dynamicDetails: JSON;
|
|
51
|
-
isTerminationRequested: boolean;
|
|
52
|
-
terminationRequestedDate: Date;
|
|
53
|
-
terminationRequestedBy: string;
|
|
54
|
-
terminationRequestRemarks: string;
|
|
55
|
-
onOfSubscriptionMonths:number;
|
|
56
|
-
applicationStatus: string;
|
|
57
|
-
reviewedBy: mongoose.Types.ObjectId;
|
|
58
|
-
reviewedOn: Date;
|
|
59
|
-
isEnrolmentCreatedInSAP: boolean;
|
|
60
|
-
isEnrolmentSyncedWithSAP: boolean;
|
|
61
|
-
enrolmentSyncedOn: Date;
|
|
62
|
-
isActive: boolean;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface MemberDocument extends Document {
|
|
66
|
-
memberId: number;
|
|
67
|
-
memberCode: string;
|
|
68
|
-
memberName: string;
|
|
69
|
-
isMemberOfMasterBranch: boolean;
|
|
70
|
-
taxIdentificationNo: string;
|
|
71
|
-
vatNo: string;
|
|
72
|
-
svatNo: string;
|
|
73
|
-
brNo: string;
|
|
74
|
-
nicNo: string;
|
|
75
|
-
webSite: string;
|
|
76
|
-
generalTelNo: string;
|
|
77
|
-
generalEmail: string;
|
|
78
|
-
isTaxRegistered: boolean;
|
|
79
|
-
conglomerateAddress: ConglomerateAddress,
|
|
80
|
-
isMemberContactSynced: boolean,
|
|
81
|
-
memberContactSyncedOn: Date,
|
|
82
|
-
isCreatedInSAP: boolean,
|
|
83
|
-
isMemberSyncedWithSAP: boolean,
|
|
84
|
-
memberSyncedOn: Date,
|
|
85
|
-
isActive: boolean,
|
|
86
|
-
memberAssociation: MemberAssociation[],
|
|
87
|
-
audit: Audit[];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
mongoose.set('strictPopulate', false);
|
|
91
|
-
|
|
92
|
-
const memberSchema = new Schema<MemberDocument>({
|
|
93
|
-
memberId: { type: Number },
|
|
94
|
-
memberCode: { type: String, default: "" },
|
|
95
|
-
memberName: { type: String },
|
|
96
|
-
isMemberOfMasterBranch: { type: Boolean, default: false },
|
|
97
|
-
taxIdentificationNo: { type: String },
|
|
98
|
-
vatNo: { type: String },
|
|
99
|
-
svatNo: { type: String },
|
|
100
|
-
brNo: { type: String, default: "" },
|
|
101
|
-
nicNo: { type: String, default: "" },
|
|
102
|
-
webSite: { type: String, default: "" },
|
|
103
|
-
generalTelNo: { type: String },
|
|
104
|
-
generalEmail: { type: String },
|
|
105
|
-
isTaxRegistered: { type: Boolean, default: false },
|
|
106
|
-
conglomerateAddress: {
|
|
107
|
-
addressLine1: { type: String },
|
|
108
|
-
addressLine2: { type: String, default: "" },
|
|
109
|
-
addressLine3: { type: String, default: "" },
|
|
110
|
-
block: { type: String, default: "" },
|
|
111
|
-
city: { type: String },
|
|
112
|
-
country: { type: String }
|
|
113
|
-
},
|
|
114
|
-
isMemberContactSynced: {type: Boolean, default: false},
|
|
115
|
-
memberContactSyncedOn: {type: Date, default: null},
|
|
116
|
-
isCreatedInSAP: { type: Boolean, default: false },
|
|
117
|
-
isMemberSyncedWithSAP: {type: Boolean, default: false},
|
|
118
|
-
memberSyncedOn: { type: Date, default: null },
|
|
119
|
-
isActive: { type: Boolean },
|
|
120
|
-
memberAssociation: [
|
|
121
|
-
{
|
|
122
|
-
branch: {
|
|
123
|
-
type: Schema.Types.ObjectId,
|
|
124
|
-
ref: 'Branches', // Reference to the 'Branches' model
|
|
125
|
-
},
|
|
126
|
-
associationMemberCode: { type: String, default: "" },
|
|
127
|
-
membershipStatus: {
|
|
128
|
-
type: Schema.Types.ObjectId,
|
|
129
|
-
ref: 'Membership.Statuses', // Reference to the 'Membership.Statuses' model
|
|
130
|
-
},
|
|
131
|
-
membershipType: {
|
|
132
|
-
type: Schema.Types.ObjectId,
|
|
133
|
-
ref: 'Membership.Types', // Reference to the 'Membership.Types' model
|
|
134
|
-
},
|
|
135
|
-
electedDate: { type: Date, default: null},
|
|
136
|
-
contactInfo:{
|
|
137
|
-
bpShortCode: { type: String, default: "" },
|
|
138
|
-
firstName: { type: String },
|
|
139
|
-
lastName: { type: String },
|
|
140
|
-
contactTelNo1: { type: String },
|
|
141
|
-
contactEmail1: { type: String },
|
|
142
|
-
contactDesignation: { type: String },
|
|
143
|
-
contactAddress: { type: String },
|
|
144
|
-
isSAPSynced: { type: Boolean, default: false },
|
|
145
|
-
lastSyncedOn: { type: Date, default: null }
|
|
146
|
-
},
|
|
147
|
-
isTerminated: { type: Boolean, default: false },
|
|
148
|
-
terminatedDate: { type: Date, default: null },
|
|
149
|
-
reasonForTermination: { type: String, default: "" },
|
|
150
|
-
barcodeAssociation: [
|
|
151
|
-
{
|
|
152
|
-
barcodeBranchMemberCode: {type: String, default: "" },
|
|
153
|
-
barcodeCategory: {
|
|
154
|
-
type: Schema.Types.ObjectId,
|
|
155
|
-
ref: 'Barcode.Categories',
|
|
156
|
-
},
|
|
157
|
-
issueDate: { type: Date, default: null },
|
|
158
|
-
isIssued: { type: Boolean, default: true },
|
|
159
|
-
country: {
|
|
160
|
-
type: Schema.Types.ObjectId,
|
|
161
|
-
ref: 'Countries',
|
|
162
|
-
},
|
|
163
|
-
barCode: { type: String, default: "" },
|
|
164
|
-
changeDate: { type: Date, default: null },
|
|
165
|
-
validFrom: { type: Date, default: null },
|
|
166
|
-
validTo: { type: Date, default: null },
|
|
167
|
-
registeredDate: { type: Date, default: null },
|
|
168
|
-
remarks: { type: String, default: "" }
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
dynamicDetails: {type: JSON, default: null},
|
|
172
|
-
isTerminationRequested: {type: Boolean, default: false},
|
|
173
|
-
terminationRequestedDate: {type: Date, default: null},
|
|
174
|
-
terminationRequestedBy: {type: String, default: ""},
|
|
175
|
-
terminationRequestRemarks: {type: String, default: ""},
|
|
176
|
-
onOfSubscriptionMonths:{type: Number, default: 0},
|
|
177
|
-
applicationStatus: {type: String, default: "PENDING"},
|
|
178
|
-
reviewedBy: {
|
|
179
|
-
type: Schema.Types.ObjectId,
|
|
180
|
-
ref: 'Users', // Reference to the 'Users' model
|
|
181
|
-
default: null
|
|
182
|
-
},
|
|
183
|
-
reviewedOn: {type: Date, default: null},
|
|
184
|
-
isEnrolmentCreatedInSAP: { type: Boolean, default: false},
|
|
185
|
-
isEnrolmentSyncedWithSAP: { type: Boolean, default: false },
|
|
186
|
-
enrolmentSyncedOn: { type: Date, default: null },
|
|
187
|
-
isActive: { type: Boolean, default: true}
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
audit: [
|
|
191
|
-
{
|
|
192
|
-
userId: { type: String },
|
|
193
|
-
auditedOn: { type: Date, default: null },
|
|
194
|
-
actionType: { type: String }
|
|
195
|
-
}
|
|
196
|
-
]
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
const mongoMember = mongoose.model<MemberDocument>('Members', memberSchema);
|
|
200
|
-
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
type ConglomerateAddress = {
|
|
5
|
+
addressLine1: string;
|
|
6
|
+
addressLine2: string;
|
|
7
|
+
addressLine3: string;
|
|
8
|
+
block: string;
|
|
9
|
+
city: string;
|
|
10
|
+
country: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type MemberContactInfo = {
|
|
14
|
+
bpShortCode: string;
|
|
15
|
+
firstName: string;
|
|
16
|
+
lastName: string;
|
|
17
|
+
contactTelNo1: string;
|
|
18
|
+
contactEmail1: string;
|
|
19
|
+
contactDesignation: string;
|
|
20
|
+
contactAddress: string;
|
|
21
|
+
isSAPSynced: boolean;
|
|
22
|
+
lastSyncedOn: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type barcodeBranch = {
|
|
26
|
+
barcodeBranchMemberCode: string;
|
|
27
|
+
barcodeCategoryCode: string;
|
|
28
|
+
issueDate: Date;
|
|
29
|
+
isIssued: boolean;
|
|
30
|
+
countryCodeCode: string;
|
|
31
|
+
barCode: string;
|
|
32
|
+
changeDate: Date;
|
|
33
|
+
validFrom: Date;
|
|
34
|
+
validTo: Date;
|
|
35
|
+
registeredDate: Date;
|
|
36
|
+
remarks: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type MemberAssociation = {
|
|
40
|
+
branch: mongoose.Types.ObjectId;
|
|
41
|
+
associationMemberCode: string;
|
|
42
|
+
membershipStatus: mongoose.Types.ObjectId;
|
|
43
|
+
membershipType: mongoose.Types.ObjectId;
|
|
44
|
+
electedDate: Date;
|
|
45
|
+
contactInfo: MemberContactInfo;
|
|
46
|
+
isTerminated: boolean;
|
|
47
|
+
terminatedDate: Date;
|
|
48
|
+
reasonForTermination: string;
|
|
49
|
+
barcodeAssociation: barcodeBranch[];
|
|
50
|
+
dynamicDetails: JSON;
|
|
51
|
+
isTerminationRequested: boolean;
|
|
52
|
+
terminationRequestedDate: Date;
|
|
53
|
+
terminationRequestedBy: string;
|
|
54
|
+
terminationRequestRemarks: string;
|
|
55
|
+
onOfSubscriptionMonths:number;
|
|
56
|
+
applicationStatus: string;
|
|
57
|
+
reviewedBy: mongoose.Types.ObjectId;
|
|
58
|
+
reviewedOn: Date;
|
|
59
|
+
isEnrolmentCreatedInSAP: boolean;
|
|
60
|
+
isEnrolmentSyncedWithSAP: boolean;
|
|
61
|
+
enrolmentSyncedOn: Date;
|
|
62
|
+
isActive: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface MemberDocument extends Document {
|
|
66
|
+
memberId: number;
|
|
67
|
+
memberCode: string;
|
|
68
|
+
memberName: string;
|
|
69
|
+
isMemberOfMasterBranch: boolean;
|
|
70
|
+
taxIdentificationNo: string;
|
|
71
|
+
vatNo: string;
|
|
72
|
+
svatNo: string;
|
|
73
|
+
brNo: string;
|
|
74
|
+
nicNo: string;
|
|
75
|
+
webSite: string;
|
|
76
|
+
generalTelNo: string;
|
|
77
|
+
generalEmail: string;
|
|
78
|
+
isTaxRegistered: boolean;
|
|
79
|
+
conglomerateAddress: ConglomerateAddress,
|
|
80
|
+
isMemberContactSynced: boolean,
|
|
81
|
+
memberContactSyncedOn: Date,
|
|
82
|
+
isCreatedInSAP: boolean,
|
|
83
|
+
isMemberSyncedWithSAP: boolean,
|
|
84
|
+
memberSyncedOn: Date,
|
|
85
|
+
isActive: boolean,
|
|
86
|
+
memberAssociation: MemberAssociation[],
|
|
87
|
+
audit: Audit[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
mongoose.set('strictPopulate', false);
|
|
91
|
+
|
|
92
|
+
const memberSchema = new Schema<MemberDocument>({
|
|
93
|
+
memberId: { type: Number },
|
|
94
|
+
memberCode: { type: String, default: "" },
|
|
95
|
+
memberName: { type: String },
|
|
96
|
+
isMemberOfMasterBranch: { type: Boolean, default: false },
|
|
97
|
+
taxIdentificationNo: { type: String },
|
|
98
|
+
vatNo: { type: String },
|
|
99
|
+
svatNo: { type: String },
|
|
100
|
+
brNo: { type: String, default: "" },
|
|
101
|
+
nicNo: { type: String, default: "" },
|
|
102
|
+
webSite: { type: String, default: "" },
|
|
103
|
+
generalTelNo: { type: String },
|
|
104
|
+
generalEmail: { type: String },
|
|
105
|
+
isTaxRegistered: { type: Boolean, default: false },
|
|
106
|
+
conglomerateAddress: {
|
|
107
|
+
addressLine1: { type: String },
|
|
108
|
+
addressLine2: { type: String, default: "" },
|
|
109
|
+
addressLine3: { type: String, default: "" },
|
|
110
|
+
block: { type: String, default: "" },
|
|
111
|
+
city: { type: String },
|
|
112
|
+
country: { type: String }
|
|
113
|
+
},
|
|
114
|
+
isMemberContactSynced: {type: Boolean, default: false},
|
|
115
|
+
memberContactSyncedOn: {type: Date, default: null},
|
|
116
|
+
isCreatedInSAP: { type: Boolean, default: false },
|
|
117
|
+
isMemberSyncedWithSAP: {type: Boolean, default: false},
|
|
118
|
+
memberSyncedOn: { type: Date, default: null },
|
|
119
|
+
isActive: { type: Boolean },
|
|
120
|
+
memberAssociation: [
|
|
121
|
+
{
|
|
122
|
+
branch: {
|
|
123
|
+
type: Schema.Types.ObjectId,
|
|
124
|
+
ref: 'Branches', // Reference to the 'Branches' model
|
|
125
|
+
},
|
|
126
|
+
associationMemberCode: { type: String, default: "" },
|
|
127
|
+
membershipStatus: {
|
|
128
|
+
type: Schema.Types.ObjectId,
|
|
129
|
+
ref: 'Membership.Statuses', // Reference to the 'Membership.Statuses' model
|
|
130
|
+
},
|
|
131
|
+
membershipType: {
|
|
132
|
+
type: Schema.Types.ObjectId,
|
|
133
|
+
ref: 'Membership.Types', // Reference to the 'Membership.Types' model
|
|
134
|
+
},
|
|
135
|
+
electedDate: { type: Date, default: null},
|
|
136
|
+
contactInfo:{
|
|
137
|
+
bpShortCode: { type: String, default: "" },
|
|
138
|
+
firstName: { type: String },
|
|
139
|
+
lastName: { type: String },
|
|
140
|
+
contactTelNo1: { type: String },
|
|
141
|
+
contactEmail1: { type: String },
|
|
142
|
+
contactDesignation: { type: String },
|
|
143
|
+
contactAddress: { type: String },
|
|
144
|
+
isSAPSynced: { type: Boolean, default: false },
|
|
145
|
+
lastSyncedOn: { type: Date, default: null }
|
|
146
|
+
},
|
|
147
|
+
isTerminated: { type: Boolean, default: false },
|
|
148
|
+
terminatedDate: { type: Date, default: null },
|
|
149
|
+
reasonForTermination: { type: String, default: "" },
|
|
150
|
+
barcodeAssociation: [
|
|
151
|
+
{
|
|
152
|
+
barcodeBranchMemberCode: {type: String, default: "" },
|
|
153
|
+
barcodeCategory: {
|
|
154
|
+
type: Schema.Types.ObjectId,
|
|
155
|
+
ref: 'Barcode.Categories',
|
|
156
|
+
},
|
|
157
|
+
issueDate: { type: Date, default: null },
|
|
158
|
+
isIssued: { type: Boolean, default: true },
|
|
159
|
+
country: {
|
|
160
|
+
type: Schema.Types.ObjectId,
|
|
161
|
+
ref: 'Countries',
|
|
162
|
+
},
|
|
163
|
+
barCode: { type: String, default: "" },
|
|
164
|
+
changeDate: { type: Date, default: null },
|
|
165
|
+
validFrom: { type: Date, default: null },
|
|
166
|
+
validTo: { type: Date, default: null },
|
|
167
|
+
registeredDate: { type: Date, default: null },
|
|
168
|
+
remarks: { type: String, default: "" }
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
dynamicDetails: {type: JSON, default: null},
|
|
172
|
+
isTerminationRequested: {type: Boolean, default: false},
|
|
173
|
+
terminationRequestedDate: {type: Date, default: null},
|
|
174
|
+
terminationRequestedBy: {type: String, default: ""},
|
|
175
|
+
terminationRequestRemarks: {type: String, default: ""},
|
|
176
|
+
onOfSubscriptionMonths:{type: Number, default: 0},
|
|
177
|
+
applicationStatus: {type: String, default: "PENDING"},
|
|
178
|
+
reviewedBy: {
|
|
179
|
+
type: Schema.Types.ObjectId,
|
|
180
|
+
ref: 'Users', // Reference to the 'Users' model
|
|
181
|
+
default: null
|
|
182
|
+
},
|
|
183
|
+
reviewedOn: {type: Date, default: null},
|
|
184
|
+
isEnrolmentCreatedInSAP: { type: Boolean, default: false},
|
|
185
|
+
isEnrolmentSyncedWithSAP: { type: Boolean, default: false },
|
|
186
|
+
enrolmentSyncedOn: { type: Date, default: null },
|
|
187
|
+
isActive: { type: Boolean, default: true}
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
audit: [
|
|
191
|
+
{
|
|
192
|
+
userId: { type: String },
|
|
193
|
+
auditedOn: { type: Date, default: null },
|
|
194
|
+
actionType: { type: String }
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const mongoMember = mongoose.model<MemberDocument>('Members', memberSchema);
|
|
200
|
+
|
|
201
201
|
export { MemberDocument, ConglomerateAddress, MemberContactInfo, MemberAssociation, mongoMember };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface MembershipStatusDocument extends Document {
|
|
5
|
-
membershipStatusCode: string;
|
|
6
|
-
membershipStatusName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: Audit[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const membershipStatusSchema = new Schema<MembershipStatusDocument>({
|
|
12
|
-
membershipStatusCode: { type: String },
|
|
13
|
-
membershipStatusName: { type: String },
|
|
14
|
-
isActive: { type: Boolean, default: true },
|
|
15
|
-
audit: [{
|
|
16
|
-
userId: { type: String },
|
|
17
|
-
auditedOn: { type: Date, default: Date.now() },
|
|
18
|
-
actionType: { type: String }
|
|
19
|
-
}]
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const mongoMembershipStatus = mongoose.model<MembershipStatusDocument>('Membership.Statuses', membershipStatusSchema);
|
|
23
|
-
|
|
24
|
-
export { MembershipStatusDocument, mongoMembershipStatus };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface MembershipStatusDocument extends Document {
|
|
5
|
+
membershipStatusCode: string;
|
|
6
|
+
membershipStatusName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const membershipStatusSchema = new Schema<MembershipStatusDocument>({
|
|
12
|
+
membershipStatusCode: { type: String },
|
|
13
|
+
membershipStatusName: { type: String },
|
|
14
|
+
isActive: { type: Boolean, default: true },
|
|
15
|
+
audit: [{
|
|
16
|
+
userId: { type: String },
|
|
17
|
+
auditedOn: { type: Date, default: Date.now() },
|
|
18
|
+
actionType: { type: String }
|
|
19
|
+
}]
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const mongoMembershipStatus = mongoose.model<MembershipStatusDocument>('Membership.Statuses', membershipStatusSchema);
|
|
23
|
+
|
|
24
|
+
export { MembershipStatusDocument, mongoMembershipStatus };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface MembershipTypeDocument extends Document {
|
|
5
|
-
membershipTypeCode: string;
|
|
6
|
-
membershipTypeName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: Audit[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const membershipTypeSchema = new Schema<MembershipTypeDocument>({
|
|
12
|
-
membershipTypeCode: { type: String },
|
|
13
|
-
membershipTypeName: { type: String },
|
|
14
|
-
isActive: { type: Boolean, default: true },
|
|
15
|
-
audit: [{
|
|
16
|
-
userId: { type: String },
|
|
17
|
-
auditedOn: { type: Date, default: Date.now() },
|
|
18
|
-
actionType: { type: String }
|
|
19
|
-
}]
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const mongoMembershipType = mongoose.model<MembershipTypeDocument>('Membership.Types', membershipTypeSchema);
|
|
23
|
-
|
|
24
|
-
export { MembershipTypeDocument, mongoMembershipType };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface MembershipTypeDocument extends Document {
|
|
5
|
+
membershipTypeCode: string;
|
|
6
|
+
membershipTypeName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const membershipTypeSchema = new Schema<MembershipTypeDocument>({
|
|
12
|
+
membershipTypeCode: { type: String },
|
|
13
|
+
membershipTypeName: { type: String },
|
|
14
|
+
isActive: { type: Boolean, default: true },
|
|
15
|
+
audit: [{
|
|
16
|
+
userId: { type: String },
|
|
17
|
+
auditedOn: { type: Date, default: Date.now() },
|
|
18
|
+
actionType: { type: String }
|
|
19
|
+
}]
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const mongoMembershipType = mongoose.model<MembershipTypeDocument>('Membership.Types', membershipTypeSchema);
|
|
23
|
+
|
|
24
|
+
export { MembershipTypeDocument, mongoMembershipType };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
+
import { Audit } from "../interface/Audit.interface";
|
|
3
|
+
|
|
4
|
+
interface ProductsAndServicesMasterDocument extends Document {
|
|
5
|
+
ProductsAndServicesMasterCode: string;
|
|
6
|
+
ProductsAndServicesMasterName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const ProductsAndServicesMasterSchema =
|
|
12
|
+
new Schema<ProductsAndServicesMasterDocument>({
|
|
13
|
+
ProductsAndServicesMasterCode: { type: String },
|
|
14
|
+
ProductsAndServicesMasterName: { type: String },
|
|
15
|
+
isActive: { type: Boolean, default: true },
|
|
16
|
+
audit: [
|
|
17
|
+
{
|
|
18
|
+
userId: { type: String },
|
|
19
|
+
auditedOn: { type: Date, default: null },
|
|
20
|
+
actionType: { type: String },
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const mongoProductsAndServicesMaster =
|
|
26
|
+
mongoose.model<ProductsAndServicesMasterDocument>(
|
|
27
|
+
"Products.ServicesMaster",
|
|
28
|
+
ProductsAndServicesMasterSchema
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export { ProductsAndServicesMasterDocument, mongoProductsAndServicesMaster };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface SeatingArrangementDocument extends Document {
|
|
5
|
-
seatingArrangementCode: string;
|
|
6
|
-
seatingArrangementName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: Audit[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const seatingArrangementSchema = new Schema<SeatingArrangementDocument>({
|
|
12
|
-
seatingArrangementCode: { type: String },
|
|
13
|
-
seatingArrangementName: { type: String },
|
|
14
|
-
isActive: { type: Boolean, default: true },
|
|
15
|
-
audit: [{
|
|
16
|
-
userId: { type: String },
|
|
17
|
-
auditedOn: { type: Date, default: null },
|
|
18
|
-
actionType: { type: String }
|
|
19
|
-
}]
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const mongoSeatingArrangement = mongoose.model<SeatingArrangementDocument>('ir.Seating.Arrangements', seatingArrangementSchema);
|
|
23
|
-
|
|
24
|
-
export { SeatingArrangementDocument, mongoSeatingArrangement };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface SeatingArrangementDocument extends Document {
|
|
5
|
+
seatingArrangementCode: string;
|
|
6
|
+
seatingArrangementName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const seatingArrangementSchema = new Schema<SeatingArrangementDocument>({
|
|
12
|
+
seatingArrangementCode: { type: String },
|
|
13
|
+
seatingArrangementName: { type: String },
|
|
14
|
+
isActive: { type: Boolean, default: true },
|
|
15
|
+
audit: [{
|
|
16
|
+
userId: { type: String },
|
|
17
|
+
auditedOn: { type: Date, default: null },
|
|
18
|
+
actionType: { type: String }
|
|
19
|
+
}]
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const mongoSeatingArrangement = mongoose.model<SeatingArrangementDocument>('ir.Seating.Arrangements', seatingArrangementSchema);
|
|
23
|
+
|
|
24
|
+
export { SeatingArrangementDocument, mongoSeatingArrangement };
|