@admc-go-th/admc-library 1.0.6 → 1.0.8
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/controllers/default.d.ts +5 -0
- package/controllers/default.js +38 -0
- package/databases/models/authAssignment.d.ts +20 -0
- package/databases/models/authAssignment.js +88 -0
- package/databases/models/authItem.d.ts +28 -0
- package/databases/models/authItem.js +111 -0
- package/databases/models/authItemChild.d.ts +12 -0
- package/databases/models/authItemChild.js +58 -0
- package/databases/models/authRole.d.ts +20 -0
- package/databases/models/authRole.js +87 -0
- package/databases/models/authRoleChild.d.ts +14 -0
- package/databases/models/authRoleChild.js +66 -0
- package/databases/models/index.d.ts +11 -0
- package/databases/models/index.js +736 -0
- package/databases/models/mdContent.d.ts +38 -0
- package/databases/models/mdContent.js +146 -0
- package/databases/models/mdContentGroup.d.ts +22 -0
- package/databases/models/mdContentGroup.js +93 -0
- package/databases/models/menu.d.ts +26 -0
- package/databases/models/menu.js +106 -0
- package/databases/models/msModule.d.ts +20 -0
- package/databases/models/msModule.js +87 -0
- package/databases/models/users.d.ts +50 -0
- package/databases/models/users.js +189 -0
- package/error/app-error.d.ts +6 -0
- package/error/app-error.js +37 -0
- package/middleware/authenticate-token.d.ts +7 -0
- package/middleware/authenticate-token.js +57 -0
- package/middleware/error-handler.d.ts +5 -0
- package/middleware/error-handler.js +40 -0
- package/package.json +7 -2
- package/types/jwt/payload.types.d.ts +11 -0
- package/types/jwt/payload.types.js +18 -0
- package/utils/date.d.ts +3 -0
- package/utils/date.js +43 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface mdContentAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
uuid: number;
|
|
6
|
+
groupId?: number;
|
|
7
|
+
userId: number;
|
|
8
|
+
title?: string;
|
|
9
|
+
detail?: string;
|
|
10
|
+
metaTitle?: string;
|
|
11
|
+
metaKeyword?: string;
|
|
12
|
+
metaDescription?: string;
|
|
13
|
+
imageCover?: string;
|
|
14
|
+
imageGallery?: string;
|
|
15
|
+
createdBy?: string;
|
|
16
|
+
createdDate?: Date;
|
|
17
|
+
updatedBy?: string;
|
|
18
|
+
updatedDate?: Date;
|
|
19
|
+
}
|
|
20
|
+
declare class mdContent extends Model<mdContentAttributes, mdContentAttributes> implements mdContentAttributes {
|
|
21
|
+
id?: number;
|
|
22
|
+
uuid: number;
|
|
23
|
+
groupId?: number;
|
|
24
|
+
userId: number;
|
|
25
|
+
title?: string;
|
|
26
|
+
detail?: string;
|
|
27
|
+
metaTitle?: string;
|
|
28
|
+
metaKeyword?: string;
|
|
29
|
+
metaDescription?: string;
|
|
30
|
+
imageCover?: string;
|
|
31
|
+
imageGallery?: string;
|
|
32
|
+
createdBy?: string;
|
|
33
|
+
createdDate?: Date;
|
|
34
|
+
updatedBy?: string;
|
|
35
|
+
updatedDate?: Date;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { mdContent, type mdContentAttributes };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/databases/models/mdContent.ts
|
|
29
|
+
var mdContent_exports = {};
|
|
30
|
+
__export(mdContent_exports, {
|
|
31
|
+
mdContent: () => mdContent
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(mdContent_exports);
|
|
34
|
+
var import_sequelize_typescript = require("sequelize-typescript");
|
|
35
|
+
var mdContent = class extends import_sequelize_typescript.Model {
|
|
36
|
+
};
|
|
37
|
+
__decorateClass([
|
|
38
|
+
(0, import_sequelize_typescript.Column)({
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
42
|
+
})
|
|
43
|
+
], mdContent.prototype, "id", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
(0, import_sequelize_typescript.Column)({
|
|
46
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
47
|
+
})
|
|
48
|
+
], mdContent.prototype, "uuid", 2);
|
|
49
|
+
__decorateClass([
|
|
50
|
+
(0, import_sequelize_typescript.Column)({
|
|
51
|
+
field: "group_id",
|
|
52
|
+
allowNull: true,
|
|
53
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
54
|
+
})
|
|
55
|
+
], mdContent.prototype, "groupId", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
(0, import_sequelize_typescript.Column)({
|
|
58
|
+
field: "user_id",
|
|
59
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
60
|
+
})
|
|
61
|
+
], mdContent.prototype, "userId", 2);
|
|
62
|
+
__decorateClass([
|
|
63
|
+
(0, import_sequelize_typescript.Column)({
|
|
64
|
+
allowNull: true,
|
|
65
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
66
|
+
})
|
|
67
|
+
], mdContent.prototype, "title", 2);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
(0, import_sequelize_typescript.Column)({
|
|
70
|
+
allowNull: true,
|
|
71
|
+
type: import_sequelize_typescript.DataType.STRING
|
|
72
|
+
})
|
|
73
|
+
], mdContent.prototype, "detail", 2);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
(0, import_sequelize_typescript.Column)({
|
|
76
|
+
field: "meta_title",
|
|
77
|
+
allowNull: true,
|
|
78
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
79
|
+
})
|
|
80
|
+
], mdContent.prototype, "metaTitle", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
(0, import_sequelize_typescript.Column)({
|
|
83
|
+
field: "meta_keyword",
|
|
84
|
+
allowNull: true,
|
|
85
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
86
|
+
})
|
|
87
|
+
], mdContent.prototype, "metaKeyword", 2);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
(0, import_sequelize_typescript.Column)({
|
|
90
|
+
field: "meta_description",
|
|
91
|
+
allowNull: true,
|
|
92
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
93
|
+
})
|
|
94
|
+
], mdContent.prototype, "metaDescription", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
(0, import_sequelize_typescript.Column)({
|
|
97
|
+
field: "image_cover",
|
|
98
|
+
allowNull: true,
|
|
99
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
100
|
+
})
|
|
101
|
+
], mdContent.prototype, "imageCover", 2);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
(0, import_sequelize_typescript.Column)({
|
|
104
|
+
field: "image_gallery",
|
|
105
|
+
allowNull: true,
|
|
106
|
+
type: import_sequelize_typescript.DataType.STRING
|
|
107
|
+
})
|
|
108
|
+
], mdContent.prototype, "imageGallery", 2);
|
|
109
|
+
__decorateClass([
|
|
110
|
+
(0, import_sequelize_typescript.Column)({
|
|
111
|
+
field: "created_by",
|
|
112
|
+
allowNull: true,
|
|
113
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
114
|
+
})
|
|
115
|
+
], mdContent.prototype, "createdBy", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
(0, import_sequelize_typescript.Column)({
|
|
118
|
+
field: "created_date",
|
|
119
|
+
allowNull: true,
|
|
120
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
121
|
+
})
|
|
122
|
+
], mdContent.prototype, "createdDate", 2);
|
|
123
|
+
__decorateClass([
|
|
124
|
+
(0, import_sequelize_typescript.Column)({
|
|
125
|
+
field: "updated_by",
|
|
126
|
+
allowNull: true,
|
|
127
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
128
|
+
})
|
|
129
|
+
], mdContent.prototype, "updatedBy", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
(0, import_sequelize_typescript.Column)({
|
|
132
|
+
field: "updated_date",
|
|
133
|
+
allowNull: true,
|
|
134
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
135
|
+
})
|
|
136
|
+
], mdContent.prototype, "updatedDate", 2);
|
|
137
|
+
mdContent = __decorateClass([
|
|
138
|
+
(0, import_sequelize_typescript.Table)({
|
|
139
|
+
tableName: "md_content",
|
|
140
|
+
timestamps: false
|
|
141
|
+
})
|
|
142
|
+
], mdContent);
|
|
143
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
144
|
+
0 && (module.exports = {
|
|
145
|
+
mdContent
|
|
146
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface mdContentGroupAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
createdBy?: string;
|
|
8
|
+
createdDate?: Date;
|
|
9
|
+
updatedBy?: string;
|
|
10
|
+
updatedDate?: Date;
|
|
11
|
+
}
|
|
12
|
+
declare class mdContentGroup extends Model<mdContentGroupAttributes, mdContentGroupAttributes> implements mdContentGroupAttributes {
|
|
13
|
+
id?: number;
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
createdBy?: string;
|
|
17
|
+
createdDate?: Date;
|
|
18
|
+
updatedBy?: string;
|
|
19
|
+
updatedDate?: Date;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { mdContentGroup, type mdContentGroupAttributes };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/databases/models/mdContentGroup.ts
|
|
29
|
+
var mdContentGroup_exports = {};
|
|
30
|
+
__export(mdContentGroup_exports, {
|
|
31
|
+
mdContentGroup: () => mdContentGroup
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(mdContentGroup_exports);
|
|
34
|
+
var import_sequelize_typescript = require("sequelize-typescript");
|
|
35
|
+
var mdContentGroup = class extends import_sequelize_typescript.Model {
|
|
36
|
+
};
|
|
37
|
+
__decorateClass([
|
|
38
|
+
(0, import_sequelize_typescript.Column)({
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
42
|
+
})
|
|
43
|
+
], mdContentGroup.prototype, "id", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
(0, import_sequelize_typescript.Column)({
|
|
46
|
+
allowNull: true,
|
|
47
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
48
|
+
})
|
|
49
|
+
], mdContentGroup.prototype, "name", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
(0, import_sequelize_typescript.Column)({
|
|
52
|
+
allowNull: true,
|
|
53
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
54
|
+
})
|
|
55
|
+
], mdContentGroup.prototype, "description", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
(0, import_sequelize_typescript.Column)({
|
|
58
|
+
field: "created_by",
|
|
59
|
+
allowNull: true,
|
|
60
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
61
|
+
})
|
|
62
|
+
], mdContentGroup.prototype, "createdBy", 2);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
(0, import_sequelize_typescript.Column)({
|
|
65
|
+
field: "created_date",
|
|
66
|
+
allowNull: true,
|
|
67
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
68
|
+
})
|
|
69
|
+
], mdContentGroup.prototype, "createdDate", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
(0, import_sequelize_typescript.Column)({
|
|
72
|
+
field: "updated_by",
|
|
73
|
+
allowNull: true,
|
|
74
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
75
|
+
})
|
|
76
|
+
], mdContentGroup.prototype, "updatedBy", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
(0, import_sequelize_typescript.Column)({
|
|
79
|
+
field: "updated_date",
|
|
80
|
+
allowNull: true,
|
|
81
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
82
|
+
})
|
|
83
|
+
], mdContentGroup.prototype, "updatedDate", 2);
|
|
84
|
+
mdContentGroup = __decorateClass([
|
|
85
|
+
(0, import_sequelize_typescript.Table)({
|
|
86
|
+
tableName: "md_content_group",
|
|
87
|
+
timestamps: false
|
|
88
|
+
})
|
|
89
|
+
], mdContentGroup);
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
mdContentGroup
|
|
93
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface menuAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
uuid?: any;
|
|
6
|
+
itemName?: string;
|
|
7
|
+
display?: string;
|
|
8
|
+
moduleId?: number;
|
|
9
|
+
createdBy?: string;
|
|
10
|
+
createdDate?: Date;
|
|
11
|
+
updatedBy?: string;
|
|
12
|
+
updatedDate?: Date;
|
|
13
|
+
}
|
|
14
|
+
declare class menu extends Model<menuAttributes, menuAttributes> implements menuAttributes {
|
|
15
|
+
id?: number;
|
|
16
|
+
uuid?: any;
|
|
17
|
+
itemName?: string;
|
|
18
|
+
display?: string;
|
|
19
|
+
moduleId?: number;
|
|
20
|
+
createdBy?: string;
|
|
21
|
+
createdDate?: Date;
|
|
22
|
+
updatedBy?: string;
|
|
23
|
+
updatedDate?: Date;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { menu, type menuAttributes };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/databases/models/menu.ts
|
|
29
|
+
var menu_exports = {};
|
|
30
|
+
__export(menu_exports, {
|
|
31
|
+
menu: () => menu
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(menu_exports);
|
|
34
|
+
var import_sequelize_typescript = require("sequelize-typescript");
|
|
35
|
+
var menu = class extends import_sequelize_typescript.Model {
|
|
36
|
+
};
|
|
37
|
+
__decorateClass([
|
|
38
|
+
(0, import_sequelize_typescript.Column)({
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
42
|
+
})
|
|
43
|
+
], menu.prototype, "id", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
(0, import_sequelize_typescript.Column)({
|
|
46
|
+
allowNull: true
|
|
47
|
+
})
|
|
48
|
+
], menu.prototype, "uuid", 2);
|
|
49
|
+
__decorateClass([
|
|
50
|
+
(0, import_sequelize_typescript.Column)({
|
|
51
|
+
field: "item_name",
|
|
52
|
+
allowNull: true,
|
|
53
|
+
type: import_sequelize_typescript.DataType.STRING(100)
|
|
54
|
+
})
|
|
55
|
+
], menu.prototype, "itemName", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
(0, import_sequelize_typescript.Column)({
|
|
58
|
+
allowNull: true,
|
|
59
|
+
type: import_sequelize_typescript.DataType.STRING(255)
|
|
60
|
+
})
|
|
61
|
+
], menu.prototype, "display", 2);
|
|
62
|
+
__decorateClass([
|
|
63
|
+
(0, import_sequelize_typescript.Column)({
|
|
64
|
+
field: "module_id",
|
|
65
|
+
allowNull: true,
|
|
66
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
67
|
+
})
|
|
68
|
+
], menu.prototype, "moduleId", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
(0, import_sequelize_typescript.Column)({
|
|
71
|
+
field: "created_by",
|
|
72
|
+
allowNull: true,
|
|
73
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
74
|
+
})
|
|
75
|
+
], menu.prototype, "createdBy", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
(0, import_sequelize_typescript.Column)({
|
|
78
|
+
field: "created_date",
|
|
79
|
+
allowNull: true,
|
|
80
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
81
|
+
})
|
|
82
|
+
], menu.prototype, "createdDate", 2);
|
|
83
|
+
__decorateClass([
|
|
84
|
+
(0, import_sequelize_typescript.Column)({
|
|
85
|
+
field: "updated_by",
|
|
86
|
+
allowNull: true,
|
|
87
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
88
|
+
})
|
|
89
|
+
], menu.prototype, "updatedBy", 2);
|
|
90
|
+
__decorateClass([
|
|
91
|
+
(0, import_sequelize_typescript.Column)({
|
|
92
|
+
field: "updated_date",
|
|
93
|
+
allowNull: true,
|
|
94
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
95
|
+
})
|
|
96
|
+
], menu.prototype, "updatedDate", 2);
|
|
97
|
+
menu = __decorateClass([
|
|
98
|
+
(0, import_sequelize_typescript.Table)({
|
|
99
|
+
tableName: "menu",
|
|
100
|
+
timestamps: false
|
|
101
|
+
})
|
|
102
|
+
], menu);
|
|
103
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
+
0 && (module.exports = {
|
|
105
|
+
menu
|
|
106
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface msModuleAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
createdBy?: string;
|
|
7
|
+
createdDate?: Date;
|
|
8
|
+
updatedBy?: string;
|
|
9
|
+
updatedDate?: Date;
|
|
10
|
+
}
|
|
11
|
+
declare class msModule extends Model<msModuleAttributes, msModuleAttributes> implements msModuleAttributes {
|
|
12
|
+
id?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
createdBy?: string;
|
|
15
|
+
createdDate?: Date;
|
|
16
|
+
updatedBy?: string;
|
|
17
|
+
updatedDate?: Date;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { msModule, type msModuleAttributes };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/databases/models/msModule.ts
|
|
29
|
+
var msModule_exports = {};
|
|
30
|
+
__export(msModule_exports, {
|
|
31
|
+
msModule: () => msModule
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(msModule_exports);
|
|
34
|
+
var import_sequelize_typescript = require("sequelize-typescript");
|
|
35
|
+
var msModule = class extends import_sequelize_typescript.Model {
|
|
36
|
+
};
|
|
37
|
+
__decorateClass([
|
|
38
|
+
(0, import_sequelize_typescript.Column)({
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
type: import_sequelize_typescript.DataType.INTEGER
|
|
42
|
+
})
|
|
43
|
+
], msModule.prototype, "id", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
(0, import_sequelize_typescript.Column)({
|
|
46
|
+
allowNull: true,
|
|
47
|
+
type: import_sequelize_typescript.DataType.STRING(100)
|
|
48
|
+
})
|
|
49
|
+
], msModule.prototype, "name", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
(0, import_sequelize_typescript.Column)({
|
|
52
|
+
field: "created_by",
|
|
53
|
+
allowNull: true,
|
|
54
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
55
|
+
})
|
|
56
|
+
], msModule.prototype, "createdBy", 2);
|
|
57
|
+
__decorateClass([
|
|
58
|
+
(0, import_sequelize_typescript.Column)({
|
|
59
|
+
field: "created_date",
|
|
60
|
+
allowNull: true,
|
|
61
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
62
|
+
})
|
|
63
|
+
], msModule.prototype, "createdDate", 2);
|
|
64
|
+
__decorateClass([
|
|
65
|
+
(0, import_sequelize_typescript.Column)({
|
|
66
|
+
field: "updated_by",
|
|
67
|
+
allowNull: true,
|
|
68
|
+
type: import_sequelize_typescript.DataType.STRING(60)
|
|
69
|
+
})
|
|
70
|
+
], msModule.prototype, "updatedBy", 2);
|
|
71
|
+
__decorateClass([
|
|
72
|
+
(0, import_sequelize_typescript.Column)({
|
|
73
|
+
field: "updated_date",
|
|
74
|
+
allowNull: true,
|
|
75
|
+
type: import_sequelize_typescript.DataType.DATE
|
|
76
|
+
})
|
|
77
|
+
], msModule.prototype, "updatedDate", 2);
|
|
78
|
+
msModule = __decorateClass([
|
|
79
|
+
(0, import_sequelize_typescript.Table)({
|
|
80
|
+
tableName: "ms_module",
|
|
81
|
+
timestamps: false
|
|
82
|
+
})
|
|
83
|
+
], msModule);
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
msModule
|
|
87
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
|
|
3
|
+
interface usersAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
uuid: string;
|
|
6
|
+
username?: string;
|
|
7
|
+
passwordHash?: string;
|
|
8
|
+
passwordResetToken?: string;
|
|
9
|
+
verificationToken?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
authKey?: string;
|
|
12
|
+
accessToken?: string;
|
|
13
|
+
userLevel?: number;
|
|
14
|
+
userAuthen?: string;
|
|
15
|
+
userType?: number;
|
|
16
|
+
prefix?: string;
|
|
17
|
+
firstName?: string;
|
|
18
|
+
lastName?: string;
|
|
19
|
+
phone?: string;
|
|
20
|
+
status?: number;
|
|
21
|
+
createdBy?: string;
|
|
22
|
+
createdDate?: Date;
|
|
23
|
+
updatedBy?: string;
|
|
24
|
+
updatedDate?: Date;
|
|
25
|
+
}
|
|
26
|
+
declare class users extends Model<usersAttributes, usersAttributes> implements usersAttributes {
|
|
27
|
+
id?: number;
|
|
28
|
+
uuid: string;
|
|
29
|
+
username?: string;
|
|
30
|
+
passwordHash?: string;
|
|
31
|
+
passwordResetToken?: string;
|
|
32
|
+
verificationToken?: string;
|
|
33
|
+
email?: string;
|
|
34
|
+
authKey?: string;
|
|
35
|
+
accessToken?: string;
|
|
36
|
+
userLevel?: number;
|
|
37
|
+
userAuthen?: string;
|
|
38
|
+
userType?: number;
|
|
39
|
+
prefix?: string;
|
|
40
|
+
firstName?: string;
|
|
41
|
+
lastName?: string;
|
|
42
|
+
phone?: string;
|
|
43
|
+
status?: number;
|
|
44
|
+
createdBy?: string;
|
|
45
|
+
createdDate?: Date;
|
|
46
|
+
updatedBy?: string;
|
|
47
|
+
updatedDate?: Date;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { users, type usersAttributes };
|