pristine-member-nest-api-database 1.0.21 → 1.0.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.
@@ -1,167 +1,188 @@
1
- import mongoose, { Document, Schema, now } from 'mongoose';
2
- import { Audit } from '../interface/Audit.interface';
1
+ import mongoose, { Document, Schema, now } from "mongoose";
2
+ import { Audit } from "../interface/Audit.interface";
3
3
 
4
4
  interface ServiceRequestDocument extends Document {
5
- requisitionId: number;
6
- requestType: string;
7
- requestedBranch: mongoose.Types.ObjectId;
8
- requestedFromBranch: mongoose.Types.ObjectId;
9
- service:{
10
- meetingRoom: mongoose.Types.ObjectId;
11
- startDate: Date;
12
- startTime: string;
13
- endDate: Date;
14
- endTime: string;
15
- isRecurring: boolean;
16
- noOfParticipants: number;
17
- equipments: [{
18
- appliance: mongoose.Types.ObjectId;
19
- quantity: number;
20
- }];
21
- remark: string;
22
- seatingArrangement: mongoose.Types.ObjectId;
23
- };
24
- transport: {
25
- vehicleCategory: mongoose.Types.ObjectId;
26
- hireName: string;
27
- reason: string;
28
- note: string;
29
- startDateTime: Date;
30
- endDateTime: Date;
31
- timeOfDeparture: string;
32
- timeOfPickup: string;
33
- noOfPassengers: number;
34
- externalPassengerDetails: string;
35
- destination: string;
36
- travelInRespectOf: string;
37
- startMeterReading: number;
38
- endMeterReading: number;
39
- mileage: number;
40
- travelItinerary: string;
41
- vehicleNo: string;
42
- driverName: string;
43
- vehicleType: string;
44
- charge: string;
45
- otherExpenses: string;
46
- }
47
- dateRequested: Date;
48
- requestStatus: string; //Pending, Approved - Level 1, Approved, Confirmed, Rejected
49
- requestedBy: mongoose.Types.ObjectId;
50
- statusDate: Date;
51
- requestedOn: Date;
52
- level1ApprovalUserRole: string;
53
- level1ApprovedBy: mongoose.Types.ObjectId;
54
- level1ApprovedOn: Date;
55
- level1ActionRemarks: string;
56
- confirmedBy: mongoose.Types.ObjectId;
57
- confirmedOn: Date;
58
- confirmationRemarks: string,
59
- rejectedBy: mongoose.Types.ObjectId;
60
- rejectedOn: Date;
61
- rejectedRemarks: string;
62
- audit: Audit[];
5
+ requisitionId: number;
6
+ requestType: string;
7
+ requestedBranch: mongoose.Types.ObjectId;
8
+ requestedFromBranch: mongoose.Types.ObjectId;
9
+ service: {
10
+ eventCode: mongoose.Types.ObjectId;
11
+ meetingRoom: mongoose.Types.ObjectId;
12
+ startDate: Date;
13
+ startTime: string;
14
+ endDate: Date;
15
+ endTime: string;
16
+ isRecurring: boolean;
17
+ noOfParticipants: number;
18
+ equipments: [
19
+ {
20
+ appliance: mongoose.Types.ObjectId;
21
+ quantity: number;
22
+ }
23
+ ];
24
+ remark: string;
25
+ seatingArrangement: mongoose.Types.ObjectId;
26
+ };
27
+ transport: {
28
+ vehicleCategory: mongoose.Types.ObjectId;
29
+ eventCode: mongoose.Types.ObjectId;
30
+ hireName: string;
31
+ reason: string;
32
+ note: string;
33
+ startDateTime: Date;
34
+ endDateTime: Date;
35
+ timeOfDeparture: string;
36
+ timeOfPickup: string;
37
+ noOfPassengers: number;
38
+ externalPassengerDetails: string;
39
+ destination: string;
40
+ travelInRespectOf: string;
41
+ startMeterReading: number;
42
+ endMeterReading: number;
43
+ mileage: number;
44
+ travelItinerary: string;
45
+ vehicleNo: string;
46
+ driverName: string;
47
+ vehicleType: string;
48
+ charge: string;
49
+ otherExpenses: string;
50
+ };
51
+ dateRequested: Date;
52
+ requestStatus: string; //Pending, Approved - Level 1, Approved, Confirmed, Rejected
53
+ requestedBy: mongoose.Types.ObjectId;
54
+ statusDate: Date;
55
+ requestedOn: Date;
56
+ level1ApprovalUserRole: string;
57
+ level1ApprovedBy: mongoose.Types.ObjectId;
58
+ level1ApprovedOn: Date;
59
+ level1ActionRemarks: string;
60
+ confirmedBy: mongoose.Types.ObjectId;
61
+ confirmedOn: Date;
62
+ confirmationRemarks: string;
63
+ rejectedBy: mongoose.Types.ObjectId;
64
+ rejectedOn: Date;
65
+ rejectedRemarks: string;
66
+ audit: Audit[];
63
67
  }
