cloud-ide-model-schema 1.0.2 → 1.0.4

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.
Files changed (54) hide show
  1. package/config/database.ts +20 -0
  2. package/config/index.ts +5 -0
  3. package/index.ts +5 -0
  4. package/package.json +2 -3
  5. package/schema/auth/auth_logses.ts +68 -0
  6. package/schema/auth/{auth_user_mst.js → auth_user_mst.ts} +143 -130
  7. package/schema/auth/index.ts +13 -0
  8. package/schema/auth/mpin.ts +60 -0
  9. package/schema/core/core_entity_mapping.ts +49 -0
  10. package/schema/core/core_general_master.ts +52 -0
  11. package/schema/core/core_general_master_type.ts +46 -0
  12. package/schema/core/core_page_controls.ts +100 -0
  13. package/schema/core/core_page_grid.ts +48 -0
  14. package/schema/core/core_page_tab.ts +54 -0
  15. package/schema/core/core_pin_code.ts +73 -0
  16. package/schema/core/core_system_config.ts +54 -0
  17. package/schema/core/{core_system_entity.js → core_system_entity.ts} +216 -200
  18. package/schema/core/{core_system_logs.js → core_system_logs.ts} +141 -137
  19. package/schema/core/core_system_menu.ts +74 -0
  20. package/schema/core/core_system_pages.ts +59 -0
  21. package/schema/core/core_system_pages_theme.ts +60 -0
  22. package/schema/core/index.ts +42 -0
  23. package/schema/email/elist.ts +47 -0
  24. package/schema/email/elog.ts +68 -0
  25. package/schema/email/eref.ts +49 -0
  26. package/schema/email/esub.ts +81 -0
  27. package/schema/email/etmp.ts +46 -0
  28. package/schema/email/evdr.ts +46 -0
  29. package/schema/email/index.ts +21 -0
  30. package/config/database.js +0 -57
  31. package/config/index.js +0 -5
  32. package/index.js +0 -21
  33. package/schema/auth/auth_logses.js +0 -73
  34. package/schema/auth/index.js +0 -10
  35. package/schema/auth/mpin.js +0 -74
  36. package/schema/core/core_entity_mapping.js +0 -57
  37. package/schema/core/core_general_master.js +0 -60
  38. package/schema/core/core_general_master_type.js +0 -56
  39. package/schema/core/core_page_controls.js +0 -98
  40. package/schema/core/core_page_grid.js +0 -59
  41. package/schema/core/core_page_tab.js +0 -56
  42. package/schema/core/core_pin_code.js +0 -74
  43. package/schema/core/core_system_config.js +0 -68
  44. package/schema/core/core_system_menu.js +0 -83
  45. package/schema/core/core_system_pages.js +0 -71
  46. package/schema/core/core_system_pages_theme.js +0 -71
  47. package/schema/core/index.js +0 -34
  48. package/schema/email/elist.js +0 -62
  49. package/schema/email/elog.js +0 -78
  50. package/schema/email/eref.js +0 -63
  51. package/schema/email/esub.js +0 -89
  52. package/schema/email/etmp.js +0 -61
  53. package/schema/email/evdr.js +0 -61
  54. package/schema/email/index.js +0 -21
