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.
- package/config/database.ts +20 -0
- package/config/index.ts +5 -0
- package/index.ts +5 -0
- package/package.json +2 -3
- package/schema/auth/auth_logses.ts +68 -0
- package/schema/auth/{auth_user_mst.js → auth_user_mst.ts} +143 -130
- package/schema/auth/index.ts +13 -0
- package/schema/auth/mpin.ts +60 -0
- package/schema/core/core_entity_mapping.ts +49 -0
- package/schema/core/core_general_master.ts +52 -0
- package/schema/core/core_general_master_type.ts +46 -0
- package/schema/core/core_page_controls.ts +100 -0
- package/schema/core/core_page_grid.ts +48 -0
- package/schema/core/core_page_tab.ts +54 -0
- package/schema/core/core_pin_code.ts +73 -0
- package/schema/core/core_system_config.ts +54 -0
- package/schema/core/{core_system_entity.js → core_system_entity.ts} +216 -200
- package/schema/core/{core_system_logs.js → core_system_logs.ts} +141 -137
- package/schema/core/core_system_menu.ts +74 -0
- package/schema/core/core_system_pages.ts +59 -0
- package/schema/core/core_system_pages_theme.ts +60 -0
- package/schema/core/index.ts +42 -0
- package/schema/email/elist.ts +47 -0
- package/schema/email/elog.ts +68 -0
- package/schema/email/eref.ts +49 -0
- package/schema/email/esub.ts +81 -0
- package/schema/email/etmp.ts +46 -0
- package/schema/email/evdr.ts +46 -0
- package/schema/email/index.ts +21 -0
- package/config/database.js +0 -57
- package/config/index.js +0 -5
- package/index.js +0 -21
- package/schema/auth/auth_logses.js +0 -73
- package/schema/auth/index.js +0 -10
- package/schema/auth/mpin.js +0 -74
- package/schema/core/core_entity_mapping.js +0 -57
- package/schema/core/core_general_master.js +0 -60
- package/schema/core/core_general_master_type.js +0 -56
- package/schema/core/core_page_controls.js +0 -98
- package/schema/core/core_page_grid.js +0 -59
- package/schema/core/core_page_tab.js +0 -56
- package/schema/core/core_pin_code.js +0 -74
- package/schema/core/core_system_config.js +0 -68
- package/schema/core/core_system_menu.js +0 -83
- package/schema/core/core_system_pages.js +0 -71
- package/schema/core/core_system_pages_theme.js +0 -71
- package/schema/core/index.js +0 -34
- package/schema/email/elist.js +0 -62
- package/schema/email/elog.js +0 -78
- package/schema/email/eref.js +0 -63
- package/schema/email/esub.js +0 -89
- package/schema/email/etmp.js +0 -61
- package/schema/email/evdr.js +0 -61
- package/schema/email/index.js +0 -21
|
@@ -1,137 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
required: false
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
type:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
||
|
|
120
|
-
||
|
|
121
|
-
||
|
|
122
|
-
||
|
|
123
|
-
||
|
|
124
|
-
||
|
|
125
|
-
||
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
||
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
||
|
|
133
|
-
||
|
|
134
|
-
||
|
|
135
|
-
||
|
|
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
|
+
};
|