cloud-ide-model-schema 1.0.1 → 1.0.2

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 (58) hide show
  1. package/package.json +1 -1
  2. package/src/config/database.ts +0 -20
  3. package/src/config/index.ts +0 -5
  4. package/src/index.ts +0 -5
  5. package/src/schema/auth/auth_logses.ts +0 -68
  6. package/src/schema/auth/auth_user_mst.ts +0 -143
  7. package/src/schema/auth/index.ts +0 -13
  8. package/src/schema/auth/mpin.ts +0 -60
  9. package/src/schema/core/core_entity_mapping.ts +0 -49
  10. package/src/schema/core/core_general_master.ts +0 -52
  11. package/src/schema/core/core_general_master_type.ts +0 -46
  12. package/src/schema/core/core_page_controls.ts +0 -100
  13. package/src/schema/core/core_page_grid.ts +0 -48
  14. package/src/schema/core/core_page_tab.ts +0 -54
  15. package/src/schema/core/core_pin_code.ts +0 -73
  16. package/src/schema/core/core_system_config.ts +0 -54
  17. package/src/schema/core/core_system_entity.ts +0 -216
  18. package/src/schema/core/core_system_logs.ts +0 -141
  19. package/src/schema/core/core_system_menu.ts +0 -74
  20. package/src/schema/core/core_system_pages.ts +0 -59
  21. package/src/schema/core/core_system_pages_theme.ts +0 -60
  22. package/src/schema/core/index.ts +0 -42
  23. package/src/schema/email/elist.ts +0 -47
  24. package/src/schema/email/elog.ts +0 -68
  25. package/src/schema/email/eref.ts +0 -49
  26. package/src/schema/email/esub.ts +0 -81
  27. package/src/schema/email/etmp.ts +0 -46
  28. package/src/schema/email/evdr.ts +0 -46
  29. package/src/schema/email/index.ts +0 -21
  30. package/tsconfig.json +0 -111
  31. /package/{dist/config → config}/database.js +0 -0
  32. /package/{dist/config → config}/index.js +0 -0
  33. /package/{dist/index.js → index.js} +0 -0
  34. /package/{dist/schema → schema}/auth/auth_logses.js +0 -0
  35. /package/{dist/schema → schema}/auth/auth_user_mst.js +0 -0
  36. /package/{dist/schema → schema}/auth/index.js +0 -0
  37. /package/{dist/schema → schema}/auth/mpin.js +0 -0
  38. /package/{dist/schema → schema}/core/core_entity_mapping.js +0 -0
  39. /package/{dist/schema → schema}/core/core_general_master.js +0 -0
  40. /package/{dist/schema → schema}/core/core_general_master_type.js +0 -0
  41. /package/{dist/schema → schema}/core/core_page_controls.js +0 -0
  42. /package/{dist/schema → schema}/core/core_page_grid.js +0 -0
  43. /package/{dist/schema → schema}/core/core_page_tab.js +0 -0
  44. /package/{dist/schema → schema}/core/core_pin_code.js +0 -0
  45. /package/{dist/schema → schema}/core/core_system_config.js +0 -0
  46. /package/{dist/schema → schema}/core/core_system_entity.js +0 -0
  47. /package/{dist/schema → schema}/core/core_system_logs.js +0 -0
  48. /package/{dist/schema → schema}/core/core_system_menu.js +0 -0
  49. /package/{dist/schema → schema}/core/core_system_pages.js +0 -0
  50. /package/{dist/schema → schema}/core/core_system_pages_theme.js +0 -0
  51. /package/{dist/schema → schema}/core/index.js +0 -0
  52. /package/{dist/schema → schema}/email/elist.js +0 -0
  53. /package/{dist/schema → schema}/email/elog.js +0 -0
  54. /package/{dist/schema → schema}/email/eref.js +0 -0
  55. /package/{dist/schema → schema}/email/esub.js +0 -0
  56. /package/{dist/schema → schema}/email/etmp.js +0 -0
  57. /package/{dist/schema → schema}/email/evdr.js +0 -0
  58. /package/{dist/schema → schema}/email/index.js +0 -0
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "typescript": "^5.4.2"
9
9
  },