@@ -1,137 +1,141 @@
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.CCoreSylog = exports.ICoreSylog = void 0;
27
- const mongoose_1 = __importStar(require("mongoose"));
28
- /* INTERFASE START */
29
- class ICoreSylog {
30
- }
31
- exports.ICoreSylog = ICoreSylog;
32
- /* INTERFACE END */
33
- /* SCHEMA START */
34
- const core_system_logs = new mongoose_1.Schema({
35
- sylog_id_user: {
36
- type: mongoose_1.default.Schema.Types.ObjectId,
37
- required: false
38
- },
39
- sylog_id_logses: {
40
- type: mongoose_1.default.Schema.Types.ObjectId,
41
- required: false
42
- },
43
- sylog_log_type: {
44
- type: String,
45
- maxlength: 20,
46
- required: true,
47
- trim: true
48
- },
49
- sylog_action: {
50
- type: String,
51
- maxlength: 20,
52
- trim: true
53
- },
54
- sylog_security_event: {
55
- type: String,
56
- maxlength: 20,
57
- trim: true
58
- },
59
- sylog_previous_data: {
60
- type: Object
61
- },
62
- sylog_updated_data: {
63
- type: Object
64
- },
65
- sylog_diagnostic_code: {
66
- type: String,
67
- maxlength: 20,
68
- trim: true
69
- },
70
- sylog_ip_address: {
71
- type: String,
72
- maxlength: 255,
73
- trim: true
74
- },
75
- sylog_message: {
76
- type: String,
77
- maxlength: 255,
78
- trim: true
79
- },
80
- sylog_timestamp: {
81
- type: Date
82
- },
83
- sylog_method: {
84
- type: String,
85
- maxlength: 20,
86
- trim: true
87
- },
88
- sylog_route: {
89
- type: String,
90
- maxlength: 100,
91
- trim: true
92
- },
93
- sylog_request: {
94
- type: Object
95
- },
96
- sylog_monitor_type: {
97
- type: String,
98
- maxlength: 40,
99
- trim: true
100
- },
101
- sylog_monitor_value: {
102
- type: Number,
103
- maxlength: 20
104
- },
105
- sylog_config_data: {
106
- type: Object
107
- },
108
- sylog_isactive: {
109
- type: Boolean,
110
- default: true
111
- }
112
- }, { collection: 'core_system_logs' });
113
- const CCoreSylog = mongoose_1.default.model("core_system_logs", core_system_logs);
114
- exports.CCoreSylog = CCoreSylog;
115
- /*
116
- || EXAMPLE for TRACE log type
117
- ||{
118
- || user_id: "user001", // this is after login succuess for each route
119
- || log_type: "TRACE",
120
- || timestamp: new Date(),
121
- || method: "POST",
122
- || route: "/auth/login",
123
- || request: {},
124
- || ip_address" "192.168.0.6",
125
- ||}
126
- */
127
- /*
128
- || EXAMPLE for SECURITY log type
129
- ||{
130
- || user_id: "user001", // this is after reset password link sent
131
- || log_type: "SECURITY",
132
- || timestamp: new Date(),
133
- || sylog_security_event: "reset_password",
134
- || sylog_config_data: {"reset_password_id":""}
135
- || ip_address" "192.168.0.6",
136
- ||}
137
- */
1
+ import mongoose, { Schema } from "mongoose";
2
+ export type log_type = 'TRACE' | 'SECURITY'
3
+
4
+ /* INTERFASE START */
5
+ class ICoreSylog {
6
+ _id?: string;
7
+ sylog_id_user?: string; // user id for access by logged in user
8
+ sylog_id_logses?: string; // after login store the login session id
9
+ sylog_log_type?: log_type; // performed activity like audit trail, logging, event, activity, system, trace, diagostics, histiory, security
10
+ sylog_action?: string; // like edit delete, update, reset_password_request
11
+ sylog_id_sypg?: string; // stores the id of any form if edit delete new action perfor
12
+ sylog_security_event?: string; // security level event like access denoed, unauthorized
13
+ sylog_previous_data?: object; // form data for any record data
14
+ sylog_updated_data?: object; // form data for any record data
15
+ sylog_diagnostic_code?: string; // if service failed like database, email
16
+ sylog_ip_address?: string; // ip address of client
17
+ sylog_message?: string;
18
+ sylog_timestamp?: Date;
19
+ sylog_method?: string;
20
+ sylog_route?: string;
21
+ sylog_request?: object; // stores the payload in json format for each request
22
+ sylog_monitor_type?: string; // sytem usage logs like cpu
23
+ sylog_monitor_value?: number; // if monitor type is set then must have number,
24
+ sylog_config_data?: object;
25
+ sylog_isactive?: boolean;
26
+ }
27
+ /* INTERFACE END */
28
+
29
+ /* SCHEMA START */
30
+ const core_system_logs: Schema = new Schema({
31
+ sylog_id_user: {
32
+ type: mongoose.Schema.Types.ObjectId,
33
+ required: false
34
+ },
35
+ sylog_id_logses: {
36
+ type: mongoose.Schema.Types.ObjectId,
37
+ required: false
38
+ },
39
+ sylog_log_type: {
40
+ type: String,
41
+ maxlength: 20,
42
+ required: true,
43
+ trim: true
44
+ },
45
+ sylog_action: {
46
+ type: String,
47
+ maxlength: 20,
48
+ trim: true
49
+ },
50
+ sylog_security_event: {
51
+ type: String,
52
+ maxlength: 20,
53
+ trim: true
54
+ },
55
+ sylog_previous_data: {
56
+ type: Object
57
+ },
58
+ sylog_updated_data: {
59
+ type: Object
60
+ },
61
+ sylog_diagnostic_code: {
62
+ type: String,
63
+ maxlength: 20,
64
+ trim: true
65
+ },
66
+ sylog_ip_address: {
67
+ type: String,
68
+ maxlength: 255,
69
+ trim: true
70
+ },
71
+ sylog_message: {
72
+ type: String,
73
+ maxlength: 255,
74
+ trim: true
75
+ },
76
+ sylog_timestamp: {
77
+ type: Date
78
+ },
79
+ sylog_method: {
80
+ type: String,
81
+ maxlength: 20,
82
+ trim: true
83
+ },
84
+ sylog_route: {
85
+ type: String,
86
+ maxlength: 100,
87
+ trim: true
88
+ },
89
+ sylog_request: {
90
+ type: Object
91
+ },
92
+ sylog_monitor_type: {
93
+ type: String,
94
+ maxlength: 40,
95
+ trim: true
96
+ },
97
+ sylog_monitor_value: {
98
+ type: Number,
99
+ maxlength: 20
100
+ },
101
+ sylog_config_data: {
102
+ type: Object
103
+ },
104
+ sylog_isactive: {
105
+ type: Boolean,
106
+ default: true
107
+ }
108
+ }, { collection: 'core_system_logs' });
109
+
110
+ const CCoreSylog = mongoose.model<ICoreSylog>("core_system_logs", core_system_logs);
111
+ /* SCHIMA END */
112
+
113
+ export {
114
+ ICoreSylog, // interface
115
+ CCoreSylog // collection
116
+ };
117
+
118
+ /*
119
+ || EXAMPLE for TRACE log type
120
+ ||{
121
+ || user_id: "user001", // this is after login succuess for each route
122
+ || log_type: "TRACE",
123
+ || timestamp: new Date(),
124
+ || method: "POST",
125
+ || route: "/auth/login",
126
+ || request: {},
127
+ || ip_address" "192.168.0.6",
128
+ ||}
129
+ */
130
+
131
+ /*
132
+ || EXAMPLE for SECURITY log type
133
+ ||{
134
+ || user_id: "user001", // this is after reset password link sent
135
+ || log_type: "SECURITY",
136
+ || timestamp: new Date(),
137
+ || sylog_security_event: "reset_password",
138
+ || sylog_config_data: {"reset_password_id":""}
139
+ || ip_address" "192.168.0.6",
140
+ ||}
141
+ */
@@ -0,0 +1,74 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class ICoreSyme {
5
+ _id?: string;
6
+ syme_title?: string;
7
+ syme_desc?: string;
8
+ syme_path?: string;
9
+ syme_icon?: string;
10
+ syme_type?: string;
11
+ syme_link?: string;
12
+ syme_order_by?: number;
13
+ syme_id_syme?: string;
14
+ syme_isactive?: boolean;
15
+ }
16
+ /* INTERFACE END */
17
+
18
+ /* SCHEMA START */
19
+ const core_system_menu: Schema = new Schema({
20
+ syme_id_syme: {
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ ref: "core_system_menu"
23
+ },
24
+ syme_title: {
25
+ type: String,
26
+ minlength: 0,
27
+ maxlength: 100,
28
+ trim: true
29
+ },
30
+ syme_desc: {
31
+ type: String,
32
+ minlength: 0,
33
+ maxlength: 255,
34
+ trim: true
35
+ },
36
+ syme_path: {
37
+ type: String,
38
+ minlength: 0,
39
+ maxlength: 255,
40
+ trim: true
41
+ },
42
+ syme_icon: {
43
+ type: String,
44
+ minlength: 0,
45
+ maxlength: 40,
46
+ trim: true
47
+ },
48
+ syme_type: {
49
+ type: String,
50
+ minlength: 0,
51
+ maxlength: 40,
52
+ trim: true
53
+ },
54
+ syme_islink: {
55
+ type: Boolean,
56
+ default: true
57
+ },
58
+ syme_order_by: {
59
+ type: Number,
60
+ default: 0
61
+ },
62
+ syme_isactive: {
63
+ type: Boolean,
64
+ default: true
65
+ }
66
+ }, { collection: 'core_system_menu' });
67
+
68
+ const CCoreSyme = mongoose.model<ICoreSyme>("core_system_menu", core_system_menu);
69
+ /* SCHIMA END */
70
+
71
+ export {
72
+ ICoreSyme, // interface
73
+ CCoreSyme // collection
74
+ };
@@ -0,0 +1,59 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class ICoreSypg {
5
+ _id?: string;
6
+ sypg_page_code?: string;
7
+ sypg_title?: string;
8
+ sypg_desc?: string;
9
+ sypg_configuration?: any;
10
+ sypg_theme_id_sytm?: string;
11
+ sypg_isactive?: boolean;
12
+ }
13
+ /* INTERFACE END */
14
+
15
+ /* SCHEMA START */
16
+ const core_system_pages: Schema = new Schema({
17
+ sypg_theme_id_sytm: {
18
+ type: mongoose.Schema.Types.ObjectId,
19
+ required: true
20
+ },
21
+ sypg_page_code: {
22
+ type: String,
23
+ required: true,
24
+ minlength: 8,
25
+ maxlength: 40,
26
+ unique: true,
27
+ trim: true
28
+ },
29
+ sypg_title: {
30
+ type: String,
31
+ require: true,
32
+ minlength: 8,
33
+ maxlength: 100,
34
+ trim: true
35
+ },
36
+ sypg_desc: {
37
+ type: String,
38
+ minlength: 8,
39
+ maxlength: 255,
40
+ required: true,
41
+ trim: true
42
+ },
43
+ sypg_configuration: {
44
+ type: Object
45
+ },
46
+ sypg_isactive: {
47
+ type: Boolean,
48
+ required: true,
49
+ default: true
50
+ }
51
+ }, { collection: 'core_system_pages' });
52
+
53
+ const CCoreSypg = mongoose.model<ICoreSypg>("core_system_pages", core_system_pages);
54
+ /* SCHIMA END */
55
+
56
+ export {
57
+ ICoreSypg, // interface
58
+ CCoreSypg // collection
59
+ };
@@ -0,0 +1,60 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class ICoreSytm {
5
+ _id?: string;
6
+ sytm_theme_code?: string;
7
+ sytm_title?: string;
8
+ sytm_desc?: string;
9
+ sytm_configuration?: any;
10
+ sytm_page_id_sypg?: string;
11
+ sytm_preview_id_fm?: string;
12
+ sytm_isactive?: boolean;
13
+ }
14
+ /* INTERFACE END */
15
+
16
+ /* SCHEMA START */
17
+ const core_system_pages_theme: Schema = new Schema({
18
+ sytm_preview_id_fm: {
19
+ type: mongoose.Schema.Types.ObjectId,
20
+ required: false
21
+ },
22
+ sytm_page_id_sypg: {
23
+ type: mongoose.Schema.Types.ObjectId,
24
+ required: true
25
+ },
26
+ sytm_theme_code: {
27
+ type: String,
28
+ minlength: 8,
29
+ maxlength: 40,
30
+ unique: true,
31
+ trim: true
32
+ },
33
+ sytm_title: {
34
+ type: String,
35
+ minlength: 8,
36
+ maxlength: 100,
37
+ trim: true
38
+ },
39
+ sytm_desc: {
40
+ type: String,
41
+ minlength: 8,
42
+ maxlength: 255,
43
+ trim: true
44
+ },
45
+ sytm_configuration: {
46
+ type: Object
47
+ },
48
+ sytm_isactive: {
49
+ type: Boolean,
50
+ default: true
51
+ }
52
+ }, { collection: 'core_system_pages_theme' });
53
+
54
+ const CCoreSytm = mongoose.model<ICoreSytm>("core_system_pages_theme", core_system_pages_theme);
55
+ /* SCHIMA END */
56
+
57
+ export {
58
+ ICoreSytm, // interface
59
+ CCoreSytm // collection
60
+ };
@@ -0,0 +1,42 @@
1
+ import { ICoreSypg, CCoreSypg } from './core_system_pages';
2
+ import { ICoreSytm, CCoreSytm } from './core_system_pages_theme';
3
+ import { ICoreSyme, CCoreSyme } from './core_system_menu';
4
+ import { ICoreSylog, CCoreSylog } from './core_system_logs';
5
+ import { ICoreSyen, CCoreSyen } from './core_system_entity';
6
+ import { ICoreSyco, CCoreSyco } from './core_system_config';
7
+ import { ICoreSypin, CCoreSypin } from './core_pin_code';
8
+ import { ICoreSyptb, ITabs, CCoreSyptb } from './core_page_tab';
9
+ import { ICoreSypgr, CCoreSypgr } from './core_page_grid';
10
+ import { ICoreSypc, CCoreSypc } from './core_page_controls';
11
+ import { ICoreSygms, CCoreSygms } from './core_general_master';
12
+ import { ICoreSygmt, CCoreSygmt } from './core_general_master_type';
13
+ import { ICoreSyenm, CCoreSyenm } from './core_entity_mapping';
14
+
15
+ export {
16
+ /* system pages schemas */
17
+ ICoreSypg, CCoreSypg,
18
+ /* System page theme */
19
+ ICoreSytm, CCoreSytm,
20
+ /* system menu schemas */
21
+ ICoreSyme, CCoreSyme,
22
+ /* system logs schemas */
23
+ ICoreSylog, CCoreSylog,
24
+ /* system entity schemas */
25
+ ICoreSyen, CCoreSyen,
26
+ /* System config schemas */
27
+ ICoreSyco, CCoreSyco,
28
+ /* Pin code schemas */
29
+ ICoreSypin, CCoreSypin,
30
+ /* Tab schemas */
31
+ ICoreSyptb, ITabs, CCoreSyptb,
32
+ /* grid schemas */
33
+ ICoreSypgr, CCoreSypgr,
34
+ /* controls schemas */
35
+ ICoreSypc, CCoreSypc,
36
+ /* general master schemas */
37
+ ICoreSygms, CCoreSygms,
38
+ /* general master type schemas */
39
+ ICoreSygmt, CCoreSygmt,
40
+ /* entity code mapping schemas */
41
+ ICoreSyenm, CCoreSyenm
42
+ }
@@ -0,0 +1,47 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class IEmailList {
5
+ elst_email!: string;
6
+ elst_id_evdr!: string;
7
+ elst_sender_reciver_name!: string;
8
+ elst_isactive!: boolean;
9
+ }
10
+ /* INTERFACE END */
11
+
12
+ /* SCHEMA START */
13
+ const email_list: Schema = new Schema({
14
+ elst_email: {
15
+ type: String,
16
+ required: true,
17
+ comment: ` maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters`,
18
+ maxlength: 320,
19
+ minlength: 8,
20
+ trim: true
21
+ },
22
+ elst_id_evdr: {
23
+ type: mongoose.Schema.Types.ObjectId,
24
+ required: true,
25
+ ref: "email_vendor"
26
+ },
27
+ elst_sender_reciver_name: {
28
+ type: String,
29
+ minlength: 8,
30
+ maxlength: 52,
31
+ required: true,
32
+ trim: true
33
+ },
34
+ elst_isactive: {
35
+ type: Boolean,
36
+ required: true,
37
+ default: true
38
+ }
39
+ }, { collection: 'email_list' });
40
+
41
+ const CEmailList = mongoose.model<IEmailList>("email_list", email_list);
42
+ /* SCHIMA END */
43
+
44
+ export {
45
+ IEmailList, // interface
46
+ CEmailList // collection
47
+ };
@@ -0,0 +1,68 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class IEmailLog {
5
+ _id?: string;
6
+ elog_from_email?: string;
7
+ elog_to_email?: string;
8
+ elog_timestamp?: Date;
9
+ elog_mail_status?: string;
10
+ elog_id_eref?: string;
11
+ elog_id_etmp?: string;
12
+ elog_subject?: string;
13
+ elog_body?: string;
14
+ }
15
+ /* INTERFACE END */
16
+
17
+ /* SCHEMA START */
18
+ const email_log: Schema = new Schema({
19
+ elog_from_email: {
20
+ type: String,
21
+ comment: ` maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters`,
22
+ trim: true
23
+ },
24
+ elog_to_email: {
25
+ type: String,
26
+ comment: ` maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters`,
27
+ trim: true
28
+ },
29
+ elog_id_eref: {
30
+ type: mongoose.Schema.Types.ObjectId,
31
+ ref: "email_reference"
32
+ },
33
+ elog_subject: {
34
+ type: String,
35
+ required: false,
36
+ trim: true
37
+ },
38
+ elog_body: {
39
+ type: String,
40
+ required: false
41
+ },
42
+ elog_id_etmp: {
43
+ type: mongoose.Schema.Types.ObjectId,
44
+ ref: "email_templete"
45
+ },
46
+ elog_mail_status: {
47
+ type: String,
48
+ trim: true,
49
+ default: 'created',
50
+ enum: ['created', 'sent', 'not_sent']
51
+ },
52
+ elog_timestamp: {
53
+ type: Date,
54
+ default: new Date()
55
+ },
56
+ elog_isactive: {
57
+ type: Boolean,
58
+ default: true
59
+ }
60
+ }, { collection: 'email_log' });
61
+
62
+ const CEmailLog = mongoose.model<IEmailLog>("email_log", email_log);
63
+ /* SCHIMA END */
64
+
65
+ export {
66
+ IEmailLog, // interface
67
+ CEmailLog // collection
68
+ };
@@ -0,0 +1,49 @@
1
+ import mongoose, { Schema } from "mongoose";
2
+
3
+ /* INTERFASE START */
4
+ class IEmailReference {
5
+ eref_reference!: string;
6
+ eref_sender_id_elst!: string;
7
+ eref_receiver_id_elst!: string;
8
+ eref_var!: boolean;
9
+ eref_isactive!: boolean;
10
+ }
11
+ /* INTERFACE END */
12
+
13
+ /* SCHEMA START */
14
+ const email_reference: Schema = new Schema({
15
+ eref_reference: {
16
+ type: String,
17
+ required: true,
18
+ unique: true
19
+ },
20
+ eref_sender_id_elst: {
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ require: true,
23
+ ref: "email_vendor"
24
+ },
25
+ eref_receiver_id_elst: {
26
+ type: mongoose.Schema.Types.ObjectId,
27
+ require: true,
28
+ ref: "email_vendor"
29
+ },
30
+ eref_var: {
31
+ type: Array,
32
+ required: true,
33
+ trim:true,
34
+ default: []
35
+ },
36
+ eref_isactive: {
37
+ type: Boolean,
38
+ required: true,
39
+ default: true
40
+ }
41
+ }, { collection: 'email_reference' });
42
+
43
+ const CEmailReference = mongoose.model<IEmailReference>("email_reference", email_reference);
44
+ /* SCHIMA END */
45
+
46
+ export {
47
+ IEmailReference, // interface
48
+ CEmailReference // collection
49
+ };