pristine-member-nest-api-database 1.0.79 → 1.0.81

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.
@@ -50,31 +50,27 @@ const ApplicationSchemSchema = new mongoose_1.Schema({
50
50
  type: Number,
51
51
  required: true,
52
52
  },
53
- fields: {
54
- type: [
55
- {
56
- fieldId: {
57
- type: mongoose_1.Schema.Types.ObjectId,
58
- ref: "Field.Categories",
59
- required: true,
60
- },
53
+ fields: [
54
+ {
55
+ fieldId: {
56
+ type: mongoose_1.Schema.Types.ObjectId,
57
+ ref: "Field.Categories", // (optional: should be Field.Master probably)
58
+ required: true,
61
59
  },
62
- {
63
- fieldSequence: {
64
- type: Number,
65
- required: true,
66
- },
67
- fieldDescription: {
68
- type: String,
69
- default: "",
70
- },
71
- activeStatus: {
72
- type: Boolean,
73
- default: true,
74
- },
60
+ fieldSequence: {
61
+ type: Number,
62
+ required: true,
75
63
  },
76
- ],
77
- },
64
+ fieldDescription: {
65
+ type: String,
66
+ default: "",
67
+ },
68
+ activeStatus: {
69
+ type: Boolean,
70
+ default: true,
71
+ },
72
+ },
73
+ ],
78
74
  },
79
75
  ],
80
76
  required: true,
@@ -28,12 +28,6 @@ const mongoose_1 = __importStar(require("mongoose"));
28
28
  const MainProductsOrServicesMasterSchema = new mongoose_1.Schema({
29
29
  MainProductsOrServicesMasterCode: { type: String },
30
30
  MainProductsOrServicesName: { type: String },
31
- prodcutServiceId: {
32
- type: mongoose_1.Schema.Types.ObjectId,
33
- ref: "Products.ServicesMaster", // Reference to the 'Products.ServicesMaster' model
34
- required: false,
35
- default: null,
36
- },
37
31
  isActive: { type: Boolean, default: true },
38
32
  audit: [
39
33
  {
@@ -28,6 +28,9 @@ const mongoose_1 = __importStar(require("mongoose"));
28
28
  const NatureOfBusinessMasterSchema = new mongoose_1.Schema({
29
29
  NatureOfBusinessMasterCode: { type: String },
30
30
  NatureMasterName: { type: String },
31
+ ProductAndServicesIds: [
32
+ { type: mongoose_1.Types.ObjectId, ref: "Products.ServicesMaster" },
33
+ ],
31
34
  isActive: { type: Boolean, default: true },
32
35
  audit: [
33
36
  {
@@ -28,12 +28,9 @@ const mongoose_1 = __importStar(require("mongoose"));
28
28
  const ProductsAndServicesMasterSchema = new mongoose_1.Schema({
29
29
  ProductsAndServicesMasterCode: { type: String },
30
30
  ProductsAndServicesMasterName: { type: String },
31
- NatureOfBusinessId: {
32
- type: mongoose_1.Schema.Types.ObjectId,
33
- ref: "NatureOfBusiness.Master", // Reference to the 'NatureOfBusiness' model
34
- required: false,
35
- default: null,
36
- },
31
+ MainProductsOrServicesIds: [
32
+ { type: mongoose_1.Types.ObjectId, ref: "MainProductsOrServices.Master" },
33
+ ],
37
34
  isActive: { type: Boolean, default: true },
38
35
  audit: [
39
36
  {
@@ -57,32 +57,30 @@ const ApplicationSchemSchema = new Schema<IApplicationDocument>({
57
57
  required: true,
58
58
  },
59
59
 
60
- fields: {
61
- type: [
62
- {
63
- fieldId: {
64
- type: Schema.Types.ObjectId,
65
- ref: "Field.Categories",
66
- required: true,
67
- },
60
+ fields: [
61
+ {
62
+ fieldId: {
63
+ type: Schema.Types.ObjectId,
64
+ ref: "Field.Categories", // (optional: should be Field.Master probably)
65
+ required: true,
68
66
  },
69
- {
70
- fieldSequence: {
71
- type: Number,
72
- required: true,
73
- },
74
67
 
75
- fieldDescription: {
76
- type: String,
77
- default: "",
78
- },
79
- activeStatus: {
80
- type: Boolean,
81
- default: true,
82
- },
68
+ fieldSequence: {
69
+ type: Number,
70
+ required: true,
83
71
  },
84
- ],
85
- },
72
+
73
+ fieldDescription: {
74
+ type: String,
75
+ default: "",
76
+ },
77
+
78
+ activeStatus: {
79
+ type: Boolean,
80
+ default: true,
81
+ },
82
+ },
83
+ ],
86
84
  },
87
85
  ],
88
86
  required: true,
@@ -4,7 +4,6 @@ import { Audit } from "../interface/Audit.interface";
4
4
  interface MainProductsOrServicesMasterDocument extends Document {
5
5
  MainProductsOrServicesMasterCode: string;
6
6
  MainProductsOrServicesName: string;
7
- prodcutServiceId: mongoose.Types.ObjectId;
8
7
  isActive: boolean;
9
8
  audit: Audit[];
10
9
  }
@@ -13,12 +12,6 @@ const MainProductsOrServicesMasterSchema =
13
12
  new Schema<MainProductsOrServicesMasterDocument>({
14
13
  MainProductsOrServicesMasterCode: { type: String },
15
14
  MainProductsOrServicesName: { type: String },
16
- prodcutServiceId: {
17
- type: Schema.Types.ObjectId,
18
- ref: "Products.ServicesMaster", // Reference to the 'Products.ServicesMaster' model
19
- required: false,
20
- default: null,
21
- },
22
15
  isActive: { type: Boolean, default: true },
23
16
  audit: [
24
17
  {
@@ -1,9 +1,10 @@
1
- import mongoose, { Document, Schema } from "mongoose";
1
+ import mongoose, { Document, Schema, Types } from "mongoose";
2
2
  import { Audit } from "../interface/Audit.interface";
3
3
 
4
4
  interface NatureOfBusinessMasterDocument extends Document {
5
5
  NatureOfBusinessMasterCode: string;
6
6
  NatureMasterName: string;
7
+ ProductAndServicesIds: Types.ObjectId[];
7
8
  isActive: boolean;
8
9
  audit: Audit[];
9
10
  }
@@ -12,6 +13,9 @@ const NatureOfBusinessMasterSchema = new Schema<NatureOfBusinessMasterDocument>(
12
13
  {
13
14
  NatureOfBusinessMasterCode: { type: String },
14
15
  NatureMasterName: { type: String },
16
+ ProductAndServicesIds: [
17
+ { type: Types.ObjectId, ref: "Products.ServicesMaster" },
18
+ ],
15
19
  isActive: { type: Boolean, default: true },
16
20
  audit: [
17
21
  {
@@ -20,13 +24,13 @@ const NatureOfBusinessMasterSchema = new Schema<NatureOfBusinessMasterDocument>(
20
24
  actionType: { type: String },
21
25
  },
22
26
  ],
23
- }
27
+ },
24
28
  );
25
29
 
26
30
  const mongoNatureOfBusinessMaster =
27
31
  mongoose.model<NatureOfBusinessMasterDocument>(
28
32
  "NatureOfBusiness.Master",
29
- NatureOfBusinessMasterSchema
33
+ NatureOfBusinessMasterSchema,
30
34
  );
31
35
 
32
36
  export { NatureOfBusinessMasterDocument, mongoNatureOfBusinessMaster };
@@ -1,10 +1,10 @@
1
- import mongoose, { Document, Schema } from "mongoose";
1
+ import mongoose, { Document, Schema, Types } from "mongoose";
2
2
  import { Audit } from "../interface/Audit.interface";
3
3
 
4
4
  interface ProductsAndServicesMasterDocument extends Document {
5
5
  ProductsAndServicesMasterCode: string;
6
6
  ProductsAndServicesMasterName: string;
7
- NatureOfBusinessId: mongoose.Types.ObjectId;
7
+ MainProductsOrServicesIds: Types.ObjectId[];
8
8
  isActive: boolean;
9
9
  audit: Audit[];
10
10
  }
@@ -13,12 +13,9 @@ const ProductsAndServicesMasterSchema =
13
13
  new Schema<ProductsAndServicesMasterDocument>({
14
14
  ProductsAndServicesMasterCode: { type: String },
15
15
  ProductsAndServicesMasterName: { type: String },
16
- NatureOfBusinessId: {
17
- type: Schema.Types.ObjectId,
18
- ref: "NatureOfBusiness.Master", // Reference to the 'NatureOfBusiness' model
19
- required: false,
20
- default: null,
21
- },
16
+ MainProductsOrServicesIds: [
17
+ { type: Types.ObjectId, ref: "MainProductsOrServices.Master" },
18
+ ],
22
19
  isActive: { type: Boolean, default: true },
23
20
  audit: [
24
21
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "description": "application verification database changes with gs1 branch. not tested. ",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {