pristine-member-nest-api-database 1.0.8 → 1.0.9
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,7 +1,8 @@
|
|
|
1
|
-
import mongoose, { Document, Schema } from
|
|
2
|
-
import { Audit } from
|
|
1
|
+
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
+
import { Audit } from "../interface/Audit.interface";
|
|
3
3
|
|
|
4
4
|
interface FieldCategoryDocument extends Document {
|
|
5
|
+
fieldUUId: string;
|
|
5
6
|
fieldCategoryCode: string;
|
|
6
7
|
fieldCategoryName: string;
|
|
7
8
|
fieldCategorySequence: number;
|
|
@@ -10,18 +11,23 @@ interface FieldCategoryDocument extends Document {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
const fieldCategorySchema = new Schema<FieldCategoryDocument>({
|
|
14
|
+
fieldUUId: { type: String },
|
|
13
15
|
fieldCategoryCode: { type: String },
|
|
14
16
|
fieldCategoryName: { type: String },
|
|
15
17
|
fieldCategorySequence: { type: Number },
|
|
16
18
|
isActive: { type: Boolean, default: true },
|
|
17
|
-
audit: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
audit: [
|
|
20
|
+
{
|
|
21
|
+
userId: { type: String },
|
|
22
|
+
auditedOn: { type: Date, default: null },
|
|
23
|
+
actionType: { type: String },
|
|
24
|
+
},
|
|
25
|
+
],
|
|
23
26
|
});
|
|
24
27
|
|
|
25
|
-
const mongoFieldCategory = mongoose.model<FieldCategoryDocument>(
|
|
28
|
+
const mongoFieldCategory = mongoose.model<FieldCategoryDocument>(
|
|
29
|
+
"Field.Categories",
|
|
30
|
+
fieldCategorySchema
|
|
31
|
+
);
|
|
26
32
|
|
|
27
33
|
export { FieldCategoryDocument, mongoFieldCategory };
|