64
68
 
65
69
  const serviceRequestSchema = new Schema<ServiceRequestDocument>({
66
- requisitionId: { type: Number },
67
- requestType: { type: String },
68
- requestedBranch: {
69
- type: Schema.Types.ObjectId,
70
- ref: 'Branches', // Reference to the 'Branches' model
70
+ requisitionId: { type: Number },
71
+ requestType: { type: String },
72
+ requestedBranch: {
73
+ type: Schema.Types.ObjectId,
74
+ ref: "Branches", // Reference to the 'Branches' model
75
+ },
76
+ requestedFromBranch: {
77
+ type: Schema.Types.ObjectId,
78
+ ref: "Branches", // Reference to the 'Branches' model
79
+ },
80
+ service: {
81
+ meetingRoom: {
82
+ type: Schema.Types.ObjectId,
83
+ ref: "ir.Meeting.Rooms", // Reference to the 'MeetingRoom' model
84
+ default: null,
71
85
  },
72
- requestedFromBranch: {
73
- type: Schema.Types.ObjectId,
74
- ref: 'Branches', // Reference to the 'Branches' model
86
+ eventCode: {
87
+ type: Schema.Types.ObjectId,
88
+ ref: "ir.EventCode", // Reference to the 'event' model
89
+ default: null,
75
90
  },
76
- service:{
77
- meetingRoom: {
78
- type: Schema.Types.ObjectId,
79
- ref: 'ir.Meeting.Rooms', // Reference to the 'MeetingRoom' model
80
- default: null
91
+ startDate: { type: Date, default: null },
92
+ startTime: { type: String, default: "" },
93
+ endDate: { type: Date, default: null },
94
+ endTime: { type: String, default: "" },
95
+ isRecurring: { type: Boolean, default: false },
96
+ noOfParticipants: { type: Number, default: 0 },
97
+ equipments: [
98
+ {
99
+ appliance: {
100
+ type: Schema.Types.ObjectId,
101
+ ref: "ir.Appliances", // Reference to the 'Appliances' model
102
+ default: null,
81
103
  },
82
- startDate: { type: Date, default: null },
83
- startTime: { type: String , default: ""},
84
- endDate: { type: Date, default: null },
85
- endTime: { type: String, default: "" },
86
- isRecurring: { type: Boolean, default: false },
87
- noOfParticipants: { type: Number, default: 0 },
88
- equipments: [{
89
- appliance: {
90
- type: Schema.Types.ObjectId,
91
- ref: 'ir.Appliances', // Reference to the 'Appliances' model
92
- default: null
93
- },
94
- quantity: { type: Number, default: 0 },
95
- }],
96
- remark: { type: String, default: "" },
97
- seatingArrangement: {
98
- type: Schema.Types.ObjectId,
99
- ref: 'ir.Seating.Arrangements', // Reference to the 'Seating arrangements' model
100
- default: null
101
- }
104
+ quantity: { type: Number, default: 0 },
105
+ },
106
+ ],
107
+ remark: { type: String, default: "" },
108
+ seatingArrangement: {
109
+ type: Schema.Types.ObjectId,
110
+ ref: "ir.Seating.Arrangements", // Reference to the 'Seating arrangements' model
111
+ default: null,
102
112
  },
103
- transport: {
104
- vehicleCategory: {
105
- type: Schema.Types.ObjectId,
106
- ref: 'ir.Vehicle.Categories', // Reference to the 'Vehicle categories' model
107
- default: null
108
- },
109
- hireName: { type: String, default: "" },
110
- reason: { type: String, default: "" },
111
- note: { type: String, default: "" },
112
- startDateTime: { type: Date, default: null },
113
- endDateTime: { type: Date, default: null },
114
- timeOfDeparture: { type: String, default: "" },
115
- timeOfPickup: { type: String, default: ""},
116
- noOfPassengers: { type: Number, default: 0 },
117
- externalPassengerDetails: { type: String, default: "" },
118
- destination: { type: String, default: "" },
119
- travelInRespectOf: { type: String, default: "" },
120
- startMeterReading: { type: Number, default: 0 },
121
- endMeterReading: { type: Number, default: 0 },
122
- mileage: { type: Number, default: 0 },
123
- travelItinerary: { type: String, default:"" },
124
- vehicleNo: { type: String, default: "" },
125
- driverName: { type: String, default: "" },
126
- vehicleType: { type: String, default: "" },
127
- charge: { type: String, default: "" },
128
- otherExpenses: { type: String, default: "" },
129
- },
130
- requestedOn: { type: Date, default: now() },
131
- requestStatus: {type: String, default: "Pending"}, //Pending, Approved - Level 1, Approved, Confirmed, Rejected
132
- statusDate: {type: Date, default: now()},
133
- requestedBy: {
134
- type: Schema.Types.ObjectId,
135
- ref: 'Users',
136
- default: null
137
- },
138
- level1ApprovalUserRole: { type: String, default: ""},
139
- level1ApprovedBy: {
140
- type: Schema.Types.ObjectId,
141
- ref: 'Users',
142
- default: null
113
+ },
114
+ transport: {
115
+ vehicleCategory: {
116
+ type: Schema.Types.ObjectId,
117
+ ref: "ir.Vehicle.Categories", // Reference to the 'Vehicle categories' model
118
+ default: null,
143
119
  },
144
- level1ApprovedOn: { type: Date, default: null},
145
- level1ActionRemarks: { type: String, default: ""},
146
- confirmedBy: {
147
- type: Schema.Types.ObjectId,
148
- ref: 'Users',
149
- default: null
120
+ eventCode: {
121
+ type: Schema.Types.ObjectId,
122
+ ref: "ir.EventCode", // Reference to the 'event' model
123
+ default: null,
150
124
  },
151
- confirmedOn: { type: Date, default: null},
152
- confirmationRemarks: { type: String, default: ""},
153
- rejectedBy: {
154
- type: Schema.Types.ObjectId,
155
- ref: 'Users'
125
+ hireName: { type: String, default: "" },
126
+ reason: { type: String, default: "" },
127
+ note: { type: String, default: "" },
128
+ startDateTime: { type: Date, default: null },
129
+ endDateTime: { type: Date, default: null },
130
+ timeOfDeparture: { type: String, default: "" },
131
+ timeOfPickup: { type: String, default: "" },
132
+ noOfPassengers: { type: Number, default: 0 },
133
+ externalPassengerDetails: { type: String, default: "" },
134
+ destination: { type: String, default: "" },
135
+ travelInRespectOf: { type: String, default: "" },
136
+ startMeterReading: { type: Number, default: 0 },
137
+ endMeterReading: { type: Number, default: 0 },
138
+ mileage: { type: Number, default: 0 },
139
+ travelItinerary: { type: String, default: "" },
140
+ vehicleNo: { type: String, default: "" },
141
+ driverName: { type: String, default: "" },
142
+ vehicleType: { type: String, default: "" },
143
+ charge: { type: String, default: "" },
144
+ otherExpenses: { type: String, default: "" },
145
+ },
146
+ requestedOn: { type: Date, default: now() },
147
+ requestStatus: { type: String, default: "Pending" }, //Pending, Approved - Level 1, Approved, Confirmed, Rejected
148
+ statusDate: { type: Date, default: now() },
149
+ requestedBy: {
150
+ type: Schema.Types.ObjectId,
151
+ ref: "Users",
152
+ default: null,
153
+ },
154
+ level1ApprovalUserRole: { type: String, default: "" },
155
+ level1ApprovedBy: {
156
+ type: Schema.Types.ObjectId,
157
+ ref: "Users",
158
+ default: null,
159
+ },
160
+ level1ApprovedOn: { type: Date, default: null },
161
+ level1ActionRemarks: { type: String, default: "" },
162
+ confirmedBy: {
163
+ type: Schema.Types.ObjectId,
164
+ ref: "Users",
165
+ default: null,
166
+ },
167
+ confirmedOn: { type: Date, default: null },
168
+ confirmationRemarks: { type: String, default: "" },
169
+ rejectedBy: {
170
+ type: Schema.Types.ObjectId,
171
+ ref: "Users",
172
+ },
173
+ rejectedOn: { type: Date, default: null },
174
+ rejectedRemarks: { type: String, default: "" },
175
+ audit: [
176
+ {
177
+ userId: { type: String },
178
+ auditedOn: { type: Date, default: null },
179
+ actionType: { type: String },
156
180
  },
157
- rejectedOn: { type: Date, default: null},
158
- rejectedRemarks: { type: String, default: ""},
159
- audit: [{
160
- userId: { type: String },
161
- auditedOn: { type: Date, default: null },
162
- actionType: { type: String }
163
- }]
181
+ ],
164
182
  });
165
183
 
166
- const mongoServiceRequest = mongoose.model<ServiceRequestDocument>('ir.Service.Requests', serviceRequestSchema);
184
+ const mongoServiceRequest = mongoose.model<ServiceRequestDocument>(
185
+ "ir.Service.Requests",
186
+ serviceRequestSchema
187
+ );
167
188
  export { ServiceRequestDocument, mongoServiceRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Member nest API database",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/dist/index.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/dbConnect"), exports);
18
- __exportStar(require("./models/User.model"), exports);
19
- __exportStar(require("./models/BranchType.model"), exports);
20
- __exportStar(require("./models/Branch.model"), exports);
21
- __exportStar(require("./models/AccessLog.model"), exports);
22
- __exportStar(require("./models/MembershipType.model"), exports);
23
- __exportStar(require("./models/MembershipStatus.model"), exports);
24
- __exportStar(require("./models/BarcodeCategory.model"), exports);
25
- __exportStar(require("./models/Country.model"), exports);
26
- __exportStar(require("./models/Member.model"), exports);
27
- __exportStar(require("./models/Counter.model"), exports);
28
- __exportStar(require("./models/BankTransfer.model"), exports);
29
- __exportStar(require("./models/payment.model"), exports);
30
- __exportStar(require("./models/UserRole.model"), exports);
31
- __exportStar(require("./models/ItemGroup.ir.model"), exports);
32
- __exportStar(require("./models/Item.ir.model"), exports);
33
- __exportStar(require("./models/FieldCategory.model"), exports);
34
- __exportStar(require("./models/MeetingRoom.ir.model"), exports);
35
- __exportStar(require("./models/Appliance.ir.model"), exports);
36
- __exportStar(require("./models/SeatingArrangement.ir.model"), exports);
37
- __exportStar(require("./models/VehicleCategory.ir.model"), exports);
38
- __exportStar(require("./models/ItemRequest.ir.model"), exports);
39
- __exportStar(require("./models/ServiceRequest.ir.model"), exports);
40
- __exportStar(require("./models/ProductsServices.model"), exports);
41
- __exportStar(require("./models/OrganizationTypesMaster.model"), exports);
42
- __exportStar(require("./models/NatureOfBusiness.model"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoAccessLog = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- const accessLogSchema = new mongoose_1.Schema({
29
- user: {
30
- type: mongoose_1.Schema.Types.ObjectId,
31
- ref: 'Users', // Reference to the 'Users' model
32
- },
33
- log: [{
34
- logDate: { type: Date, default: Date.now() },
35
- mobileNo: { type: String },
36
- accessedUserName: { type: String }
37
- }]
38
- });
39
- const mongoAccessLog = mongoose_1.default.model('Access.Logs', accessLogSchema);
40
- exports.mongoAccessLog = mongoAccessLog;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoAppliance = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- const applianceSchema = new mongoose_1.Schema({
29
- applianceCode: { type: String },
30
- applianceName: { type: String },
31
- isActive: { type: Boolean, default: true },
32
- audit: [{
33
- userId: { type: String },
34
- auditedOn: { type: Date, default: null },
35
- actionType: { type: String }
36
- }]
37
- });
38
- const mongoAppliance = mongoose_1.default.model('ir.Appliances', applianceSchema);
39
- exports.mongoAppliance = mongoAppliance;
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoBankTransfer = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- mongoose_1.default.set('strictPopulate', false);
29
- const bankTransferSchema = new mongoose_1.Schema({
30
- transferId: { type: Number },
31
- member: {
32
- type: mongoose_1.Schema.Types.ObjectId,
33
- ref: 'Members' //Reference to the 'Members' model
34
- },
35
- branch: {
36
- type: mongoose_1.Schema.Types.ObjectId,
37
- ref: 'Branches' // Reference to the 'Branches' model
38
- },
39
- datePaid: { type: Date, default: Date.now() },
40
- slipImageLocation: { type: String },
41
- remarks: { type: String },
42
- dateEntered: { type: Date, default: Date.now() },
43
- audit: [
44
- {
45
- userId: { type: String },
46
- auditedOn: { type: Date, default: null },
47
- actionType: { type: String }
48
- }
49
- ]
50
- });
51
- const mongoBankTransfer = mongoose_1.default.model('Bank.Transfers', bankTransferSchema);
52
- exports.mongoBankTransfer = mongoBankTransfer;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoBarcodeCategory = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- const barcodeCategorySchema = new mongoose_1.Schema({
29
- barcodeCategoryCode: { type: String },
30
- barcodeCategoryName: { type: String },
31
- isActive: { type: Boolean, default: true },
32
- audit: [{
33
- userId: { type: String },
34
- auditedOn: { type: Date, default: Date.now() },
35
- actionType: { type: String }
36
- }]
37
- });
38
- const mongoBarcodeCategory = mongoose_1.default.model('Barcode.Categories', barcodeCategorySchema);
39
- exports.mongoBarcodeCategory = mongoBarcodeCategory;
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoBranch = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- mongoose_1.default.set('strictPopulate', false);
29
- const branchSchema = new mongoose_1.Schema({
30
- branchCode: { type: String },
31
- branchName: { type: String },
32
- branchShortCode: { type: String },
33
- branchType: {
34
- type: mongoose_1.Schema.Types.ObjectId,
35
- ref: 'Branch.Types', // Reference to the 'BranchTypes' model
36
- },
37
- membershipTypes: [{
38
- membershipType: {
39
- type: mongoose_1.Schema.Types.ObjectId,
40
- ref: 'Membership.Types', // Reference to the 'BranchTypes' model
41
- }
42
- }],
43
- isPaymentGatewayEnabled: { type: Boolean, default: true },
44
- logoFileLocation: { type: String, default: "" },
45
- isBarcodeEnabled: { type: Boolean, default: false },
46
- isActive: { type: Boolean, default: true },
47
- audit: [{
48
- userId: { type: String },
49
- auditedOn: { type: Date, default: null },
50
- actionType: { type: String }
51
- }]
52
- });
53
- const mongoBranch = mongoose_1.default.model('Branches', branchSchema);
54
- exports.mongoBranch = mongoBranch;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.mongoBranchType = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- const branchTypeSchema = new mongoose_1.Schema({
29
- branchTypeCode: { type: String },
30
- branchTypeName: { type: String },
31
- isActive: { type: Boolean, default: true },
32
- audit: [{
33
- userId: { type: String },
34
- auditedOn: { type: Date, default: Date.now() },
35
- actionType: { type: String }
36
- }]
37
- });
38
- const mongoBranchType = mongoose_1.default.model('Branch.Types', branchTypeSchema);
39
- exports.mongoBranchType = mongoBranchType;