10
10
  "name": "cloud-ide-model-schema",
11
- "version": "1.0.1",
11
+ "version": "1.0.2",
12
12
  "description": "Pachage for schema management of Cloud IDEsys LMS",
13
13
  "main": "index.js",
14
14
  "scripts": {
@@ -1,20 +0,0 @@
1
- import * as mongoose from 'mongoose';
2
- import dotenv from 'dotenv';
3
-
4
- dotenv.config();
5
-
6
- async function connectDB() {
7
- const options:any = {
8
- // authSource: process.env.MONGODB_AUTH_SOURCE || 'admin', // Optional authentication database
9
- connectTimeoutMS: 10000,
10
- socketTimeoutMS: 30000,
11
- // Other MongoDB connection options as needed
12
- };
13
- await mongoose.connect(process.env.MONGODB_URI || '', options).then(() => {
14
- console.log('Connected to MongoDB');
15
- }).catch((error) => {
16
- console.error('Error connecting to MongoDB:', error);
17
- });
18
- }
19
-
20
- export { connectDB };
@@ -1,5 +0,0 @@
1
- import { connectDB } from './database';
2
-
3
- export {
4
- connectDB
5
- }
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from './schema/auth';
2
- export * from './schema/core';
3
- export * from './schema/email';
4
- /* database config */
5
- export * from './config';
@@ -1,68 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFACE START */
4
- interface ILogses {
5
- _id: string;
6
- logses_id_user: string;
7
- logses_start_dtm: Date;
8
- logses_end_dtm: Date;
9
- logses_end_max_dtm: Date;
10
- logses_token: string;
11
- logses_user_ask_mpin: string;
12
- logses_last_id_logses: string;
13
- logses_sequence: number;
14
- logses_isactive: boolean;
15
- }
16
- /* INTERFACE END */
17
-
18
- /* SCHEMA START */
19
- const auth_logses = new Schema({
20
- logses_id_user: {
21
- type: mongoose.Schema.Types.ObjectId,
22
- ref: 'auth_user_mst'
23
- },
24
- logses_start_dtm: {
25
- type: Date,
26
- required: true,
27
- default: new Date()
28
- },
29
- logses_end_dtm: {
30
- type: Date,
31
- required: true,
32
- default: new Date()
33
- },
34
- logses_end_max_dtm: {
35
- type: Date,
36
- required: true,
37
- default: new Date()
38
- },
39
- logses_token: {
40
- type: String,
41
- trim: true
42
- },
43
- logses_user_ask_mpin: {
44
- type: Boolean,
45
- required: true,
46
- default: false
47
- },
48
- logses_last_id_logses: {
49
- type: mongoose.Schema.Types.ObjectId,
50
- ref: "auth_logses"
51
- },
52
- logses_sequence: {
53
- type: Number,
54
- default: 1
55
- },
56
- logses_isactive: {
57
- type: Boolean,
58
- default: true
59
- }
60
- }, { collection: 'auth_logses' });
61
-
62
- const Clogses = mongoose.model<ILogses>('auth_logses', auth_logses);
63
- /* SCHEMA END */
64
-
65
- export {
66
- ILogses, // interface name
67
- Clogses // collecton name
68
- };
@@ -1,143 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFACE START */
4
- interface IUser {
5
- _id?: string;
6
- user_id_ent?: string;
7
- user_username?: string;
8
- user_firstname?: string;
9
- user_middlename?: string;
10
- user_lastname?: string;
11
- user_fullname?: string;
12
- user_emailid?: string;
13
- user_mobileno?: number;
14
- user_password?: string;
15
- user_activefrom?: Date;
16
- user_activeupto?: Date;
17
- user_photo_id_fm?: string;
18
- user_passwordchangeonlogin?: boolean;
19
- user_id_role?: string;
20
- user_id_desg?: string;
21
- user_id_dept?: string;
22
- user_permissions?: IUserPermissions[];
23
- user_isactive?: boolean;
24
- }
25
-
26
- interface IUserPermissions {
27
- _id: string;
28
- create?: boolean;
29
- read?: boolean;
30
- update?: boolean;
31
- delete?: boolean;
32
- }
33
- /* INTERFACE END */
34
-
35
- /* SCHEMA START */
36
- const auth_user_mst: Schema = new Schema({
37
- user_id_ent: {
38
- type: String,
39
- comment: "Unique Entity id"
40
- },
41
- user_username: {
42
- type: String,
43
- minlength: 8,
44
- maxlength: 20,
45
- required: true,
46
- trim: true,
47
- unique: true,
48
- comment: "Unique User Name",
49
- message: "Unique User Name"
50
- },
51
- user_firstname: {
52
- type: String,
53
- minlength: 3,
54
- maxlength: 20
55
- },
56
- user_middlename: {
57
- type: String,
58
- minlength: 3,
59
- maxlength: 20
60
- },
61
- user_lastname: {
62
- type: String,
63
- minlength: 8,
64
- maxlength: 20
65
- },
66
- user_fullname: {
67
- type: String,
68
- minlength: 8,
69
- maxlength: 52
70
- },
71
- user_emailid: {
72
- type: String,
73
- minlength: 8,
74
- maxlength: 50,
75
- trim: true,
76
- unique: true,
77
- comment: "Unique Email ID",
78
- message: "Unique Email ID"
79
- },
80
- user_mobileno: {
81
- type: Number,
82
- minlength: 10,
83
- maxlength: 15,
84
- trim: true,
85
- unique: true,
86
- comment: "Unique Mobile no",
87
- message: "Unique Mobile no"
88
- },
89
- user_password: {
90
- type: String,
91
- maxlength: 250,
92
- trim: true
93
- },
94
- user_activefrom: {
95
- type: Date,
96
- comment: "User Effective from- Default is created date"
97
- },
98
- user_activeupto: {
99
- type: Date,
100
- comment: "User Valid upto registered academic year default"
101
- },
102
- user_photo_id_fm: {
103
- type: String,
104
- comment: "photo file manager id",
105
- trim: true
106
- },
107
- user_passwordchangeonlogin: {
108
- type: Boolean,
109
- comment: "Change password on Login. Flag can be set by the Admin/ Reset option",
110
- default: true
111
- },
112
- user_id_role: {
113
- type: String,
114
- comment: "Role Id associated with the user.",
115
- trim: true
116
- },
117
- user_id_desg: {
118
- type: String,
119
- comment: "Users Designation",
120
- trim: true
121
- },
122
- user_id_dept: {
123
- type: String,
124
- comment: "Users Department",
125
- trim: true
126
- },
127
- user_permissions: {
128
- type: Array,
129
- default: []
130
- },
131
- user_isactive: {
132
- type: Boolean
133
- }
134
- }, { collection: 'auth_user_mst' });
135
-
136
- const CUser = mongoose.model<IUser>('auth_user_mst', auth_user_mst);
137
- /* SCHEMA END */
138
-
139
- export {
140
- IUser, // interface name
141
- IUserPermissions,
142
- CUser // collecton name
143
- };
@@ -1,13 +0,0 @@
1
- import { CUser, IUser, IUserPermissions } from "./auth_user_mst"
2
- import { Clogses, ILogses } from './auth_logses';
3
- import { IMpin, CMpin } from './mpin';
4
-
5
- // export all model and collections
6
- export {
7
- /* user Schemas */
8
- CUser, IUser, IUserPermissions,
9
- /* Logsession schemas */
10
- Clogses, ILogses,
11
- /* Mpin schemas */
12
- IMpin, CMpin
13
- }
@@ -1,60 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- class IMpin {
5
- mpin_pin!: number;
6
- mpin_id_user!: string;
7
- mpin_expiry_dtm!: Date;
8
- mpin_used!: boolean;
9
- mpin_isactive!: boolean;
10
- }
11
- /* INTERFACE END */
12
-
13
- /* SCHEMA START */
14
- const auth_mpin: Schema = new Schema({
15
- mpin_id_user: {
16
- type: mongoose.Schema.Types.ObjectId,
17
- ref: 'auth_user_mst',
18
- required: true,
19
- comment: "User unique primery key, reference user"
20
- },
21
- mpin_pin: {
22
- type: Number,
23
- require: true,
24
- unique: true,
25
- minlength: 6,
26
- minlenght: 6
27
- },
28
- mpin_generation_dtm: {
29
- type: Date,
30
- required: true,
31
- default: new Date()
32
- },
33
- mpin_expiry_dtm: {
34
- type: Date,
35
- required: true,
36
- default: new Date()
37
- },
38
- mpin_used: {
39
- type: Boolean,
40
- default: false
41
- },
42
- mpin_id_logses: {
43
- type: mongoose.Schema.Types.ObjectId,
44
- comment: "logses session table, whre loggin id is stored which used the mpin",
45
- trim: true
46
- },
47
- mpin_isactive: {
48
- type: Boolean,
49
- default: true,
50
- comment: "automaticaly expire when expiry time completes, when authenticator is refreshed new key generates and this will set to false"
51
- }
52
- }, { collection: 'auth_mpin' });
53
-
54
- const CMpin = mongoose.model<IMpin>("auth_mpin", auth_mpin);
55
- /* SCHIMA END */
56
-
57
- export {
58
- IMpin, // interface
59
- CMpin // collection
60
- };
@@ -1,49 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSyenm {
5
- _id?: string;
6
- syenm_id_user?: string;
7
- syenm_id_syen?: string;
8
- syenm_id_logses?: string;
9
- syenm_isactive?: boolean;
10
- syenm_isdefault?: boolean;
11
- syenm_isloggedin?: boolean;
12
- }
13
- /* INTERFACE END */
14
-
15
- /* SCHEMA START */
16
- const core_entity_mapping: Schema = new Schema({
17
- syenm_id_user: {
18
- type: mongoose.Schema.Types.ObjectId,
19
- ref: "auth_user_mst"
20
- },
21
- syenm_id_syen: {
22
- type: mongoose.Schema.Types.ObjectId,
23
- ref: "core_system_entity"
24
- },
25
- syenm_id_logses: {
26
- type: mongoose.Schema.Types.ObjectId,
27
- ref: "auth_logses"
28
- },
29
- syenm_isactive: {
30
- type: Boolean,
31
- default: true
32
- },
33
- syenm_isloggedin: {
34
- type: Boolean,
35
- default: true
36
- },
37
- syenm_isdefault: {
38
- type: Boolean,
39
- default: true
40
- },
41
- }, { collection: 'core_entity_mapping' });
42
-
43
- const CCoreSyenm = mongoose.model<ICoreSyenm>("core_entity_mapping", core_entity_mapping);
44
- /* SCHIMA END */
45
-
46
- export {
47
- ICoreSyenm, // interface
48
- CCoreSyenm // collection
49
- };
@@ -1,52 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSygms {
5
- _id: string;
6
- sygms_id_sygmt: string;
7
- sygms_code: string;
8
- sygms_title: string;
9
- sygms_desc: string;
10
- sygms_isactive: boolean;
11
- sygms_configuration: object;
12
- }
13
- /* INTERFACE END */
14
-
15
- /* SCHEMA START */
16
- const core_general_master: Schema = new Schema({
17
- sygms_id_sygmt: {
18
- type: mongoose.Schema.Types.ObjectId,
19
- ref: "core_general_master_type"
20
- },
21
- sygms_code: {
22
- type: String,
23
- require: true,
24
- maxlength: 40,
25
- trim: true
26
- },
27
- sygms_title: {
28
- type: String,
29
- require: true,
30
- minlength: 3,
31
- maxlength: 150,
32
- trim: true
33
- },
34
- sygms_desc: {
35
- type: String,
36
- minlength: 0,
37
- maxlength: 500,
38
- trim: true
39
- },
40
- sygms_isactive: {
41
- type: Boolean,
42
- default: true
43
- },
44
- }, { collection: 'core_general_master' });
45
-
46
- const CCoreSygms = mongoose.model<ICoreSygms>("core_general_master", core_general_master);
47
- /* SCHIMA END */
48
-
49
- export {
50
- ICoreSygms, // interface
51
- CCoreSygms // collection
52
- };
@@ -1,46 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSygmt {
5
- _id: string;
6
- sygmt_code: string;
7
- sygmt_title: string;
8
- sygmt_desc: string;
9
- sygmt_isactive: boolean;
10
- }
11
- /* INTERFACE END */
12
-
13
- /* SCHEMA START */
14
- const core_general_master_type: Schema = new Schema({
15
- sygmt_code: {
16
- type: String,
17
- require: true,
18
- maxlength: 40,
19
- trim: true
20
- },
21
- sygmt_title: {
22
- type: String,
23
- require: true,
24
- minlength: 3,
25
- maxlength: 100,
26
- trim: true
27
- },
28
- sygmt_desc: {
29
- type: String,
30
- minlength: 0,
31
- maxlength: 255,
32
- trim: true
33
- },
34
- sygmt_isactive: {
35
- type: Boolean,
36
- default: true
37
- },
38
- }, { collection: 'core_general_master_type' });
39
-
40
- const CCoreSygmt = mongoose.model<ICoreSygmt>("core_general_master_type", core_general_master_type);
41
- /* SCHIMA END */
42
-
43
- export {
44
- ICoreSygmt, // interface
45
- CCoreSygmt // collection
46
- };
@@ -1,100 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSypc {
5
- _id?: string;
6
- sypc_key: string;
7
- sypc_type?: string;
8
- sypc_placeholder?: string;
9
- sypc_auto_complete?: string;
10
- sypc_page_id_sypg?: string;
11
- sypc_title?: string;
12
- sypc_min_length?: number;
13
- sypc_max_length?: number;
14
- sypc_regex?: string;
15
- sypc_required?: boolean;
16
- sypc_tooltip?: string;
17
- sypc_disabled?: boolean;
18
- sypc_default?: boolean | string | number;
19
- sypc_isactive?: boolean;
20
- }
21
- /* INTERFACE END */
22
-
23
- /* SCHEMA START */
24
- const core_page_controls: Schema = new Schema({
25
- sypc_page_id_sypg: {
26
- type: mongoose.Schema.Types.ObjectId,
27
- ref: "core_system_pages"
28
- },
29
- sypc_title: {
30
- type: String,
31
- minlength: 0,
32
- maxlength: 100,
33
- trim: true
34
- },
35
- sypc_type: {
36
- type: String,
37
- minlength: 0,
38
- maxlength: 20,
39
- trim: true
40
- },
41
- sypc_placeholder: {
42
- type: String,
43
- minlength: 0,
44
- maxlength: 100,
45
- trim: true
46
- },
47
- sypc_auto_complete: {
48
- type: String,
49
- minlength: 0,
50
- maxlength: 100,
51
- trim: true
52
- },
53
- sypc_key: {
54
- type: String,
55
- minlength: 0,
56
- maxlength: 150,
57
- trim: true
58
- },
59
- sypc_min_length: {
60
- type: Number,
61
- maxlength: 20
62
- },
63
- sypc_max_length: {
64
- type: String,
65
- maxlength: 20
66
- },
67
- sypc_regex: {
68
- type: String,
69
- maxlength: 200,
70
- trim: true
71
- },
72
- sypc_required: {
73
- type: Boolean,
74
- default: true
75
- },
76
- sypc_tooltip: {
77
- type: String,
78
- maxlength: 255,
79
- trim: true
80
- },
81
- sypc_default : {
82
-
83
- },
84
- syen_disabled: {
85
- type: Boolean,
86
- default: false
87
- },
88
- sypc_isactive: {
89
- type: Boolean,
90
- default: true
91
- }
92
- }, { collection: 'core_page_controls' });
93
-
94
- const CCoreSypc = mongoose.model<ICoreSypc>("core_page_controls", core_page_controls);
95
- /* SCHIMA END */
96
-
97
- export {
98
- ICoreSypc, // interface
99
- CCoreSypc // collection
100
- };
@@ -1,48 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSypgr {
5
- _id?: string;
6
- sypgr_grid_code: string;
7
- sypgr_title?: string;
8
- sypgr_isactive?: boolean;
9
- }
10
- /* INTERFACE END */
11
-
12
- /* SCHEMA START */
13
- const core_page_grid: Schema = new Schema({
14
- sypgr_grid_code: {
15
- type: String,
16
- required: true,
17
- minlength: 3,
18
- maxlength: 40,
19
- unique: true,
20
- trim: true
21
- },
22
- sypgr_page_id_sypg: {
23
- type: mongoose.Schema.Types.ObjectId,
24
- ref: "core_system_pages"
25
- },
26
- sypgr_title: {
27
- type: String,
28
- require: true,
29
- minlength: 3,
30
- maxlength: 100,
31
- trim: true
32
- },
33
- sypgr_configuration: {
34
- type: Object
35
- },
36
- sypgr_isactive: {
37
- type: Boolean,
38
- default: true
39
- }
40
- }, { collection: 'core_page_grid' });
41
-
42
- const CCoreSypgr = mongoose.model<ICoreSypgr>("core_page_grid", core_page_grid);
43
- /* SCHIMA END */
44
-
45
- export {
46
- ICoreSypgr, // interface
47
- CCoreSypgr // collection
48
- };
@@ -1,54 +0,0 @@
1
- import mongoose, { Schema } from "mongoose";
2
-
3
- /* INTERFASE START */
4
- interface ICoreSyptb {
5
- _id?: string;
6
- syptb_title: string;
7
- syptb_tabs: ITabs[];
8
- syptb_tab_code: string;
9
- syptb_page_id_sypg: string;
10
- syptb_isactive?: boolean;
11
- }
12
-
13
- export interface ITabs {
14
- syptb_path: string;
15
- syptb_label: string;
16
- syptb_isactive: boolean;
17
- }
18
-
19
- /* INTERFACE END */
20
-
21
- /* SCHEMA START */
22
- const core_page_tab: Schema = new Schema({
23
- syptb_page_id_sypg: {
24
- type: mongoose.Schema.Types.ObjectId,
25
- ref: "core_system_pages"
26
- },
27
- syptb_title: {
28
- type: String,
29
- minlength: 0,
30
- maxlength: 100,
31
- trim: true
32
- },
33
- syptb_tabs: {
34
- type: Array
35
- },
36
- syptb_tab_code: {
37
- type: String,
38
- minlength: 3,
39
- maxlength: 40,
40
- trim: true
41
- },
42
- syptb_isactive: {
43
- type: Boolean,
44
- default: true
45
- }
46
- }, { collection: 'core_page_tab' });
47
-
48
- const CCoreSyptb = mongoose.model<ICoreSyptb>("core_page_tab", core_page_tab);
49
- /* SCHIMA END */
50
-
51
- export {
52
- ICoreSyptb, // interface
53
- CCoreSyptb // collection
54
- };