pristine-member-nest-api-database 1.0.58 → 1.0.60
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/dist/index.js +10 -2
- package/dist/models/Editor.FieldMaster.model.js +57 -0
- package/dist/models/FieldTypes.model.js +3 -6
- package/index.ts +15 -3
- package/models/Editor.FieldMaster.model.ts +136 -0
- package/models/FieldTypes.model.ts +3 -80
- package/package.json +1 -1
- package/models/EditorFieldMaster.model.ts +0 -57
package/dist/index.js
CHANGED
|
@@ -34,7 +34,6 @@ __exportStar(require("./models/MembershipStatus.model"), exports);
|
|
|
34
34
|
__exportStar(require("./models/MembershipType.model"), exports);
|
|
35
35
|
__exportStar(require("./models/NatureOfBusiness.model"), exports);
|
|
36
36
|
__exportStar(require("./models/ProductsServices.model"), exports);
|
|
37
|
-
__exportStar(require("./models/MainProductOrServices.model"), exports);
|
|
38
37
|
__exportStar(require("./models/OrganizationTypesMaster.model"), exports);
|
|
39
38
|
__exportStar(require("./models/payment.model"), exports);
|
|
40
39
|
__exportStar(require("./models/SeatingArrangement.ir.model"), exports);
|
|
@@ -44,9 +43,18 @@ __exportStar(require("./models/UserRole.model"), exports);
|
|
|
44
43
|
__exportStar(require("./models/VehicleCategory.ir.model"), exports);
|
|
45
44
|
__exportStar(require("./models/TermsConditions.model"), exports);
|
|
46
45
|
__exportStar(require("./models/PrivacyPolicies.model"), exports);
|
|
46
|
+
//new
|
|
47
47
|
__exportStar(require("./models/Containers.model"), exports);
|
|
48
|
-
__exportStar(require("./models/
|
|
48
|
+
__exportStar(require("./models/FieldCategory.model"), exports);
|
|
49
49
|
__exportStar(require("./models/FieldTypes.model"), exports);
|
|
50
|
+
__exportStar(require("./models/Editor.FieldMaster.model"), exports);
|
|
51
|
+
__exportStar(require("./models/MainProductOrServices.model"), exports);
|
|
52
|
+
__exportStar(require("./models/Editor.BPCompany.Types"), exports);
|
|
53
|
+
__exportStar(require("./models/Editor.PureStatic.Category.Field.Mapping"), exports);
|
|
54
|
+
__exportStar(require("./models/Editor.StaticVariable.Category.Field.Mapping"), exports);
|
|
55
|
+
__exportStar(require("./models/Editor.BPcompanyTpes.Branch.Field.Category.Mapping"), exports);
|
|
56
|
+
__exportStar(require("./models/Editor.SLIITO.Category.Field.Mapping"), exports);
|
|
57
|
+
__exportStar(require("./models/Editor.Application.model"), exports);
|
|
50
58
|
__exportStar(require("./src/dbConnect"), exports);
|
|
51
59
|
//packege version 1.0.37 gs1 changes
|
|
52
60
|
//packege version 1.0.38 and 1.0.38 after application(application verification stable 1.0.40) verification without GS1 changes
|
|
@@ -0,0 +1,57 @@
|
|
|
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.mongoEditorField = void 0;
|
|
27
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
28
|
+
const fieldSchema = new mongoose_1.Schema({
|
|
29
|
+
fieldCode: { type: String },
|
|
30
|
+
fieldName: { type: String },
|
|
31
|
+
FieldTypeId: {
|
|
32
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
33
|
+
ref: "Field.Types", // Reference to the 'field Types' model
|
|
34
|
+
required: false,
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
37
|
+
ManagerEdit: { type: Boolean, default: false },
|
|
38
|
+
MemberEdit: { type: Boolean, default: false },
|
|
39
|
+
SapSync: { type: Boolean, default: false },
|
|
40
|
+
fieldConfig: {
|
|
41
|
+
mandatory: { type: Boolean, default: false },
|
|
42
|
+
minLength: { type: Number, default: null },
|
|
43
|
+
maxLength: { type: Number, default: null },
|
|
44
|
+
pattern: { type: String, default: null },
|
|
45
|
+
},
|
|
46
|
+
isSystemDefined: { type: Boolean, default: false },
|
|
47
|
+
isActive: { type: Boolean, default: true },
|
|
48
|
+
audit: [
|
|
49
|
+
{
|
|
50
|
+
userId: { type: String },
|
|
51
|
+
auditedOn: { type: Date, default: null },
|
|
52
|
+
actionType: { type: String },
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
});
|
|
56
|
+
const mongoEditorField = mongoose_1.default.model("Editor.Fields.Master", fieldSchema);
|
|
57
|
+
exports.mongoEditorField = mongoEditorField;
|
|
@@ -44,11 +44,12 @@ var FieldTypeEnum;
|
|
|
44
44
|
FieldTypeEnum["MULTIPLEATTACHMENT"] = "MULTIPLEATTACHMENT";
|
|
45
45
|
FieldTypeEnum["TABLE"] = "TABLE";
|
|
46
46
|
FieldTypeEnum["MATRIX"] = "MATRIX";
|
|
47
|
+
FieldTypeEnum["SCHEMA"] = "SCHEMA";
|
|
47
48
|
})(FieldTypeEnum || (exports.FieldTypeEnum = FieldTypeEnum = {}));
|
|
48
49
|
/* =========================
|
|
49
50
|
SCHEMA
|
|
50
51
|
========================= */
|
|
51
|
-
const
|
|
52
|
+
const fieldTypeSchema = new mongoose_1.Schema({
|
|
52
53
|
fieldTypeCode: {
|
|
53
54
|
type: String,
|
|
54
55
|
required: true,
|
|
@@ -68,10 +69,6 @@ const fieldSchema = new mongoose_1.Schema({
|
|
|
68
69
|
type: String,
|
|
69
70
|
trim: true,
|
|
70
71
|
},
|
|
71
|
-
config: {
|
|
72
|
-
type: mongoose_1.Schema.Types.Mixed,
|
|
73
|
-
default: {},
|
|
74
|
-
},
|
|
75
72
|
isSystemDefined: {
|
|
76
73
|
type: Boolean,
|
|
77
74
|
default: false,
|
|
@@ -93,4 +90,4 @@ const fieldSchema = new mongoose_1.Schema({
|
|
|
93
90
|
/* =========================
|
|
94
91
|
MODEL
|
|
95
92
|
========================= */
|
|
96
|
-
exports.mongoEditorFieldType = mongoose_1.default.model("Editor.FieldType",
|
|
93
|
+
exports.mongoEditorFieldType = mongoose_1.default.model("Editor.FieldType", fieldTypeSchema);
|
package/index.ts
CHANGED
|
@@ -18,7 +18,6 @@ export * from "./models/MembershipStatus.model";
|
|
|
18
18
|
export * from "./models/MembershipType.model";
|
|
19
19
|
export * from "./models/NatureOfBusiness.model";
|
|
20
20
|
export * from "./models/ProductsServices.model";
|
|
21
|
-
export * from "./models/MainProductOrServices.model";
|
|
22
21
|
|
|
23
22
|
export * from "./models/OrganizationTypesMaster.model";
|
|
24
23
|
export * from "./models/payment.model";
|
|
@@ -29,10 +28,23 @@ export * from "./models/UserRole.model";
|
|
|
29
28
|
export * from "./models/VehicleCategory.ir.model";
|
|
30
29
|
export * from "./models/TermsConditions.model";
|
|
31
30
|
export * from "./models/PrivacyPolicies.model";
|
|
32
|
-
export * from "./models/Containers.model";
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
//new
|
|
33
|
+
export * from "./models/Containers.model";
|
|
34
|
+
export * from "./models/FieldCategory.model";
|
|
35
35
|
export * from "./models/FieldTypes.model";
|
|
36
|
+
export * from "./models/Editor.FieldMaster.model";
|
|
37
|
+
export * from "./models/MainProductOrServices.model";
|
|
38
|
+
export * from "./models/Editor.BPCompany.Types";
|
|
39
|
+
|
|
40
|
+
export * from "./models/Editor.PureStatic.Category.Field.Mapping";
|
|
41
|
+
export * from "./models/Editor.StaticVariable.Category.Field.Mapping";
|
|
42
|
+
|
|
43
|
+
export * from "./models/Editor.BPcompanyTpes.Branch.Field.Category.Mapping";
|
|
44
|
+
export * from "./models/Editor.SLIITO.Category.Field.Mapping";
|
|
45
|
+
|
|
46
|
+
export * from "./models/Editor.Application.model";
|
|
47
|
+
|
|
36
48
|
export * from "./src/dbConnect";
|
|
37
49
|
|
|
38
50
|
//packege version 1.0.37 gs1 changes
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
+
import { Audit } from "../interface/Audit.interface";
|
|
3
|
+
import { FieldTypeEnum } from "./FieldTypes.model";
|
|
4
|
+
|
|
5
|
+
// TEXT
|
|
6
|
+
export interface TextFieldConfig {
|
|
7
|
+
pattern?: string | null; // regex pattern for validation
|
|
8
|
+
minLength?: number | null;
|
|
9
|
+
maxLength?: number | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//decimal ```NUMBER
|
|
13
|
+
export interface DecimalNumberFieldConfig {
|
|
14
|
+
step?: number; // for decimals
|
|
15
|
+
pattern?: string; // regex pattern for validation
|
|
16
|
+
minLength?: number | null;
|
|
17
|
+
maxLength?: number | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//whole number ```NUMBER
|
|
21
|
+
export interface WholeNumberFieldConfig {
|
|
22
|
+
pattern?: string; // regex pattern for validation
|
|
23
|
+
minLength?: number | null;
|
|
24
|
+
maxLength?: number | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// OPTIONS (checkbox / dropdown)
|
|
28
|
+
export interface OptionConfig {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface OptionFieldConfig {
|
|
34
|
+
options?: OptionConfig[];
|
|
35
|
+
allowMultiple?: boolean;
|
|
36
|
+
referenceCollection?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// TABLE
|
|
40
|
+
export interface TableColumn {
|
|
41
|
+
columnId: string;
|
|
42
|
+
label: string;
|
|
43
|
+
type: FieldTypeEnum;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
referenceCollection?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// MATRIX
|
|
49
|
+
export interface MatrixRow {
|
|
50
|
+
rowId: string;
|
|
51
|
+
label: string;
|
|
52
|
+
type: FieldTypeEnum;
|
|
53
|
+
required?: boolean;
|
|
54
|
+
referenceCollection?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface MatrixColumn {
|
|
58
|
+
columnId: string;
|
|
59
|
+
label: string;
|
|
60
|
+
type: FieldTypeEnum;
|
|
61
|
+
required?: boolean;
|
|
62
|
+
referenceCollection?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface TableFieldConfig {
|
|
66
|
+
columns: TableColumn[];
|
|
67
|
+
minRows?: number;
|
|
68
|
+
maxRows?: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface MatrixFieldConfig {
|
|
72
|
+
rows: MatrixRow[];
|
|
73
|
+
columns: MatrixColumn[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* =========================
|
|
77
|
+
UNION CONFIG TYPE
|
|
78
|
+
========================= */
|
|
79
|
+
export type FieldConfig =
|
|
80
|
+
| TextFieldConfig
|
|
81
|
+
| WholeNumberFieldConfig
|
|
82
|
+
| DecimalNumberFieldConfig
|
|
83
|
+
| OptionFieldConfig
|
|
84
|
+
| TableFieldConfig
|
|
85
|
+
| MatrixFieldConfig
|
|
86
|
+
| null;
|
|
87
|
+
|
|
88
|
+
interface EditorField extends Document {
|
|
89
|
+
fieldCode: string;
|
|
90
|
+
fieldName: string;
|
|
91
|
+
FieldTypeId: mongoose.Types.ObjectId;
|
|
92
|
+
isSystemDefined: boolean;
|
|
93
|
+
SapSync: boolean;
|
|
94
|
+
MemberEdit: boolean;
|
|
95
|
+
ManagerEdit: boolean;
|
|
96
|
+
mandatory: boolean;
|
|
97
|
+
fieldConfig: FieldConfig;
|
|
98
|
+
isActive: boolean;
|
|
99
|
+
audit: Audit[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const fieldSchema = new Schema<EditorField>({
|
|
103
|
+
fieldCode: { type: String },
|
|
104
|
+
fieldName: { type: String },
|
|
105
|
+
FieldTypeId: {
|
|
106
|
+
type: Schema.Types.ObjectId,
|
|
107
|
+
ref: "Field.Types", // Reference to the 'field Types' model
|
|
108
|
+
required: false,
|
|
109
|
+
default: null,
|
|
110
|
+
},
|
|
111
|
+
ManagerEdit: { type: Boolean, default: false },
|
|
112
|
+
MemberEdit: { type: Boolean, default: false },
|
|
113
|
+
SapSync: { type: Boolean, default: false },
|
|
114
|
+
fieldConfig: {
|
|
115
|
+
mandatory: { type: Boolean, default: false },
|
|
116
|
+
minLength: { type: Number, default: null },
|
|
117
|
+
maxLength: { type: Number, default: null },
|
|
118
|
+
pattern: { type: String, default: null },
|
|
119
|
+
},
|
|
120
|
+
isSystemDefined: { type: Boolean, default: false },
|
|
121
|
+
isActive: { type: Boolean, default: true },
|
|
122
|
+
audit: [
|
|
123
|
+
{
|
|
124
|
+
userId: { type: String },
|
|
125
|
+
auditedOn: { type: Date, default: null },
|
|
126
|
+
actionType: { type: String },
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const mongoEditorField = mongoose.model<EditorField>(
|
|
132
|
+
"Editor.Fields.Master",
|
|
133
|
+
fieldSchema,
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
export { EditorField, mongoEditorField };
|
|
@@ -19,84 +19,13 @@ export enum FieldTypeEnum {
|
|
|
19
19
|
MULTIPLEATTACHMENT = "MULTIPLEATTACHMENT",
|
|
20
20
|
TABLE = "TABLE",
|
|
21
21
|
MATRIX = "MATRIX",
|
|
22
|
+
SCHEMA = "SCHEMA",
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/* =========================
|
|
25
26
|
CONFIG INTERFACES
|
|
26
27
|
========================= */
|
|
27
28
|
|
|
28
|
-
// TEXT
|
|
29
|
-
export interface TextFieldConfig {
|
|
30
|
-
pattern?: string | null; // regex pattern for validation
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//decimal ```NUMBER
|
|
34
|
-
export interface DecimalNumberFieldConfig {
|
|
35
|
-
step?: number; // for decimals
|
|
36
|
-
pattern?: string; // regex pattern for validation
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//whole number ```NUMBER
|
|
40
|
-
export interface WholeNumberFieldConfig {
|
|
41
|
-
pattern?: string; // regex pattern for validation
|
|
42
|
-
}
|
|
43
|
-
export interface DecimalNumberFieldConfig {
|
|
44
|
-
step?: number; // for decimals add number of decimal places allowed
|
|
45
|
-
pattern?: string; // regex pattern for validation
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// OPTIONS (checkbox / dropdown)
|
|
49
|
-
export interface OptionConfig {
|
|
50
|
-
value: string;
|
|
51
|
-
label: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface OptionFieldConfig {
|
|
55
|
-
options: OptionConfig[];
|
|
56
|
-
allowMultiple?: boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// TABLE
|
|
60
|
-
export interface TableColumn {
|
|
61
|
-
columnId: string;
|
|
62
|
-
label: string;
|
|
63
|
-
type: string; // can be dynamic
|
|
64
|
-
required?: boolean;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface TableFieldConfig {
|
|
68
|
-
columns: TableColumn[];
|
|
69
|
-
minRows?: number;
|
|
70
|
-
maxRows?: number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// MATRIX
|
|
74
|
-
export interface MatrixRow {
|
|
75
|
-
rowId: string;
|
|
76
|
-
label: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface MatrixColumn {
|
|
80
|
-
columnId: string;
|
|
81
|
-
label: string;
|
|
82
|
-
type: string; // can be dynamic
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface MatrixFieldConfig {
|
|
86
|
-
rows: MatrixRow[];
|
|
87
|
-
columns: MatrixColumn[];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* =========================
|
|
91
|
-
UNION CONFIG TYPE
|
|
92
|
-
========================= */
|
|
93
|
-
export type FieldConfig =
|
|
94
|
-
| TextFieldConfig
|
|
95
|
-
| OptionFieldConfig
|
|
96
|
-
| TableFieldConfig
|
|
97
|
-
| MatrixFieldConfig
|
|
98
|
-
| null;
|
|
99
|
-
|
|
100
29
|
/* =========================
|
|
101
30
|
MAIN DOCUMENT INTERFACE
|
|
102
31
|
========================= */
|
|
@@ -105,7 +34,6 @@ export interface EditorFieldType extends Document {
|
|
|
105
34
|
fieldEnum: FieldTypeEnum; // holds enum value
|
|
106
35
|
fieldTypeName: string;
|
|
107
36
|
fieldTypeDescription?: string;
|
|
108
|
-
config: FieldConfig;
|
|
109
37
|
isSystemDefined: boolean;
|
|
110
38
|
isActive: boolean;
|
|
111
39
|
audit: Audit[];
|
|
@@ -114,7 +42,7 @@ export interface EditorFieldType extends Document {
|
|
|
114
42
|
/* =========================
|
|
115
43
|
SCHEMA
|
|
116
44
|
========================= */
|
|
117
|
-
const
|
|
45
|
+
const fieldTypeSchema = new Schema<EditorFieldType>(
|
|
118
46
|
{
|
|
119
47
|
fieldTypeCode: {
|
|
120
48
|
type: String,
|
|
@@ -139,11 +67,6 @@ const fieldSchema = new Schema<EditorFieldType>(
|
|
|
139
67
|
trim: true,
|
|
140
68
|
},
|
|
141
69
|
|
|
142
|
-
config: {
|
|
143
|
-
type: Schema.Types.Mixed,
|
|
144
|
-
default: {},
|
|
145
|
-
},
|
|
146
|
-
|
|
147
70
|
isSystemDefined: {
|
|
148
71
|
type: Boolean,
|
|
149
72
|
default: false,
|
|
@@ -172,5 +95,5 @@ const fieldSchema = new Schema<EditorFieldType>(
|
|
|
172
95
|
========================= */
|
|
173
96
|
export const mongoEditorFieldType = mongoose.model<EditorFieldType>(
|
|
174
97
|
"Editor.FieldType",
|
|
175
|
-
|
|
98
|
+
fieldTypeSchema,
|
|
176
99
|
);
|
package/package.json
CHANGED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
-
import { Audit } from "../interface/Audit.interface";
|
|
3
|
-
|
|
4
|
-
interface EditorField extends Document {
|
|
5
|
-
fieldCode: string;
|
|
6
|
-
fieldName: string;
|
|
7
|
-
FieldTypeId: mongoose.Types.ObjectId;
|
|
8
|
-
isSystemDefined: boolean;
|
|
9
|
-
SapSync: boolean;
|
|
10
|
-
MemberEdit: boolean;
|
|
11
|
-
ManagerEdit: boolean;
|
|
12
|
-
fieldConfig?: {
|
|
13
|
-
mandatory: boolean;
|
|
14
|
-
minLength?: number | null;
|
|
15
|
-
maxLength?: number | null;
|
|
16
|
-
pattern?: string | null;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
isActive: boolean;
|
|
20
|
-
audit: Audit[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const fieldSchema = new Schema<EditorField>({
|
|
24
|
-
fieldCode: { type: String },
|
|
25
|
-
fieldName: { type: String },
|
|
26
|
-
FieldTypeId: {
|
|
27
|
-
type: Schema.Types.ObjectId,
|
|
28
|
-
ref: "Field.Types", // Reference to the 'Container' model
|
|
29
|
-
required: false,
|
|
30
|
-
default: null,
|
|
31
|
-
},
|
|
32
|
-
ManagerEdit: { type: Boolean, default: false },
|
|
33
|
-
MemberEdit: { type: Boolean, default: false },
|
|
34
|
-
SapSync: { type: Boolean, default: false },
|
|
35
|
-
fieldConfig: {
|
|
36
|
-
mandatory: { type: Boolean, default: false },
|
|
37
|
-
minLength: { type: Number, default: null },
|
|
38
|
-
maxLength: { type: Number, default: null },
|
|
39
|
-
pattern: { type: String, default: null },
|
|
40
|
-
},
|
|
41
|
-
isSystemDefined: { type: Boolean, default: false },
|
|
42
|
-
isActive: { type: Boolean, default: true },
|
|
43
|
-
audit: [
|
|
44
|
-
{
|
|
45
|
-
userId: { type: String },
|
|
46
|
-
auditedOn: { type: Date, default: null },
|
|
47
|
-
actionType: { type: String },
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const mongoEditorField = mongoose.model<EditorField>(
|
|
53
|
-
"Editor.Fields.Master",
|
|
54
|
-
fieldSchema,
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
export { EditorField, mongoEditorField };
|