@admc-go-th/admc-library 1.0.60 → 1.0.61

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.
@@ -12,6 +12,8 @@ export * from "./mdContent";
12
12
  export * from "./mdContentGroup";
13
13
  export * from "./mdDocumentPdf";
14
14
  export * from "./mdDownload";
15
+ export * from "./mdDownloadBk";
16
+ export * from "./mdDownloadGroup";
15
17
  export * from "./mdEbook";
16
18
  export * from "./mdEbookGroup";
17
19
  export * from "./mdFaq";
@@ -1,18 +1,29 @@
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 { mdDownloadGroup } from "./mdDownloadGroup";
4
5
 
5
6
  export interface mdDownloadAttributes {
6
7
  id?: number;
7
- uuid?: string;
8
+ uuid: string;
8
9
  keyName?: string;
10
+ groupId?: number;
11
+ userId: number;
9
12
  title?: string;
10
13
  description?: string;
11
- fileUuid?: string;
12
- totalDownload?: number;
14
+ detail?: string;
15
+ metaTitle?: string;
16
+ metaKeyword?: string;
17
+ metaDescription?: string;
18
+ imageCover?: string;
19
+ video?: string;
20
+ imageGallery?: object;
21
+ attachments?: object;
22
+ highlight?: number;
13
23
  sort?: number;
14
24
  status?: number;
15
- hasExpire?: number;
25
+ publish?: number;
26
+ hasExpire: number;
16
27
  startDate?: Date;
17
28
  expireDate?: Date;
18
29
  createdBy?: string;
@@ -35,10 +46,9 @@ export class mdDownload extends Model<mdDownloadAttributes, mdDownloadAttributes
35
46
  declare id?: number;
36
47
 
37
48
  @Column({
38
- allowNull: true,
39
49
  type: DataType.STRING(60)
40
50
  })
41
- declare uuid?: string;
51
+ declare uuid: string;
42
52
 
43
53
  @Column({
44
54
  field: "key_name",
@@ -47,9 +57,23 @@ export class mdDownload extends Model<mdDownloadAttributes, mdDownloadAttributes
47
57
  })
48
58
  declare keyName?: string;
49
59
 
60
+ @ForeignKey(() => mdDownloadGroup)
61
+ @Column({
62
+ field: "group_id",
63
+ allowNull: true,
64
+ type: DataType.INTEGER
65
+ })
66
+ declare groupId?: number;
67
+
68
+ @Column({
69
+ field: "user_id",
70
+ type: DataType.INTEGER
71
+ })
72
+ declare userId: number;
73
+
50
74
  @Column({
51
75
  allowNull: true,
52
- type: DataType.STRING(255)
76
+ type: DataType.STRING(500)
53
77
  })
54
78
  declare title?: string;
55
79
 
@@ -60,18 +84,63 @@ export class mdDownload extends Model<mdDownloadAttributes, mdDownloadAttributes
60
84
  declare description?: string;
61
85
 
62
86
  @Column({
63
- field: "file_uuid",
87
+ allowNull: true,
88
+ type: DataType.STRING
89
+ })
90
+ declare detail?: string;
91
+
92
+ @Column({
93
+ field: "meta_title",
94
+ allowNull: true,
95
+ type: DataType.STRING(500)
96
+ })
97
+ declare metaTitle?: string;
98
+
99
+ @Column({
100
+ field: "meta_keyword",
101
+ allowNull: true,
102
+ type: DataType.STRING(500)
103
+ })
104
+ declare metaKeyword?: string;
105
+
106
+ @Column({
107
+ field: "meta_description",
108
+ allowNull: true,
109
+ type: DataType.STRING(500)
110
+ })
111
+ declare metaDescription?: string;
112
+
113
+ @Column({
114
+ field: "image_cover",
115
+ allowNull: true,
116
+ type: DataType.STRING(60)
117
+ })
118
+ declare imageCover?: string;
119
+
120
+ @Column({
64
121
  allowNull: true,
65
122
  type: DataType.STRING(60)
66
123
  })
67
- declare fileUuid?: string;
124
+ declare video?: string;
125
+
126
+ @Column({
127
+ field: "image_gallery",
128
+ allowNull: true,
129
+ type: DataType.JSON
130
+ })
131
+ declare imageGallery?: object;
132
+
133
+ @Column({
134
+ allowNull: true,
135
+ type: DataType.JSON
136
+ })
137
+ declare attachments?: object;
68
138
 
69
139
  @Column({
70
- field: "total_download",
71
140
  allowNull: true,
72
141
  type: DataType.INTEGER
73
142
  })
74
- declare totalDownload?: number;
143
+ declare highlight?: number;
75
144
 
76
145
  @Column({
77
146
  allowNull: true,
@@ -86,11 +155,16 @@ export class mdDownload extends Model<mdDownloadAttributes, mdDownloadAttributes
86
155
  declare status?: number;
87
156
 
88
157
  @Column({
89
- field: "has_expire",
90
158
  allowNull: true,
91
159
  type: DataType.INTEGER
92
160
  })
93
- declare hasExpire?: number;
161
+ declare publish?: number;
162
+
163
+ @Column({
164
+ field: "has_expire",
165
+ type: DataType.INTEGER
166
+ })
167
+ declare hasExpire: number;
94
168
 
95
169
  @Column({
96
170
  field: "start_date",
@@ -134,4 +208,7 @@ export class mdDownload extends Model<mdDownloadAttributes, mdDownloadAttributes
134
208
  })
135
209
  declare updatedDate?: Date;
136
210
 
211
+ @BelongsTo(() => mdDownloadGroup)
212
+ declare mdDownloadGroup?: mdDownloadGroup;
213
+
137
214
  }
@@ -0,0 +1,137 @@
1
+ import {
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey
3
+ } from "sequelize-typescript";
4
+
5
+ export interface mdDownloadBkAttributes {
6
+ id?: number;
7
+ uuid?: string;
8
+ keyName?: string;
9
+ title?: string;
10
+ description?: string;
11
+ fileUuid?: string;
12
+ totalDownload?: number;
13
+ sort?: number;
14
+ status?: number;
15
+ hasExpire?: number;
16
+ startDate?: Date;
17
+ expireDate?: Date;
18
+ createdBy?: string;
19
+ createdDate?: Date;
20
+ updatedBy?: string;
21
+ updatedDate?: Date;
22
+ }
23
+
24
+ @Table({
25
+ tableName: "md_download@bk",
26
+ timestamps: false
27
+ })
28
+ export class mdDownloadBk extends Model<mdDownloadBkAttributes, mdDownloadBkAttributes> implements mdDownloadBkAttributes {
29
+
30
+ @Column({
31
+ primaryKey: true,
32
+ autoIncrement: true,
33
+ type: DataType.INTEGER
34
+ })
35
+ declare id?: number;
36
+
37
+ @Column({
38
+ allowNull: true,
39
+ type: DataType.STRING(60)
40
+ })
41
+ declare uuid?: string;
42
+
43
+ @Column({
44
+ field: "key_name",
45
+ allowNull: true,
46
+ type: DataType.STRING(100)
47
+ })
48
+ declare keyName?: string;
49
+
50
+ @Column({
51
+ allowNull: true,
52
+ type: DataType.STRING(255)
53
+ })
54
+ declare title?: string;
55
+
56
+ @Column({
57
+ allowNull: true,
58
+ type: DataType.STRING
59
+ })
60
+ declare description?: string;
61
+
62
+ @Column({
63
+ field: "file_uuid",
64
+ allowNull: true,
65
+ type: DataType.STRING(60)
66
+ })
67
+ declare fileUuid?: string;
68
+
69
+ @Column({
70
+ field: "total_download",
71
+ allowNull: true,
72
+ type: DataType.INTEGER
73
+ })
74
+ declare totalDownload?: number;
75
+
76
+ @Column({
77
+ allowNull: true,
78
+ type: DataType.INTEGER
79
+ })
80
+ declare sort?: number;
81
+
82
+ @Column({
83
+ allowNull: true,
84
+ type: DataType.INTEGER
85
+ })
86
+ declare status?: number;
87
+
88
+ @Column({
89
+ field: "has_expire",
90
+ allowNull: true,
91
+ type: DataType.INTEGER
92
+ })
93
+ declare hasExpire?: number;
94
+
95
+ @Column({
96
+ field: "start_date",
97
+ allowNull: true,
98
+ type: DataType.DATE
99
+ })
100
+ declare startDate?: Date;
101
+
102
+ @Column({
103
+ field: "expire_date",
104
+ allowNull: true,
105
+ type: DataType.DATE
106
+ })
107
+ declare expireDate?: Date;
108
+
109
+ @Column({
110
+ field: "created_by",
111
+ allowNull: true,
112
+ type: DataType.STRING(60)
113
+ })
114
+ declare createdBy?: string;
115
+
116
+ @Column({
117
+ field: "created_date",
118
+ allowNull: true,
119
+ type: DataType.DATE
120
+ })
121
+ declare createdDate?: Date;
122
+
123
+ @Column({
124
+ field: "updated_by",
125
+ allowNull: true,
126
+ type: DataType.STRING(60)
127
+ })
128
+ declare updatedBy?: string;
129
+
130
+ @Column({
131
+ field: "updated_date",
132
+ allowNull: true,
133
+ type: DataType.DATE
134
+ })
135
+ declare updatedDate?: Date;
136
+
137
+ }
@@ -0,0 +1,103 @@
1
+ import {
2
+ Model, Table, Column, DataType, Index, Sequelize, ForeignKey, HasMany
3
+ } from "sequelize-typescript";
4
+ import { mdDownload } from "./mdDownload";
5
+
6
+ export interface mdDownloadGroupAttributes {
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_download_group",
22
+ timestamps: false
23
+ })
24
+ export class mdDownloadGroup extends Model<mdDownloadGroupAttributes, mdDownloadGroupAttributes> implements mdDownloadGroupAttributes {
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(() => mdDownload, {
99
+ sourceKey: "id"
100
+ })
101
+ declare mdDownloads?: mdDownload[];
102
+
103
+ }
@@ -18,6 +18,7 @@ export interface mdEbookAttributes {
18
18
  imageCover?: string;
19
19
  imageGallery?: object;
20
20
  attachments?: object;
21
+ highlight?: number;
21
22
  sort?: number;
22
23
  status?: number;
23
24
  hasExpire: number;
@@ -127,6 +128,12 @@ export class mdEbook extends Model<mdEbookAttributes, mdEbookAttributes> impleme
127
128
  })
