@admc-go-th/admc-library 1.0.44 → 1.0.46

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.
@@ -32,6 +32,7 @@ interface menuAttributes {
32
32
  moduleId?: number;
33
33
  sort?: number;
34
34
  status?: number;
35
+ data?: object;
35
36
  createdBy?: string;
36
37
  createdDate?: Date;
37
38
  updatedBy?: string;
@@ -47,6 +48,7 @@ declare class menu extends Model<menuAttributes, menuAttributes> implements menu
47
48
  moduleId?: number;
48
49
  sort?: number;
49
50
  status?: number;
51
+ data?: object;
50
52
  createdBy?: string;
51
53
  createdDate?: Date;
52
54
  updatedBy?: string;
@@ -0,0 +1,14 @@
1
+ import { FindOptions } from "sequelize/types/model";
2
+ import { setting as Setting } from "../tables";
3
+
4
+ export class SysSetting extends Setting {
5
+ static async findByUUID(
6
+ uuid: string,
7
+ options?: Omit<FindOptions, 'where'>
8
+ ): Promise<Setting | null> {
9
+ return await this.findOne({
10
+ where: { uuid },
11
+ ...options,
12
+ });
13
+ }
14
+ }
@@ -24,6 +24,7 @@ export * from "./menu";
24
24
  export * from "./msModule";
25
25
  export * from "./oauthAccessToken";
26
26
  export * from "./oauthRefreshToken";
27
+ export * from "./setting";
27
28
  export * from "./userCenterV";
28
29
  export * from "./userRoleV";
29
30
  export * from "./users";
@@ -1,6 +1,7 @@
1
1
  import {
2
- Model, Table, Column, DataType, Index, Sequelize, ForeignKey
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, BelongsTo
3
3
  } from "sequelize-typescript";
4
+ import { mdLinkGroup } from "./mdLinkGroup";
4
5
 
5
6
  export interface mdLinkAttributes {
6
7
  id?: number;
@@ -125,4 +126,7 @@ export class mdLink extends Model<mdLinkAttributes, mdLinkAttributes> implements
125
126
  })
126
127
  declare updatedDate?: Date;
127
128
 
129
+ @BelongsTo(() => mdLinkGroup)
130
+ declare mdLinkGroup?: mdLinkGroup;
131
+
128
132
  }
@@ -0,0 +1,103 @@
1
+ import {
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
3
+ } from "sequelize-typescript";
4
+ import { mdLink } from "./mdLink";
5
+
6
+ export interface mdLinkGroupAttributes {
7
+ id?: number;
8
+ uuid?: string;
9
+ keyName?: string;
10
+ userId?: number;
11
+ name: string;
12
+ description?: string;
13
+ status?: number;
14
+ createdBy?: string;
15
+ createdDate?: Date;
16
+ updatedBy?: string;
17
+ updatedDate?: Date;
18
+ }
19
+
20
+ @Table({
21
+ tableName: "md_link_group",
22
+ timestamps: false
23
+ })
24
+ export class mdLinkGroup extends Model<mdLinkGroupAttributes, mdLinkGroupAttributes> implements mdLinkGroupAttributes {
25
+
26
+ @Column({
27
+ primaryKey: true,
28
+ autoIncrement: true,
29
+ type: DataType.INTEGER
30
+ })
31
+ declare id?: number;
32
+
33
+ @Column({
34
+ allowNull: true,
35
+ type: DataType.STRING(60)
36
+ })
37
+ declare uuid?: string;
38
+
39
+ @Column({
40
+ field: "key_name",
41
+ allowNull: true,
42
+ type: DataType.STRING(100)
43
+ })
44
+ declare keyName?: string;
45
+
46
+ @Column({
47
+ field: "user_id",
48
+ allowNull: true,
49
+ type: DataType.INTEGER
50
+ })
51
+ declare userId?: number;
52
+
53
+ @Column({
54
+ type: DataType.STRING(255)
55
+ })
56
+ declare name: string;
57
+
58
+ @Column({
59
+ allowNull: true,
60
+ type: DataType.STRING(255)
61
+ })
62
+ declare description?: string;
63
+
64
+ @Column({
65
+ allowNull: true,
66
+ type: DataType.INTEGER
67
+ })
68
+ declare status?: number;
69
+
70
+ @Column({
71
+ field: "created_by",
72
+ allowNull: true,
73
+ type: DataType.STRING(60)
74
+ })
75
+ declare createdBy?: string;
76
+
77
+ @Column({
78
+ field: "created_date",
79
+ allowNull: true,
80
+ type: DataType.DATE
81
+ })
82
+ declare createdDate?: Date;
83
+
84
+ @Column({
85
+ field: "updated_by",
86
+ allowNull: true,
87
+ type: DataType.STRING(60)
88
+ })
89
+ declare updatedBy?: string;
90
+
91
+ @Column({
92
+ field: "updated_date",
93
+ allowNull: true,
94
+ type: DataType.DATE
95
+ })
96
+ declare updatedDate?: Date;
97
+
98
+ @HasMany(() => mdLink, {
99
+ sourceKey: "id"
100
+ })
101
+ declare mdLinks?: mdLink[];
102
+
103
+ }
@@ -18,7 +18,7 @@ export interface mdPopupAttributes {
18
18
  expireDate?: Date;
19
19
  createdBy?: string;
20
20
  createdDate?: Date;
21
- updatedBy: string;
21
+ updatedBy?: string;
22
22
  updatedDate?: Date;
23
23
  }
