@digione/node-custom-api 0.0.1
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/constants/header.d.ts +10 -0
- package/constants/header.js +2 -0
- package/constants/http.d.ts +44 -0
- package/constants/http.js +2 -0
- package/database/index.d.ts +3 -0
- package/database/index.js +34 -0
- package/database/redis.d.ts +15 -0
- package/database/redis.js +68 -0
- package/errors/authError.d.ts +55 -0
- package/errors/authError.js +57 -0
- package/errors/index.d.ts +32 -0
- package/errors/index.js +113 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/interface/param.d.ts +41 -0
- package/interface/param.js +2 -0
- package/middlewares/accessToken.d.ts +13 -0
- package/middlewares/accessToken.js +200 -0
- package/middlewares/coreSite.d.ts +4 -0
- package/middlewares/coreSite.js +52 -0
- package/middlewares/paramQuery.d.ts +16 -0
- package/middlewares/paramQuery.js +220 -0
- package/middlewares/refSite.d.ts +2 -0
- package/middlewares/refSite.js +58 -0
- package/middlewares/refreshToken.d.ts +2 -0
- package/middlewares/refreshToken.js +56 -0
- package/middlewares/systemSite.d.ts +6 -0
- package/middlewares/systemSite.js +106 -0
- package/middlewares/webSite.d.ts +7 -0
- package/middlewares/webSite.js +109 -0
- package/models/core/city.d.ts +66 -0
- package/models/core/city.js +79 -0
- package/models/core/country.d.ts +35 -0
- package/models/core/country.js +44 -0
- package/models/core/district.d.ts +17 -0
- package/models/core/district.js +23 -0
- package/models/core/domain.d.ts +57 -0
- package/models/core/domain.js +75 -0
- package/models/core/site.d.ts +60 -0
- package/models/core/site.js +70 -0
- package/models/core/state.d.ts +49 -0
- package/models/core/state.js +58 -0
- package/models/core/zipcode.d.ts +5 -0
- package/models/core/zipcode.js +28 -0
- package/models/stream/field.d.ts +60 -0
- package/models/stream/field.js +66 -0
- package/models/stream/field_section.d.ts +33 -0
- package/models/stream/field_section.js +39 -0
- package/models/stream/stream.d.ts +89 -0
- package/models/stream/stream.js +97 -0
- package/models/system/currency.d.ts +5 -0
- package/models/system/currency.js +32 -0
- package/models/system/email_log.d.ts +5 -0
- package/models/system/email_log.js +54 -0
- package/models/system/email_sender.d.ts +22 -0
- package/models/system/email_sender.js +53 -0
- package/models/system/email_template.d.ts +5 -0
- package/models/system/email_template.js +49 -0
- package/models/system/file.d.ts +98 -0
- package/models/system/file.js +111 -0
- package/models/system/folder.d.ts +59 -0
- package/models/system/folder.js +78 -0
- package/models/system/language.d.ts +44 -0
- package/models/system/language.js +50 -0
- package/models/system/metadata.d.ts +5 -0
- package/models/system/metadata.js +24 -0
- package/models/system/module.d.ts +5 -0
- package/models/system/module.js +35 -0
- package/models/system/notification_log.d.ts +25 -0
- package/models/system/notification_log.js +76 -0
- package/models/system/notification_module.d.ts +5 -0
- package/models/system/notification_module.js +35 -0
- package/models/system/notification_setting.d.ts +22 -0
- package/models/system/notification_setting.js +44 -0
- package/models/system/notification_template.d.ts +5 -0
- package/models/system/notification_template.js +49 -0
- package/models/system/notification_type.d.ts +5 -0
- package/models/system/notification_type.js +38 -0
- package/models/system/payment_transaction.d.ts +5 -0
- package/models/system/payment_transaction.js +46 -0
- package/models/system/pdf_page.d.ts +5 -0
- package/models/system/pdf_page.js +39 -0
- package/models/system/pdf_template.d.ts +22 -0
- package/models/system/pdf_template.js +67 -0
- package/models/system/review_template.d.ts +5 -0
- package/models/system/review_template.js +35 -0
- package/models/system/review_vote.d.ts +5 -0
- package/models/system/review_vote.js +36 -0
- package/models/system/session.d.ts +5 -0
- package/models/system/session.js +19 -0
- package/models/system/setting.d.ts +15 -0
- package/models/system/setting.js +22 -0
- package/models/system/site_token.d.ts +25 -0
- package/models/system/site_token.js +31 -0
- package/models/system/sms_log.d.ts +4 -0
- package/models/system/sms_log.js +52 -0
- package/models/system/sms_setting.d.ts +4 -0
- package/models/system/sms_setting.js +39 -0
- package/models/system/sms_template.d.ts +5 -0
- package/models/system/sms_template.js +48 -0
- package/models/system/tax.d.ts +5 -0
- package/models/system/tax.js +33 -0
- package/models/system/website.d.ts +56 -0
- package/models/system/website.js +66 -0
- package/models/system/zone.d.ts +57 -0
- package/models/system/zone.js +141 -0
- package/models/user/access_token.d.ts +37 -0
- package/models/user/access_token.js +46 -0
- package/models/user/address.d.ts +69 -0
- package/models/user/address.js +119 -0
- package/models/user/b2b_group.d.ts +57 -0
- package/models/user/b2b_group.js +63 -0
- package/models/user/group.d.ts +28 -0
- package/models/user/group.js +34 -0
- package/models/user/group_permission.d.ts +4 -0
- package/models/user/group_permission.js +27 -0
- package/models/user/notification_token.d.ts +32 -0
- package/models/user/notification_token.js +39 -0
- package/models/user/organ.d.ts +85 -0
- package/models/user/organ.js +100 -0
- package/models/user/profile.d.ts +31 -0
- package/models/user/profile.js +37 -0
- package/models/user/refresh_token.d.ts +41 -0
- package/models/user/refresh_token.js +51 -0
- package/models/user/team.d.ts +59 -0
- package/models/user/team.js +71 -0
- package/models/user/user.d.ts +79 -0
- package/models/user/user.js +100 -0
- package/models/user/user_organ.d.ts +52 -0
- package/models/user/user_organ.js +87 -0
- package/package.json +59 -0
- package/utils/auth.d.ts +25 -0
- package/utils/auth.js +137 -0
- package/utils/config.d.ts +8 -0
- package/utils/config.js +6 -0
- package/utils/core.d.ts +6 -0
- package/utils/core.js +39 -0
- package/utils/currency.d.ts +16 -0
- package/utils/currency.js +38 -0
- package/utils/db.d.ts +94 -0
- package/utils/db.js +399 -0
- package/utils/file.d.ts +232 -0
- package/utils/file.js +772 -0
- package/utils/helper.d.ts +113 -0
- package/utils/helper.js +508 -0
- package/utils/index.d.ts +10 -0
- package/utils/index.js +13 -0
- package/utils/language.d.ts +18 -0
- package/utils/language.js +48 -0
- package/utils/metadata.d.ts +18 -0
- package/utils/metadata.js +50 -0
- package/utils/session.d.ts +37 -0
- package/utils/session.js +60 -0
- package/utils/setting.d.ts +14 -0
- package/utils/setting.js +70 -0
- package/utils/stream.d.ts +303 -0
- package/utils/stream.js +1893 -0
- package/utils/user.d.ts +61 -0
- package/utils/user.js +282 -0
- package/utils/validator.d.ts +56 -0
- package/utils/validator.js +269 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetadataModel = exports.MetadataAttr = exports.MetadataTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.MetadataTable = 'metadata';
|
|
7
|
+
exports.MetadataAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
organ_id: sequelize.INTEGER,
|
|
15
|
+
web_id: sequelize.INTEGER,
|
|
16
|
+
module: sequelize.STRING(60),
|
|
17
|
+
row_id: sequelize.INTEGER,
|
|
18
|
+
related_id: sequelize.INTEGER,
|
|
19
|
+
items: sequelize.JSON
|
|
20
|
+
};
|
|
21
|
+
const MetadataModel = database_1.default.define("Metadata", exports.MetadataAttr, {
|
|
22
|
+
tableName: exports.MetadataTable
|
|
23
|
+
});
|
|
24
|
+
exports.MetadataModel = MetadataModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const ModuleTable = "modules";
|
|
3
|
+
export declare const ModuleAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const ModuleModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { ModuleModel };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModuleModel = exports.ModuleAttr = exports.ModuleTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.ModuleTable = 'modules';
|
|
7
|
+
exports.ModuleAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
defaultValue: sequelize.NOW
|
|
18
|
+
},
|
|
19
|
+
updated: sequelize.DATE,
|
|
20
|
+
ordering_count: {
|
|
21
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
defaultValue: 0
|
|
23
|
+
},
|
|
24
|
+
created_by: {
|
|
25
|
+
type: sequelize.INTEGER({ length: 11 })
|
|
26
|
+
},
|
|
27
|
+
name: sequelize.STRING(255),
|
|
28
|
+
slug: sequelize.STRING(255),
|
|
29
|
+
parent_id: sequelize.INTEGER({ length: 11 }),
|
|
30
|
+
roles: sequelize.STRING(255)
|
|
31
|
+
};
|
|
32
|
+
const ModuleModel = database_1.default.define("Module", exports.ModuleAttr, {
|
|
33
|
+
tableName: exports.ModuleTable
|
|
34
|
+
});
|
|
35
|
+
exports.ModuleModel = ModuleModel;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const NotificationLogTable = "notification_logs";
|
|
3
|
+
export declare const NotificationLogAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const NotificationLogModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export declare const NotificationLogUserTable = "notification_logs_users";
|
|
6
|
+
export declare const NotificationLogUserAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
7
|
+
declare const NotificationLogUserModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
8
|
+
export declare const NotificationLogAssociation: {
|
|
9
|
+
user: {
|
|
10
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
11
|
+
alias: string;
|
|
12
|
+
join: (ref: any, { where, attributes, required }?: {
|
|
13
|
+
where?: {};
|
|
14
|
+
attributes?: any;
|
|
15
|
+
required?: any;
|
|
16
|
+
}) => Promise<{
|
|
17
|
+
where: {};
|
|
18
|
+
required: any;
|
|
19
|
+
attributes: any;
|
|
20
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
21
|
+
as: string;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { NotificationLogModel, NotificationLogUserModel };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationLogUserModel = exports.NotificationLogModel = exports.NotificationLogAssociation = exports.NotificationLogUserAttr = exports.NotificationLogUserTable = exports.NotificationLogAttr = exports.NotificationLogTable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const sequelize = require("sequelize");
|
|
6
|
+
const database_1 = require("../../database");
|
|
7
|
+
exports.NotificationLogTable = 'notification_logs';
|
|
8
|
+
exports.NotificationLogAttr = {
|
|
9
|
+
id: {
|
|
10
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
autoIncrement: true,
|
|
13
|
+
allowNull: false
|
|
14
|
+
},
|
|
15
|
+
created: {
|
|
16
|
+
type: sequelize.DATE,
|
|
17
|
+
allowNull: false
|
|
18
|
+
},
|
|
19
|
+
updated: sequelize.DATE,
|
|
20
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
organ_id: sequelize.INTEGER,
|
|
22
|
+
module: {
|
|
23
|
+
type: sequelize.STRING(60),
|
|
24
|
+
allowNull: false
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: sequelize.STRING(60),
|
|
28
|
+
allowNull: false
|
|
29
|
+
},
|
|
30
|
+
template_id: sequelize.INTEGER,
|
|
31
|
+
subject: sequelize.TEXT,
|
|
32
|
+
body: sequelize.TEXT,
|
|
33
|
+
data: sequelize.TEXT
|
|
34
|
+
};
|
|
35
|
+
const NotificationLogModel = database_1.default.define("NotificationLog", exports.NotificationLogAttr, {
|
|
36
|
+
tableName: exports.NotificationLogTable
|
|
37
|
+
});
|
|
38
|
+
exports.NotificationLogModel = NotificationLogModel;
|
|
39
|
+
exports.NotificationLogUserTable = 'notification_logs_users';
|
|
40
|
+
exports.NotificationLogUserAttr = {
|
|
41
|
+
log_id: {
|
|
42
|
+
type: sequelize.INTEGER,
|
|
43
|
+
primaryKey: true,
|
|
44
|
+
allowNull: false
|
|
45
|
+
},
|
|
46
|
+
user_id: {
|
|
47
|
+
type: sequelize.INTEGER,
|
|
48
|
+
primaryKey: true,
|
|
49
|
+
allowNull: false
|
|
50
|
+
},
|
|
51
|
+
readed: {
|
|
52
|
+
type: sequelize.TINYINT({ length: 1 }),
|
|
53
|
+
defaultValue: 0
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const NotificationLogUserModel = database_1.default.define("NotificationLogUser", exports.NotificationLogUserAttr, {
|
|
57
|
+
tableName: exports.NotificationLogUserTable
|
|
58
|
+
});
|
|
59
|
+
exports.NotificationLogUserModel = NotificationLogUserModel;
|
|
60
|
+
exports.NotificationLogAssociation = {
|
|
61
|
+
user: {
|
|
62
|
+
model: NotificationLogUserModel,
|
|
63
|
+
alias: "user",
|
|
64
|
+
join: (ref, { where = {}, attributes = undefined, required = undefined } = {}) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
return {
|
|
66
|
+
where,
|
|
67
|
+
required,
|
|
68
|
+
attributes,
|
|
69
|
+
model: exports.NotificationLogAssociation.user.model.schema(ref, "_"),
|
|
70
|
+
as: exports.NotificationLogAssociation.user.alias
|
|
71
|
+
};
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
// user
|
|
76
|
+
NotificationLogModel.hasOne(exports.NotificationLogAssociation.user.model, { as: exports.NotificationLogAssociation.user.alias, foreignKey: "log_id" });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const NotificationModuleTable = "notification_modules";
|
|
3
|
+
export declare const NotificationModuleAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const NotificationModuleModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { NotificationModuleModel };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationModuleModel = exports.NotificationModuleAttr = exports.NotificationModuleTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.NotificationModuleTable = 'notification_modules';
|
|
7
|
+
exports.NotificationModuleAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
slug: {
|
|
22
|
+
type: sequelize.STRING(255),
|
|
23
|
+
allowNull: false
|
|
24
|
+
},
|
|
25
|
+
title: {
|
|
26
|
+
type: sequelize.STRING(255),
|
|
27
|
+
allowNull: false
|
|
28
|
+
},
|
|
29
|
+
description: sequelize.STRING(255),
|
|
30
|
+
specific: sequelize.STRING(255)
|
|
31
|
+
};
|
|
32
|
+
const NotificationModuleModel = database_1.default.define("NotificationModule", exports.NotificationModuleAttr, {
|
|
33
|
+
tableName: exports.NotificationModuleTable
|
|
34
|
+
});
|
|
35
|
+
exports.NotificationModuleModel = NotificationModuleModel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const NotificationSettingTable = "notification_settings";
|
|
3
|
+
export declare const NotificationSettingAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const NotificationSettingModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export declare const NotificationSettingAssociation: {
|
|
6
|
+
types: {
|
|
7
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
8
|
+
alias: string;
|
|
9
|
+
join: (ref: any, { where, attributes, required }?: {
|
|
10
|
+
where?: {};
|
|
11
|
+
attributes?: any;
|
|
12
|
+
required?: any;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
where: {};
|
|
15
|
+
required: any;
|
|
16
|
+
attributes: any;
|
|
17
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
18
|
+
as: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { NotificationSettingModel };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationSettingModel = exports.NotificationSettingAssociation = exports.NotificationSettingAttr = exports.NotificationSettingTable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const sequelize = require("sequelize");
|
|
6
|
+
const database_1 = require("../../database");
|
|
7
|
+
const notification_type_1 = require("./notification_type");
|
|
8
|
+
exports.NotificationSettingTable = 'notification_settings';
|
|
9
|
+
exports.NotificationSettingAttr = {
|
|
10
|
+
id: {
|
|
11
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
autoIncrement: true,
|
|
14
|
+
allowNull: false
|
|
15
|
+
},
|
|
16
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
17
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
18
|
+
ref: sequelize.STRING(50),
|
|
19
|
+
type: sequelize.STRING(50),
|
|
20
|
+
is_cron: sequelize.TINYINT({ length: 1 }),
|
|
21
|
+
users: sequelize.TEXT('long'),
|
|
22
|
+
condition: sequelize.TEXT('long')
|
|
23
|
+
};
|
|
24
|
+
const NotificationSettingModel = database_1.default.define("NotificationSetting", exports.NotificationSettingAttr, {
|
|
25
|
+
tableName: exports.NotificationSettingTable
|
|
26
|
+
});
|
|
27
|
+
exports.NotificationSettingModel = NotificationSettingModel;
|
|
28
|
+
exports.NotificationSettingAssociation = {
|
|
29
|
+
types: {
|
|
30
|
+
model: notification_type_1.NotificationTypeModel,
|
|
31
|
+
alias: "notify_type",
|
|
32
|
+
join: (ref, { where = {}, attributes = undefined, required = undefined } = {}) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
return {
|
|
34
|
+
where,
|
|
35
|
+
required,
|
|
36
|
+
attributes,
|
|
37
|
+
model: exports.NotificationSettingAssociation.types.model.schema("core", "_"),
|
|
38
|
+
as: exports.NotificationSettingAssociation.types.alias
|
|
39
|
+
};
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
// type
|
|
44
|
+
NotificationSettingModel.belongsTo(exports.NotificationSettingAssociation.types.model, { as: exports.NotificationSettingAssociation.types.alias, foreignKey: "type", targetKey: "slug" });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const NotificationTemplateTable = "notification_templates";
|
|
3
|
+
export declare const NotificationTemplateAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const NotificationTemplateModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { NotificationTemplateModel };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationTemplateModel = exports.NotificationTemplateAttr = exports.NotificationTemplateTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.NotificationTemplateTable = 'notification_templates';
|
|
7
|
+
exports.NotificationTemplateAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
slug: {
|
|
23
|
+
type: sequelize.STRING(255),
|
|
24
|
+
allowNull: false
|
|
25
|
+
},
|
|
26
|
+
module: {
|
|
27
|
+
type: sequelize.STRING(60),
|
|
28
|
+
allowNull: false
|
|
29
|
+
},
|
|
30
|
+
is_default: {
|
|
31
|
+
type: sequelize.TINYINT({ length: 1 }),
|
|
32
|
+
defaultValue: '0'
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
type: sequelize.STRING(255),
|
|
36
|
+
allowNull: false
|
|
37
|
+
},
|
|
38
|
+
description: sequelize.STRING(255),
|
|
39
|
+
status: {
|
|
40
|
+
type: sequelize.STRING(50),
|
|
41
|
+
defaultValue: "draft"
|
|
42
|
+
},
|
|
43
|
+
subject: sequelize.STRING(255),
|
|
44
|
+
body: sequelize.TEXT
|
|
45
|
+
};
|
|
46
|
+
const NotificationTemplateModel = database_1.default.define("NotificationTemplate", exports.NotificationTemplateAttr, {
|
|
47
|
+
tableName: exports.NotificationTemplateTable
|
|
48
|
+
});
|
|
49
|
+
exports.NotificationTemplateModel = NotificationTemplateModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const NotificationTypeTable = "notification_types";
|
|
3
|
+
export declare const NotificationTypeAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const NotificationTypeModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { NotificationTypeModel };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationTypeModel = exports.NotificationTypeAttr = exports.NotificationTypeTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.NotificationTypeTable = 'notification_types';
|
|
7
|
+
exports.NotificationTypeAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
title: {
|
|
22
|
+
type: sequelize.STRING(255),
|
|
23
|
+
allowNull: false
|
|
24
|
+
},
|
|
25
|
+
slug: {
|
|
26
|
+
type: sequelize.STRING(100),
|
|
27
|
+
allowNull: false
|
|
28
|
+
},
|
|
29
|
+
status: {
|
|
30
|
+
type: sequelize.STRING(10),
|
|
31
|
+
defaultValue: "draft"
|
|
32
|
+
},
|
|
33
|
+
description: sequelize.STRING(255),
|
|
34
|
+
};
|
|
35
|
+
const NotificationTypeModel = database_1.default.define("NotificationType", exports.NotificationTypeAttr, {
|
|
36
|
+
tableName: exports.NotificationTypeTable
|
|
37
|
+
});
|
|
38
|
+
exports.NotificationTypeModel = NotificationTypeModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const SystemPaymentTransactionTable = "payment_transactions";
|
|
3
|
+
export declare const SystemPaymentTransactionAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const SystemPaymentTransactionModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { SystemPaymentTransactionModel };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemPaymentTransactionModel = exports.SystemPaymentTransactionAttr = exports.SystemPaymentTransactionTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
const helper_1 = require("../../utils/helper");
|
|
7
|
+
exports.SystemPaymentTransactionTable = 'payment_transactions';
|
|
8
|
+
exports.SystemPaymentTransactionAttr = {
|
|
9
|
+
id: {
|
|
10
|
+
type: sequelize.STRING({ length: 40 }),
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
},
|
|
13
|
+
created: {
|
|
14
|
+
type: sequelize.DATE,
|
|
15
|
+
primaryKey: true
|
|
16
|
+
},
|
|
17
|
+
updated: sequelize.DATE,
|
|
18
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
19
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
web_id: sequelize.INTEGER,
|
|
21
|
+
order_id: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
gateway_id: sequelize.INTEGER,
|
|
23
|
+
module: sequelize.STRING(50),
|
|
24
|
+
slug: sequelize.STRING(100),
|
|
25
|
+
card: sequelize.STRING(255),
|
|
26
|
+
customer_id: sequelize.STRING(255),
|
|
27
|
+
charge_id: sequelize.STRING(255),
|
|
28
|
+
method: sequelize.STRING(100),
|
|
29
|
+
amount: sequelize.FLOAT,
|
|
30
|
+
status: sequelize.STRING(100),
|
|
31
|
+
frontend_uri: sequelize.STRING(255),
|
|
32
|
+
fail_code: sequelize.STRING(255),
|
|
33
|
+
authorize_token: sequelize.STRING(255),
|
|
34
|
+
authorize_uri: sequelize.STRING(255),
|
|
35
|
+
expires_at: sequelize.DATE
|
|
36
|
+
};
|
|
37
|
+
const SystemPaymentTransactionModel = database_1.default.define("PaymentTransaction", exports.SystemPaymentTransactionAttr, {
|
|
38
|
+
tableName: exports.SystemPaymentTransactionTable
|
|
39
|
+
});
|
|
40
|
+
exports.SystemPaymentTransactionModel = SystemPaymentTransactionModel;
|
|
41
|
+
SystemPaymentTransactionModel.beforeCreate((model, options) => {
|
|
42
|
+
let id = model.getDataValue('id');
|
|
43
|
+
if (!id)
|
|
44
|
+
model.setDataValue('id', (0, helper_1.getUUID32)());
|
|
45
|
+
model.setDataValue('created', (0, helper_1.getDateMysql)());
|
|
46
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const PdfPageTable = "pdf_template_pages";
|
|
3
|
+
export declare const PdfPageAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const PdfPageModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { PdfPageModel };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PdfPageModel = exports.PdfPageAttr = exports.PdfPageTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.PdfPageTable = 'pdf_template_pages';
|
|
7
|
+
exports.PdfPageAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
template_id: sequelize.INTEGER({ length: 11 }),
|
|
23
|
+
title: {
|
|
24
|
+
type: sequelize.STRING(255),
|
|
25
|
+
allowNull: false
|
|
26
|
+
},
|
|
27
|
+
status: {
|
|
28
|
+
type: sequelize.STRING(50),
|
|
29
|
+
defaultValue: "draft"
|
|
30
|
+
},
|
|
31
|
+
body: sequelize.TEXT,
|
|
32
|
+
header: sequelize.TEXT,
|
|
33
|
+
footer: sequelize.TEXT,
|
|
34
|
+
setting: sequelize.JSON
|
|
35
|
+
};
|
|
36
|
+
const PdfPageModel = database_1.default.define("PdfPage", exports.PdfPageAttr, {
|
|
37
|
+
tableName: exports.PdfPageTable
|
|
38
|
+
});
|
|
39
|
+
exports.PdfPageModel = PdfPageModel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const PdfTemplateTable = "pdf_templates";
|
|
3
|
+
export declare const PdfTemplateAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const PdfTemplateModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export declare const PdfTemplateAssociation: {
|
|
6
|
+
page: {
|
|
7
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
8
|
+
alias: string;
|
|
9
|
+
join: (ref: any, { where, attributes, required }?: {
|
|
10
|
+
where?: {};
|
|
11
|
+
attributes?: any;
|
|
12
|
+
required?: any;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
where: {};
|
|
15
|
+
required: any;
|
|
16
|
+
attributes: any;
|
|
17
|
+
model: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
18
|
+
as: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { PdfTemplateModel };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PdfTemplateModel = exports.PdfTemplateAssociation = exports.PdfTemplateAttr = exports.PdfTemplateTable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const sequelize = require("sequelize");
|
|
6
|
+
const database_1 = require("../../database");
|
|
7
|
+
const pdf_page_1 = require("./pdf_page");
|
|
8
|
+
exports.PdfTemplateTable = 'pdf_templates';
|
|
9
|
+
exports.PdfTemplateAttr = {
|
|
10
|
+
id: {
|
|
11
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
autoIncrement: true,
|
|
14
|
+
allowNull: false
|
|
15
|
+
},
|
|
16
|
+
created: {
|
|
17
|
+
type: sequelize.DATE,
|
|
18
|
+
allowNull: false
|
|
19
|
+
},
|
|
20
|
+
updated: sequelize.DATE,
|
|
21
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
23
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
24
|
+
slug: {
|
|
25
|
+
type: sequelize.STRING(255),
|
|
26
|
+
allowNull: false
|
|
27
|
+
},
|
|
28
|
+
module: {
|
|
29
|
+
type: sequelize.STRING(60),
|
|
30
|
+
allowNull: false
|
|
31
|
+
},
|
|
32
|
+
is_default: {
|
|
33
|
+
type: sequelize.TINYINT({ length: 1 }),
|
|
34
|
+
defaultValue: '0'
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
type: sequelize.STRING(255),
|
|
38
|
+
allowNull: false
|
|
39
|
+
},
|
|
40
|
+
description: sequelize.STRING(255),
|
|
41
|
+
status: {
|
|
42
|
+
type: sequelize.STRING(50),
|
|
43
|
+
defaultValue: "draft"
|
|
44
|
+
},
|
|
45
|
+
css: sequelize.TEXT
|
|
46
|
+
};
|
|
47
|
+
const PdfTemplateModel = database_1.default.define("PdfTemplate", exports.PdfTemplateAttr, {
|
|
48
|
+
tableName: exports.PdfTemplateTable
|
|
49
|
+
});
|
|
50
|
+
exports.PdfTemplateModel = PdfTemplateModel;
|
|
51
|
+
exports.PdfTemplateAssociation = {
|
|
52
|
+
page: {
|
|
53
|
+
model: pdf_page_1.PdfPageModel,
|
|
54
|
+
alias: "pages",
|
|
55
|
+
join: (ref, { where = {}, attributes = undefined, required = undefined } = {}) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
+
return {
|
|
57
|
+
where,
|
|
58
|
+
required,
|
|
59
|
+
attributes,
|
|
60
|
+
model: exports.PdfTemplateAssociation.page.model.schema(ref, "_"),
|
|
61
|
+
as: exports.PdfTemplateAssociation.page.alias
|
|
62
|
+
};
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// page
|
|
67
|
+
PdfTemplateModel.hasMany(exports.PdfTemplateAssociation.page.model, { as: exports.PdfTemplateAssociation.page.alias, foreignKey: "template_id" });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const ReviewTemplateTable = "review_templates";
|
|
3
|
+
export declare const ReviewTemplateAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const ReviewTemplateModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { ReviewTemplateModel };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReviewTemplateModel = exports.ReviewTemplateAttr = exports.ReviewTemplateTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.ReviewTemplateTable = 'review_templates';
|
|
7
|
+
exports.ReviewTemplateAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
ordering_count: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
slug: {
|
|
23
|
+
type: sequelize.STRING(255),
|
|
24
|
+
allowNull: false
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
type: sequelize.STRING(255),
|
|
28
|
+
allowNull: false
|
|
29
|
+
},
|
|
30
|
+
description: sequelize.STRING(255),
|
|
31
|
+
};
|
|
32
|
+
const ReviewTemplateModel = database_1.default.define("ReviewTemplate", exports.ReviewTemplateAttr, {
|
|
33
|
+
tableName: exports.ReviewTemplateTable
|
|
34
|
+
});
|
|
35
|
+
exports.ReviewTemplateModel = ReviewTemplateModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const ReviewVoteTable = "review_votes";
|
|
3
|
+
export declare const ReviewVoteAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const ReviewVoteModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { ReviewVoteModel };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReviewVoteModel = exports.ReviewVoteAttr = exports.ReviewVoteTable = void 0;
|
|
4
|
+
const sequelize = require("sequelize");
|
|
5
|
+
const database_1 = require("../../database");
|
|
6
|
+
exports.ReviewVoteTable = 'review_votes';
|
|
7
|
+
exports.ReviewVoteAttr = {
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize.INTEGER({ length: 11 }),
|
|
10
|
+
primaryKey: true,
|
|
11
|
+
autoIncrement: true,
|
|
12
|
+
allowNull: false
|
|
13
|
+
},
|
|
14
|
+
created: {
|
|
15
|
+
type: sequelize.DATE,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
updated: sequelize.DATE,
|
|
19
|
+
created_by: sequelize.INTEGER({ length: 11 }),
|
|
20
|
+
organ_id: sequelize.INTEGER({ length: 11 }),
|
|
21
|
+
web_id: sequelize.INTEGER({ length: 11 }),
|
|
22
|
+
related_id: sequelize.INTEGER({ length: 11 }),
|
|
23
|
+
template_id: sequelize.INTEGER({ length: 11 }),
|
|
24
|
+
entry_id: sequelize.INTEGER({ length: 11 }),
|
|
25
|
+
entry_title: sequelize.TEXT,
|
|
26
|
+
score: sequelize.INTEGER,
|
|
27
|
+
status: sequelize.STRING(10),
|
|
28
|
+
module: sequelize.STRING(60),
|
|
29
|
+
message: sequelize.TEXT,
|
|
30
|
+
type: sequelize.STRING(60),
|
|
31
|
+
custom: sequelize.JSON
|
|
32
|
+
};
|
|
33
|
+
const ReviewVoteModel = database_1.default.define("ReviewVote", exports.ReviewVoteAttr, {
|
|
34
|
+
tableName: exports.ReviewVoteTable
|
|
35
|
+
});
|
|
36
|
+
exports.ReviewVoteModel = ReviewVoteModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as sequelize from "sequelize";
|
|
2
|
+
export declare const SessionTable = "sessions";
|
|
3
|
+
export declare const SessionAttr: sequelize.ModelAttributes<sequelize.Model<any, any>, any>;
|
|
4
|
+
declare const SessionModel: sequelize.ModelCtor<sequelize.Model<any, any>>;
|
|
5
|
+
export { SessionModel };
|