128
129
  declare attachments?: object;
129
130
 
131
+ @Column({
132
+ allowNull: true,
133
+ type: DataType.INTEGER
134
+ })
135
+ declare highlight?: number;
136
+
130
137
  @Column({
131
138
  allowNull: true,
132
139
  type: DataType.INTEGER
@@ -73,7 +73,7 @@ export class mdNews extends Model<mdNewsAttributes, mdNewsAttributes> implements
73
73
 
74
74
  @Column({
75
75
  allowNull: true,
76
- type: DataType.STRING(255)
76
+ type: DataType.STRING(500)
77
77
  })
78
78
  declare title?: string;
79
79
 
@@ -92,21 +92,21 @@ export class mdNews extends Model<mdNewsAttributes, mdNewsAttributes> implements
92
92
  @Column({
93
93
  field: "meta_title",
94
94
  allowNull: true,
95
- type: DataType.STRING(255)
95
+ type: DataType.STRING(500)
96
96
  })
97
97
  declare metaTitle?: string;
98
98
 
99
99
  @Column({
100
100
  field: "meta_keyword",
101
101
  allowNull: true,
102
- type: DataType.STRING(255)
102
+ type: DataType.STRING(500)
103
103
  })
104
104
  declare metaKeyword?: string;
105
105
 
106
106
  @Column({
107
107
  field: "meta_description",
108
108
  allowNull: true,
109
- type: DataType.STRING(255)
109
+ type: DataType.STRING(500)
110
110
  })
111
111
  declare metaDescription?: string;
112
112
 
@@ -5,8 +5,9 @@ export { logs, logsAttributes } from './logs.js';
5
5
  export { mdCmsSingle, mdCmsSingleAttributes } from './mdCmsSingle.js';
6
6
  export { mdConfiguration, mdConfigurationAttributes } from './mdConfiguration.js';
7
7
  export { mdDocumentPdf, mdDocumentPdfAttributes } from './mdDocumentPdf.js';
8
- export { mdDownload, mdDownloadAttributes } from './mdDownload.js';
9
- export { a as mdEbook, m as mdEbookAttributes, c as mdEbookGroup, b as mdEbookGroupAttributes } from '../../mdEbook-C-qae2zR.js';
8
+ export { a as mdDownload, m as mdDownloadAttributes, c as mdDownloadGroup, b as mdDownloadGroupAttributes } from '../../mdDownload-DVpoDQbc.js';
9
+ export { mdDownloadBk, mdDownloadBkAttributes } from './mdDownloadBk.js';
10
+ export { a as mdEbook, m as mdEbookAttributes, c as mdEbookGroup, b as mdEbookGroupAttributes } from '../../mdEbook-D18honC4.js';
10
11
  export { a as mdFaq, m as mdFaqAttributes, c as mdFaqGroup, b as mdFaqGroupAttributes } from '../../mdFaq-1c4X_DI2.js';
11
12
  export { mdFormAdvance_1, mdFormAdvance_1Attributes } from './mdFormAdvance_1.js';
12
13
  export { a as mdLink, m as mdLinkAttributes, c as mdLinkGroup, b as mdLinkGroupAttributes } from '../../mdLink-Cr23xu_o.js';