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/Database.code-workspace
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"folders": [
|
|
3
|
-
{
|
|
4
|
-
"path": "."
|
|
5
|
-
}
|
|
6
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"folders": [
|
|
3
|
+
{
|
|
4
|
+
"path": "."
|
|
5
|
+
}
|
|
6
|
+
]
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -37,3 +37,4 @@ __exportStar(require("./models/SeatingArrangement.ir.model"), exports);
|
|
|
37
37
|
__exportStar(require("./models/VehicleCategory.ir.model"), exports);
|
|
38
38
|
__exportStar(require("./models/ItemRequest.ir.model"), exports);
|
|
39
39
|
__exportStar(require("./models/ServiceRequest.ir.model"), exports);
|
|
40
|
+
__exportStar(require("./models/ProductsServices.model"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
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.mongoProductsAndServicesMaster = void 0;
|
|
27
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
28
|
+
const ProductsAndServicesMasterSchema = new mongoose_1.Schema({
|
|
29
|
+
ProductsAndServicesMasterCode: { type: String },
|
|
30
|
+
ProductsAndServicesMasterName: { type: String },
|
|
31
|
+
isActive: { type: Boolean, default: true },
|
|
32
|
+
audit: [
|
|
33
|
+
{
|
|
34
|
+
userId: { type: String },
|
|
35
|
+
auditedOn: { type: Date, default: null },
|
|
36
|
+
actionType: { type: String },
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
const mongoProductsAndServicesMaster = mongoose_1.default.model("Products.ServicesMaster", ProductsAndServicesMasterSchema);
|
|
41
|
+
exports.mongoProductsAndServicesMaster = mongoProductsAndServicesMaster;
|
package/index.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
1
|
+
export * from "./src/dbConnect";
|
|
2
|
+
export * from "./models/User.model";
|
|
3
|
+
export * from "./models/BranchType.model";
|
|
4
|
+
export * from "./models/Branch.model";
|
|
5
|
+
export * from "./models/AccessLog.model";
|
|
6
|
+
export * from "./models/MembershipType.model";
|
|
7
|
+
export * from "./models/MembershipStatus.model";
|
|
8
|
+
export * from "./models/BarcodeCategory.model";
|
|
9
|
+
export * from "./models/Country.model";
|
|
10
|
+
export * from "./models/Member.model";
|
|
11
|
+
export * from "./models/Counter.model";
|
|
12
|
+
export * from "./models/BankTransfer.model";
|
|
13
|
+
export * from "./models/payment.model";
|
|
14
|
+
export * from "./models/UserRole.model";
|
|
15
|
+
export * from "./models/ItemGroup.ir.model";
|
|
16
|
+
export * from "./models/Item.ir.model";
|
|
17
|
+
export * from "./models/FieldCategory.model";
|
|
18
|
+
export * from "./models/MeetingRoom.ir.model";
|
|
19
|
+
export * from "./models/Appliance.ir.model";
|
|
20
|
+
export * from "./models/SeatingArrangement.ir.model";
|
|
21
|
+
export * from "./models/VehicleCategory.ir.model";
|
|
22
|
+
export * from "./models/ItemRequest.ir.model";
|
|
23
|
+
export * from "./models/ServiceRequest.ir.model";
|
|
24
|
+
export * from "./models/ProductsServices.model";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface Audit {
|
|
2
|
-
userId: string;
|
|
3
|
-
auditedOn: Date;
|
|
4
|
-
actionType: string;
|
|
1
|
+
export interface Audit {
|
|
2
|
+
userId: string;
|
|
3
|
+
auditedOn: Date;
|
|
4
|
+
actionType: string;
|
|
5
5
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
|
|
3
|
-
interface AccessLogDocument extends Document {
|
|
4
|
-
user: mongoose.Types.ObjectId;
|
|
5
|
-
log:[{
|
|
6
|
-
logDate: Date,
|
|
7
|
-
mobileNo: string,
|
|
8
|
-
accessedUserName: string
|
|
9
|
-
}];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const accessLogSchema = new Schema<AccessLogDocument>({
|
|
13
|
-
user: {
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
15
|
-
ref: 'Users', // Reference to the 'Users' model
|
|
16
|
-
},
|
|
17
|
-
log:[{
|
|
18
|
-
logDate: {type: Date, default:Date.now()},
|
|
19
|
-
mobileNo: {type: String},
|
|
20
|
-
accessedUserName: {type: String}
|
|
21
|
-
}]
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const mongoAccessLog = mongoose.model<AccessLogDocument>('Access.Logs', accessLogSchema);
|
|
25
|
-
|
|
26
|
-
export { AccessLogDocument, mongoAccessLog };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
interface AccessLogDocument extends Document {
|
|
4
|
+
user: mongoose.Types.ObjectId;
|
|
5
|
+
log:[{
|
|
6
|
+
logDate: Date,
|
|
7
|
+
mobileNo: string,
|
|
8
|
+
accessedUserName: string
|
|
9
|
+
}];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const accessLogSchema = new Schema<AccessLogDocument>({
|
|
13
|
+
user: {
|
|
14
|
+
type: Schema.Types.ObjectId,
|
|
15
|
+
ref: 'Users', // Reference to the 'Users' model
|
|
16
|
+
},
|
|
17
|
+
log:[{
|
|
18
|
+
logDate: {type: Date, default:Date.now()},
|
|
19
|
+
mobileNo: {type: String},
|
|
20
|
+
accessedUserName: {type: String}
|
|
21
|
+
}]
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const mongoAccessLog = mongoose.model<AccessLogDocument>('Access.Logs', accessLogSchema);
|
|
25
|
+
|
|
26
|
+
export { AccessLogDocument, mongoAccessLog };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface ApplianceDocument extends Document {
|
|
5
|
-
applianceCode: string;
|
|
6
|
-
applianceName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: Audit[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const applianceSchema = new Schema<ApplianceDocument>({
|
|
12
|
-
applianceCode: { type: String },
|
|
13
|
-
applianceName: { 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 mongoAppliance = mongoose.model<ApplianceDocument>('ir.Appliances', applianceSchema);
|
|
23
|
-
|
|
24
|
-
export { ApplianceDocument, mongoAppliance };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface ApplianceDocument extends Document {
|
|
5
|
+
applianceCode: string;
|
|
6
|
+
applianceName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const applianceSchema = new Schema<ApplianceDocument>({
|
|
12
|
+
applianceCode: { type: String },
|
|
13
|
+
applianceName: { 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 mongoAppliance = mongoose.model<ApplianceDocument>('ir.Appliances', applianceSchema);
|
|
23
|
+
|
|
24
|
+
export { ApplianceDocument, mongoAppliance };
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface BankTransferDocument extends Document {
|
|
5
|
-
transferId: number;
|
|
6
|
-
member: mongoose.Types.ObjectId;
|
|
7
|
-
branch: mongoose.Types.ObjectId;
|
|
8
|
-
datePaid: Date;
|
|
9
|
-
slipImageLocation: string;
|
|
10
|
-
remarks: string;
|
|
11
|
-
dateEntered: Date;
|
|
12
|
-
audit: Audit[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
mongoose.set('strictPopulate', false);
|
|
16
|
-
|
|
17
|
-
const bankTransferSchema = new Schema<BankTransferDocument>({
|
|
18
|
-
transferId: { type: Number },
|
|
19
|
-
member: {
|
|
20
|
-
type: Schema.Types.ObjectId,
|
|
21
|
-
ref: 'Members' //Reference to the 'Members' model
|
|
22
|
-
},
|
|
23
|
-
branch: {
|
|
24
|
-
type: Schema.Types.ObjectId,
|
|
25
|
-
ref: 'Branches' // Reference to the 'Branches' model
|
|
26
|
-
},
|
|
27
|
-
datePaid: { type: Date, default:Date.now() },
|
|
28
|
-
slipImageLocation: { type: String },
|
|
29
|
-
remarks: { type: String },
|
|
30
|
-
dateEntered: { type: Date, default:Date.now() },
|
|
31
|
-
audit: [
|
|
32
|
-
{
|
|
33
|
-
userId: { type: String },
|
|
34
|
-
auditedOn: { type: Date, default: null },
|
|
35
|
-
actionType: { type: String }
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const mongoBankTransfer = mongoose.model<BankTransferDocument>('Bank.Transfers', bankTransferSchema);
|
|
41
|
-
|
|
42
|
-
export { BankTransferDocument, mongoBankTransfer };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface BankTransferDocument extends Document {
|
|
5
|
+
transferId: number;
|
|
6
|
+
member: mongoose.Types.ObjectId;
|
|
7
|
+
branch: mongoose.Types.ObjectId;
|
|
8
|
+
datePaid: Date;
|
|
9
|
+
slipImageLocation: string;
|
|
10
|
+
remarks: string;
|
|
11
|
+
dateEntered: Date;
|
|
12
|
+
audit: Audit[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
mongoose.set('strictPopulate', false);
|
|
16
|
+
|
|
17
|
+
const bankTransferSchema = new Schema<BankTransferDocument>({
|
|
18
|
+
transferId: { type: Number },
|
|
19
|
+
member: {
|
|
20
|
+
type: Schema.Types.ObjectId,
|
|
21
|
+
ref: 'Members' //Reference to the 'Members' model
|
|
22
|
+
},
|
|
23
|
+
branch: {
|
|
24
|
+
type: Schema.Types.ObjectId,
|
|
25
|
+
ref: 'Branches' // Reference to the 'Branches' model
|
|
26
|
+
},
|
|
27
|
+
datePaid: { type: Date, default:Date.now() },
|
|
28
|
+
slipImageLocation: { type: String },
|
|
29
|
+
remarks: { type: String },
|
|
30
|
+
dateEntered: { type: Date, default:Date.now() },
|
|
31
|
+
audit: [
|
|
32
|
+
{
|
|
33
|
+
userId: { type: String },
|
|
34
|
+
auditedOn: { type: Date, default: null },
|
|
35
|
+
actionType: { type: String }
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const mongoBankTransfer = mongoose.model<BankTransferDocument>('Bank.Transfers', bankTransferSchema);
|
|
41
|
+
|
|
42
|
+
export { BankTransferDocument, mongoBankTransfer };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface BarcodeCategoryDocument extends Document {
|
|
5
|
-
barcodeCategoryCode: string;
|
|
6
|
-
barcodeCategoryName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: Audit[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const barcodeCategorySchema = new Schema<BarcodeCategoryDocument>({
|
|
12
|
-
barcodeCategoryCode: { type: String },
|
|
13
|
-
barcodeCategoryName: { 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 mongoBarcodeCategory = mongoose.model<BarcodeCategoryDocument>('Barcode.Categories', barcodeCategorySchema);
|
|
23
|
-
|
|
24
|
-
export { BarcodeCategoryDocument, mongoBarcodeCategory };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface BarcodeCategoryDocument extends Document {
|
|
5
|
+
barcodeCategoryCode: string;
|
|
6
|
+
barcodeCategoryName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: Audit[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const barcodeCategorySchema = new Schema<BarcodeCategoryDocument>({
|
|
12
|
+
barcodeCategoryCode: { type: String },
|
|
13
|
+
barcodeCategoryName: { 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 mongoBarcodeCategory = mongoose.model<BarcodeCategoryDocument>('Barcode.Categories', barcodeCategorySchema);
|
|
23
|
+
|
|
24
|
+
export { BarcodeCategoryDocument, mongoBarcodeCategory };
|
package/models/Branch.model.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface BranchDocument extends Document {
|
|
5
|
-
branchCode: string;
|
|
6
|
-
branchName: string;
|
|
7
|
-
branchShortCode: string;
|
|
8
|
-
branchType: mongoose.Types.ObjectId;
|
|
9
|
-
membershipTypes: [{
|
|
10
|
-
membershipType: mongoose.Types.ObjectId;
|
|
11
|
-
}],
|
|
12
|
-
logoFileLocation: string;
|
|
13
|
-
isPaymentGatewayEnabled:boolean;
|
|
14
|
-
isBarcodeEnabled: boolean;
|
|
15
|
-
isActive: boolean;
|
|
16
|
-
audit: Audit[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
mongoose.set('strictPopulate', false);
|
|
20
|
-
|
|
21
|
-
const branchSchema = new Schema<BranchDocument>({
|
|
22
|
-
branchCode: { type: String },
|
|
23
|
-
branchName: { type: String },
|
|
24
|
-
branchShortCode: { type: String },
|
|
25
|
-
branchType: {
|
|
26
|
-
type: Schema.Types.ObjectId,
|
|
27
|
-
ref: 'Branch.Types', // Reference to the 'BranchTypes' model
|
|
28
|
-
},
|
|
29
|
-
membershipTypes: [{
|
|
30
|
-
membershipType: {
|
|
31
|
-
type: Schema.Types.ObjectId,
|
|
32
|
-
ref: 'Membership.Types', // Reference to the 'BranchTypes' model
|
|
33
|
-
}
|
|
34
|
-
}],
|
|
35
|
-
isPaymentGatewayEnabled: { type:Boolean, default:true },
|
|
36
|
-
logoFileLocation: { type: String, default: ""},
|
|
37
|
-
isBarcodeEnabled: { type: Boolean, default: false },
|
|
38
|
-
isActive: { type: Boolean, default: true },
|
|
39
|
-
audit: [{
|
|
40
|
-
userId: { type: String },
|
|
41
|
-
auditedOn: { type: Date, default: null },
|
|
42
|
-
actionType: { type: String }
|
|
43
|
-
}]
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const mongoBranch = mongoose.model<BranchDocument>('Branches', branchSchema);
|
|
47
|
-
|
|
48
|
-
export { BranchDocument, mongoBranch };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface BranchDocument extends Document {
|
|
5
|
+
branchCode: string;
|
|
6
|
+
branchName: string;
|
|
7
|
+
branchShortCode: string;
|
|
8
|
+
branchType: mongoose.Types.ObjectId;
|
|
9
|
+
membershipTypes: [{
|
|
10
|
+
membershipType: mongoose.Types.ObjectId;
|
|
11
|
+
}],
|
|
12
|
+
logoFileLocation: string;
|
|
13
|
+
isPaymentGatewayEnabled:boolean;
|
|
14
|
+
isBarcodeEnabled: boolean;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
audit: Audit[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
mongoose.set('strictPopulate', false);
|
|
20
|
+
|
|
21
|
+
const branchSchema = new Schema<BranchDocument>({
|
|
22
|
+
branchCode: { type: String },
|
|
23
|
+
branchName: { type: String },
|
|
24
|
+
branchShortCode: { type: String },
|
|
25
|
+
branchType: {
|
|
26
|
+
type: Schema.Types.ObjectId,
|
|
27
|
+
ref: 'Branch.Types', // Reference to the 'BranchTypes' model
|
|
28
|
+
},
|
|
29
|
+
membershipTypes: [{
|
|
30
|
+
membershipType: {
|
|
31
|
+
type: Schema.Types.ObjectId,
|
|
32
|
+
ref: 'Membership.Types', // Reference to the 'BranchTypes' model
|
|
33
|
+
}
|
|
34
|
+
}],
|
|
35
|
+
isPaymentGatewayEnabled: { type:Boolean, default:true },
|
|
36
|
+
logoFileLocation: { type: String, default: ""},
|
|
37
|
+
isBarcodeEnabled: { type: Boolean, default: false },
|
|
38
|
+
isActive: { type: Boolean, default: true },
|
|
39
|
+
audit: [{
|
|
40
|
+
userId: { type: String },
|
|
41
|
+
auditedOn: { type: Date, default: null },
|
|
42
|
+
actionType: { type: String }
|
|
43
|
+
}]
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const mongoBranch = mongoose.model<BranchDocument>('Branches', branchSchema);
|
|
47
|
+
|
|
48
|
+
export { BranchDocument, mongoBranch };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface BranchTypeDocument extends Document {
|
|
5
|
-
branchTypeCode: string;
|
|
6
|
-
branchTypeName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: [Audit];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const branchTypeSchema = new Schema<BranchTypeDocument>({
|
|
12
|
-
branchTypeCode: { type: String },
|
|
13
|
-
branchTypeName: { 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 mongoBranchType = mongoose.model<BranchTypeDocument>('Branch.Types', branchTypeSchema);
|
|
23
|
-
|
|
24
|
-
export { BranchTypeDocument, mongoBranchType };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface BranchTypeDocument extends Document {
|
|
5
|
+
branchTypeCode: string;
|
|
6
|
+
branchTypeName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: [Audit];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const branchTypeSchema = new Schema<BranchTypeDocument>({
|
|
12
|
+
branchTypeCode: { type: String },
|
|
13
|
+
branchTypeName: { 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 mongoBranchType = mongoose.model<BranchTypeDocument>('Branch.Types', branchTypeSchema);
|
|
23
|
+
|
|
24
|
+
export { BranchTypeDocument, mongoBranchType };
|
package/models/Counter.model.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
|
|
3
|
-
interface CounterDocument extends Document {
|
|
4
|
-
counterId: string;
|
|
5
|
-
seq: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const counterSchema = new Schema<CounterDocument>({
|
|
9
|
-
counterId: { type: String },
|
|
10
|
-
seq: { type: Number }
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const mongoCounter = mongoose.model<CounterDocument>('Counters', counterSchema);
|
|
14
|
-
|
|
15
|
-
export { CounterDocument, mongoCounter };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
interface CounterDocument extends Document {
|
|
4
|
+
counterId: string;
|
|
5
|
+
seq: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const counterSchema = new Schema<CounterDocument>({
|
|
9
|
+
counterId: { type: String },
|
|
10
|
+
seq: { type: Number }
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const mongoCounter = mongoose.model<CounterDocument>('Counters', counterSchema);
|
|
14
|
+
|
|
15
|
+
export { CounterDocument, mongoCounter };
|
package/models/Country.model.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface CountryDocument extends Document {
|
|
5
|
-
countryCode: string;
|
|
6
|
-
countryName: string;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
audit: [Audit];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const countrySchema = new Schema<CountryDocument>({
|
|
12
|
-
countryCode: { type: String },
|
|
13
|
-
countryName: { 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 mongoCountry = mongoose.model<CountryDocument>('Countries', countrySchema);
|
|
23
|
-
|
|
24
|
-
export { CountryDocument, mongoCountry };
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface CountryDocument extends Document {
|
|
5
|
+
countryCode: string;
|
|
6
|
+
countryName: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
audit: [Audit];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const countrySchema = new Schema<CountryDocument>({
|
|
12
|
+
countryCode: { type: String },
|
|
13
|
+
countryName: { 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 mongoCountry = mongoose.model<CountryDocument>('Countries', countrySchema);
|
|
23
|
+
|
|
24
|
+
export { CountryDocument, mongoCountry };
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
-
import { Audit } from '../interface/Audit.interface';
|
|
3
|
-
|
|
4
|
-
interface FieldCategoryDocument extends Document {
|
|
5
|
-
fieldCategoryCode: string;
|
|
6
|
-
fieldCategoryName: string;
|
|
7
|
-
fieldCategorySequence: number;
|
|
8
|
-
isActive: boolean;
|
|
9
|
-
audit: Audit[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const fieldCategorySchema = new Schema<FieldCategoryDocument>({
|
|
13
|
-
fieldCategoryCode: { type: String },
|
|
14
|
-
fieldCategoryName: { type: String },
|
|
15
|
-
fieldCategorySequence: { type: Number },
|
|
16
|
-
isActive: { type: Boolean, default: true },
|
|
17
|
-
audit: [{
|
|
18
|
-
userId: { type: String },
|
|
19
|
-
auditedOn: { type: Date, default: null },
|
|
20
|
-
actionType: { type: String }
|
|
21
|
-
}]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import mongoose, { Document, Schema } from 'mongoose';
|
|
2
|
+
import { Audit } from '../interface/Audit.interface';
|
|
3
|
+
|
|
4
|
+
interface FieldCategoryDocument extends Document {
|
|
5
|
+
fieldCategoryCode: string;
|
|
6
|
+
fieldCategoryName: string;
|
|
7
|
+
fieldCategorySequence: number;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
audit: Audit[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const fieldCategorySchema = new Schema<FieldCategoryDocument>({
|
|
13
|
+
fieldCategoryCode: { type: String },
|
|
14
|
+
fieldCategoryName: { type: String },
|
|
15
|
+
fieldCategorySequence: { type: Number },
|
|
16
|
+
isActive: { type: Boolean, default: true },
|
|
17
|
+
audit: [{
|
|
18
|
+
userId: { type: String },
|
|
19
|
+
auditedOn: { type: Date, default: null },
|
|
20
|
+
actionType: { type: String }
|
|
21
|
+
}]
|
|
22
|
+
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const mongoFieldCategory = mongoose.model<FieldCategoryDocument>('Field.Categories', fieldCategorySchema);
|
|
26
|
+
|
|
27
|
+
export { FieldCategoryDocument, mongoFieldCategory };
|