24
24
 
@@ -126,10 +126,10 @@ export class mdPopup extends Model<mdPopupAttributes, mdPopupAttributes> impleme
126
126
 
127
127
  @Column({
128
128
  field: "updated_by",
129
- primaryKey: true,
129
+ allowNull: true,
130
130
  type: DataType.STRING(60)
131
131
  })
132
- declare updatedBy: string;
132
+ declare updatedBy?: string;
133
133
 
134
134
  @Column({
135
135
  field: "updated_date",
@@ -14,6 +14,7 @@ export interface menuAttributes {
14
14
  moduleId?: number;
15
15
  sort?: number;
16
16
  status?: number;
17
+ data?: object;
17
18
  createdBy?: string;
18
19
  createdDate?: Date;
19
20
  updatedBy?: string;
@@ -84,6 +85,12 @@ export class menu extends Model<menuAttributes, menuAttributes> implements menuA
84
85
  })
85
86
  declare status?: number;
86
87
 
88
+ @Column({
89
+ allowNull: true,
90
+ type: DataType.JSON
91
+ })
92
+ declare data?: object;
93
+
87
94
  @Column({
88
95
  field: "created_by",
89
96
  allowNull: true,
@@ -0,0 +1,74 @@
1
+ import {
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey
3
+ } from "sequelize-typescript";
4
+
5
+ export interface settingAttributes {
6
+ id?: number;
7
+ uuid: string;
8
+ title?: string;
9
+ description?: string;
10
+ imageLogoUuid?: string;
11
+ imageCoverUuid?: string;
12
+ imageBackgroundUuid?: string;
13
+ updatedDate?: Date;
14
+ }
15
+
16
+ @Table({
17
+ tableName: "setting",
18
+ timestamps: false
19
+ })
20
+ export class setting extends Model<settingAttributes, settingAttributes> implements settingAttributes {
21
+
22
+ @Column({
23
+ primaryKey: true,
24
+ autoIncrement: true,
25
+ type: DataType.INTEGER
26
+ })
27
+ declare id?: number;
28
+
29
+ @Column({
30
+ type: DataType.STRING(60)
31
+ })
32
+ declare uuid: string;
33
+
34
+ @Column({
35
+ allowNull: true,
36
+ type: DataType.STRING(255)
37
+ })
38
+ declare title?: string;
39
+
40
+ @Column({
41
+ allowNull: true,
42
+ type: DataType.STRING(255)
43
+ })
44
+ declare description?: string;
45
+
46
+ @Column({
47
+ field: "image_logo_uuid",
48
+ allowNull: true,
49
+ type: DataType.STRING(60)
50
+ })
51
+ declare imageLogoUuid?: string;
52
+
53
+ @Column({
54
+ field: "image_cover_uuid",
55
+ allowNull: true,
56
+ type: DataType.STRING(60)
57
+ })
58
+ declare imageCoverUuid?: string;
59
+
60
+ @Column({
61
+ field: "image_background_uuid",
62
+ allowNull: true,
63
+ type: DataType.STRING(60)
64
+ })
65
+ declare imageBackgroundUuid?: string;
66
+
67
+ @Column({
68
+ field: "updated_date",
69
+ allowNull: true,
70
+ type: DataType.DATE
71
+ })
72
+ declare updatedDate?: Date;
73
+
74
+ }
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { b as authItem, a as authItemAttributes } from '../../authItem-CLwL7pX_.js';
2
+ export { b as authItem, a as authItemAttributes } from '../../authItem-BzI7UMbH.js';
@@ -165,6 +165,12 @@ __decorateClass([
165
165
  type: import_sequelize_typescript2.DataType.INTEGER
166
166
  })
167
167
  ], menu.prototype, "status", 2);
168
+ __decorateClass([
169
+ (0, import_sequelize_typescript2.Column)({
170
+ allowNull: true,
171
+ type: import_sequelize_typescript2.DataType.JSON
172
+ })
173
+ ], menu.prototype, "data", 2);
168
174
  __decorateClass([
169
175
  (0, import_sequelize_typescript2.Column)({
170
176
  field: "created_by",
@@ -1,2 +1,2 @@
1
1
  import 'sequelize-typescript';
2
- export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-CLwL7pX_.js';
2
+ export { d as authItemChild, c as authItemChildAttributes } from '../../authItem-BzI7UMbH.js';
@@ -168,6 +168,12 @@ __decorateClass([
168
168
  type: import_sequelize_typescript2.DataType.INTEGER
169
169
  })
170
170
  ], menu.prototype, "status", 2);
171
+ __decorateClass([
172
+ (0, import_sequelize_typescript2.Column)({
173
+ allowNull: true,
174
+ type: import_sequelize_typescript2.DataType.JSON
175
+ })
176
+ ], menu.prototype, "data", 2);
171
177
  __decorateClass([
172
178
  (0, import_sequelize_typescript2.Column)({
173
179
  field: "created_by",
@@ -1,17 +1,18 @@
1
1
  export { b as authAssignment, a as authAssignmentAttributes, d as authRole, c as authRoleAttributes, f as authRoleChild, e as authRoleChildAttributes, g as mdContent, m as mdContentAttributes, i as mdContentGroup, h as mdContentGroupAttributes, k as mdQuestionnaire, j as mdQuestionnaireAttributes, l as users, u as usersAttributes, o as usersVerify, n as usersVerifyAttributes } from '../../authAssignment-WsNQC_sL.js';
2
- export { b as authItem, a as authItemAttributes, d as authItemChild, c as authItemChildAttributes, e as menu, m as menuAttributes, g as msModule, f as msModuleAttributes } from '../../authItem-CLwL7pX_.js';
2
+ export { b as authItem, a as authItemAttributes, d as authItemChild, c as authItemChildAttributes, e as menu, m as menuAttributes, g as msModule, f as msModuleAttributes } from '../../authItem-BzI7UMbH.js';
3
3
  export { a as files, f as filesAttributes, b as mdBanner, m as mdBannerAttributes } from '../../files-D-yguFRL.js';
4
4
  export { mdCmsSingle, mdCmsSingleAttributes } from './mdCmsSingle.js';
5
5
  export { mdDocumentPdf, mdDocumentPdfAttributes } from './mdDocumentPdf.js';
6
6
  export { mdDownload, mdDownloadAttributes } from './mdDownload.js';
7
7
  export { a as mdEbook, m as mdEbookAttributes, c as mdEbookGroup, b as mdEbookGroupAttributes } from '../../mdEbook-C-qae2zR.js';
8
8
  export { a as mdFaq, m as mdFaqAttributes, c as mdFaqGroup, b as mdFaqGroupAttributes } from '../../mdFaq-1c4X_DI2.js';
9
- export { mdLink, mdLinkAttributes } from './mdLink.js';
9
+ export { a as mdLink, m as mdLinkAttributes } from '../../mdLink-ChFknQpZ.js';
10
10
  export { a as mdNews, m as mdNewsAttributes, c as mdNewsGroup, b as mdNewsGroupAttributes } from '../../mdNews-CYzk8W_D.js';
11
11
  export { mdPopup, mdPopupAttributes } from './mdPopup.js';
12
12
  export { mdSetting, mdSettingAttributes } from './mdSetting.js';
13
13
  export { oauthAccessToken, oauthAccessTokenAttributes } from './oauthAccessToken.js';
14
14
  export { oauthRefreshToken, oauthRefreshTokenAttributes } from './oauthRefreshToken.js';
15
+ export { setting, settingAttributes } from './setting.js';
15
16
  export { userCenterV, userCenterVAttributes } from './userCenterV.js';
16
17
  export { userRoleV, userRoleVAttributes } from './userRoleV.js';
17
18
  import 'sequelize-typescript';