netcore-blueprint 1.0.24 → 1.0.26
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/BlueprintTemplate/Blueprint.API/{Controllers → AsyncControllers}/UserControllerAsync.cs +2 -2
- package/BlueprintTemplate/Blueprint.API/Blueprint.API.csproj +0 -1
- package/BlueprintTemplate/Blueprint.API/Controllers/UserController.cs +2 -1
- package/BlueprintTemplate/Blueprint.API/Program.cs +2 -1
- package/BlueprintTemplate/Blueprint.API/appsettings.json +1 -1
- package/BlueprintTemplate/Blueprint.Core/Blueprint.Core.csproj +1 -0
- package/BlueprintTemplate/Blueprint.Core/Dtos/Requests/BaseRequestDto.cs +7 -7
- package/BlueprintTemplate/Blueprint.Core/Dtos/Requests/UserRequestDto.cs +2 -4
- package/BlueprintTemplate/Blueprint.Core/Dtos/Responses/BaseResponseDto.cs +8 -11
- package/BlueprintTemplate/Blueprint.Core/Dtos/Responses/UserResponseDto.cs +1 -2
- package/BlueprintTemplate/Blueprint.Core/Entities/BaseEntity.cs +6 -6
- package/BlueprintTemplate/Blueprint.Core/Entities/Category.cs +3 -1
- package/BlueprintTemplate/Blueprint.Core/Entities/Product.cs +4 -5
- package/BlueprintTemplate/Blueprint.Core/Interfaces/SPI/IRepositoryFactory.cs +0 -1
- package/BlueprintTemplate/Blueprint.Core/Interfaces/SPI/IUserInfra.cs +2 -2
- package/BlueprintTemplate/Blueprint.Infra/Blueprint.Infra.csproj +4 -1
- package/BlueprintTemplate/Blueprint.Infra/Database/DbInitializer.cs +63 -63
- package/BlueprintTemplate/Blueprint.Infra/Migrations/{20250401143459_InitialCreate.Designer.cs → 20250405235602_InitialCreate.Designer.cs} +98 -89
- package/BlueprintTemplate/Blueprint.Infra/Migrations/20250405235602_InitialCreate.cs +154 -0
- package/BlueprintTemplate/Blueprint.Infra/Migrations/MyDbContextModelSnapshot.cs +97 -88
- package/BlueprintTemplate/Blueprint.Infra/Services/{MongoItemInfra.cs → Mongo/MongoItemInfra.cs} +3 -3
- package/BlueprintTemplate/Blueprint.Infra/Services/{MongoUserInfra.cs → Mongo/MongoUserInfra.cs} +2 -3
- package/BlueprintTemplate/Blueprint.Infra/Services/{MySQLItemInfra.cs → MySQL/MySQLItemInfra.cs} +3 -3
- package/BlueprintTemplate/Blueprint.Infra/Services/{MySQLUserInfra.cs → MySQL/MySQLUserInfra.cs} +2 -3
- package/BlueprintTemplate/Blueprint.Infra/Services/RepositoryFactory.cs +14 -10
- package/package.json +1 -1
- package/BlueprintTemplate/Blueprint.API/Controllers/WeatherForecastController.cs +0 -33
- package/BlueprintTemplate/Blueprint.Core/Dtos/Others/BaseDto.cs +0 -10
- package/BlueprintTemplate/Blueprint.Infra/Migrations/20250401143459_InitialCreate.cs +0 -149
- /package/BlueprintTemplate/{Blueprint.Infra → Blueprint.Core}/Services/RabbitMqService.cs +0 -0
|
@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
12
12
|
namespace Blueprint.Infra.Migrations
|
|
13
13
|
{
|
|
14
14
|
[DbContext(typeof(MyDbContext))]
|
|
15
|
-
[Migration("
|
|
15
|
+
[Migration("20250405235602_InitialCreate")]
|
|
16
16
|
partial class InitialCreate
|
|
17
17
|
{
|
|
18
18
|
/// <inheritdoc />
|
|
@@ -33,21 +33,27 @@ namespace Blueprint.Infra.Migrations
|
|
|
33
33
|
|
|
34
34
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
35
35
|
|
|
36
|
-
b.Property<
|
|
37
|
-
.HasColumnType("
|
|
38
|
-
|
|
39
|
-
b.Property<DateTime>("CreatedDate")
|
|
40
|
-
.HasColumnType("datetime(6)");
|
|
36
|
+
b.Property<string>("Content")
|
|
37
|
+
.HasColumnType("longtext");
|
|
41
38
|
|
|
42
|
-
b.Property<string>("
|
|
39
|
+
b.Property<string>("CoverImage")
|
|
43
40
|
.HasColumnType("longtext");
|
|
44
41
|
|
|
45
|
-
b.Property<DateTime>("
|
|
42
|
+
b.Property<DateTime>("Date")
|
|
43
|
+
.HasColumnType("datetime(6)");
|
|
44
|
+
|
|
45
|
+
b.Property<DateTime>("Modified")
|
|
46
46
|
.HasColumnType("datetime(6)");
|
|
47
47
|
|
|
48
48
|
b.Property<string>("Name")
|
|
49
49
|
.HasColumnType("longtext");
|
|
50
50
|
|
|
51
|
+
b.Property<bool>("Status")
|
|
52
|
+
.HasColumnType("tinyint(1)");
|
|
53
|
+
|
|
54
|
+
b.Property<string>("Title")
|
|
55
|
+
.HasColumnType("longtext");
|
|
56
|
+
|
|
51
57
|
b.HasKey("Id");
|
|
52
58
|
|
|
53
59
|
b.ToTable("Category");
|
|
@@ -56,18 +62,18 @@ namespace Blueprint.Infra.Migrations
|
|
|
56
62
|
new
|
|
57
63
|
{
|
|
58
64
|
Id = 1,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6934),
|
|
66
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6935),
|
|
67
|
+
Name = "Item 1",
|
|
68
|
+
Status = true
|
|
63
69
|
},
|
|
64
70
|
new
|
|
65
71
|
{
|
|
66
72
|
Id = 2,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6937),
|
|
74
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6937),
|
|
75
|
+
Name = "Item 2",
|
|
76
|
+
Status = true
|
|
71
77
|
});
|
|
72
78
|
});
|
|
73
79
|
|
|
@@ -79,25 +85,28 @@ namespace Blueprint.Infra.Migrations
|
|
|
79
85
|
|
|
80
86
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
81
87
|
|
|
82
|
-
b.Property<bool>("Active")
|
|
83
|
-
.HasColumnType("tinyint(1)");
|
|
84
|
-
|
|
85
88
|
b.Property<int?>("CategoryId")
|
|
86
89
|
.HasColumnType("int");
|
|
87
90
|
|
|
88
|
-
b.Property<
|
|
89
|
-
.HasColumnType("
|
|
91
|
+
b.Property<string>("Content")
|
|
92
|
+
.HasColumnType("longtext");
|
|
90
93
|
|
|
91
|
-
b.Property<string>("
|
|
94
|
+
b.Property<string>("CoverImage")
|
|
92
95
|
.HasColumnType("longtext");
|
|
93
96
|
|
|
94
|
-
b.Property<DateTime>("
|
|
97
|
+
b.Property<DateTime>("Date")
|
|
98
|
+
.HasColumnType("datetime(6)");
|
|
99
|
+
|
|
100
|
+
b.Property<DateTime>("Modified")
|
|
95
101
|
.HasColumnType("datetime(6)");
|
|
96
102
|
|
|
97
103
|
b.Property<string>("Name")
|
|
98
104
|
.HasColumnType("longtext");
|
|
99
105
|
|
|
100
|
-
b.Property<
|
|
106
|
+
b.Property<bool>("Status")
|
|
107
|
+
.HasColumnType("tinyint(1)");
|
|
108
|
+
|
|
109
|
+
b.Property<string>("Title")
|
|
101
110
|
.HasColumnType("longtext");
|
|
102
111
|
|
|
103
112
|
b.HasKey("Id");
|
|
@@ -110,122 +119,122 @@ namespace Blueprint.Infra.Migrations
|
|
|
110
119
|
new
|
|
111
120
|
{
|
|
112
121
|
Id = 1,
|
|
113
|
-
Active = true,
|
|
114
122
|
CategoryId = 1,
|
|
115
|
-
|
|
116
|
-
|
|
123
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png",
|
|
124
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6954),
|
|
125
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6954),
|
|
117
126
|
Name = "Item 1",
|
|
118
|
-
|
|
127
|
+
Status = true
|
|
119
128
|
},
|
|
120
129
|
new
|
|
121
130
|
{
|
|
122
131
|
Id = 2,
|
|
123
|
-
Active = true,
|
|
124
132
|
CategoryId = 2,
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png",
|
|
134
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6956),
|
|
135
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6957),
|
|
127
136
|
Name = "Item 2",
|
|
128
|
-
|
|
137
|
+
Status = true
|
|
129
138
|
},
|
|
130
139
|
new
|
|
131
140
|
{
|
|
132
141
|
Id = 3,
|
|
133
|
-
Active = true,
|
|
134
142
|
CategoryId = 2,
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png",
|
|
144
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6959),
|
|
145
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6959),
|
|
137
146
|
Name = "Item 3",
|
|
138
|
-
|
|
147
|
+
Status = true
|
|
139
148
|
},
|
|
140
149
|
new
|
|
141
150
|
{
|
|
142
151
|
Id = 4,
|
|
143
|
-
Active = true,
|
|
144
152
|
CategoryId = 1,
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg",
|
|
154
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6961),
|
|
155
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6962),
|
|
147
156
|
Name = "Item 4",
|
|
148
|
-
|
|
157
|
+
Status = true
|
|
149
158
|
},
|
|
150
159
|
new
|
|
151
160
|
{
|
|
152
161
|
Id = 5,
|
|
153
|
-
Active = true,
|
|
154
162
|
CategoryId = 2,
|
|
155
|
-
|
|
156
|
-
|
|
163
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg",
|
|
164
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6964),
|
|
165
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6964),
|
|
157
166
|
Name = "Item 5",
|
|
158
|
-
|
|
167
|
+
Status = true
|
|
159
168
|
},
|
|
160
169
|
new
|
|
161
170
|
{
|
|
162
171
|
Id = 6,
|
|
163
|
-
Active = true,
|
|
164
172
|
CategoryId = 2,
|
|
165
|
-
|
|
166
|
-
|
|
173
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-1.jpg",
|
|
174
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6966),
|
|
175
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6966),
|
|
167
176
|
Name = "Item 6",
|
|
168
|
-
|
|
177
|
+
Status = true
|
|
169
178
|
},
|
|
170
179
|
new
|
|
171
180
|
{
|
|
172
181
|
Id = 7,
|
|
173
|
-
Active = true,
|
|
174
182
|
CategoryId = 1,
|
|
175
|
-
|
|
176
|
-
|
|
183
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-303.jpg",
|
|
184
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6968),
|
|
185
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6969),
|
|
177
186
|
Name = "Item 7",
|
|
178
|
-
|
|
187
|
+
Status = true
|
|
179
188
|
},
|
|
180
189
|
new
|
|
181
190
|
{
|
|
182
191
|
Id = 8,
|
|
183
|
-
Active = true,
|
|
184
192
|
CategoryId = 2,
|
|
185
|
-
|
|
186
|
-
|
|
193
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png",
|
|
194
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6971),
|
|
195
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6971),
|
|
187
196
|
Name = "Item 8",
|
|
188
|
-
|
|
197
|
+
Status = true
|
|
189
198
|
},
|
|
190
199
|
new
|
|
191
200
|
{
|
|
192
201
|
Id = 9,
|
|
193
|
-
Active = true,
|
|
194
202
|
CategoryId = 2,
|
|
195
|
-
|
|
196
|
-
|
|
203
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png",
|
|
204
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6973),
|
|
205
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6973),
|
|
197
206
|
Name = "Item 9",
|
|
198
|
-
|
|
207
|
+
Status = true
|
|
199
208
|
},
|
|
200
209
|
new
|
|
201
210
|
{
|
|
202
211
|
Id = 10,
|
|
203
|
-
Active = true,
|
|
204
212
|
CategoryId = 1,
|
|
205
|
-
|
|
206
|
-
|
|
213
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png",
|
|
214
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6975),
|
|
215
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6976),
|
|
207
216
|
Name = "Item 10",
|
|
208
|
-
|
|
217
|
+
Status = true
|
|
209
218
|
},
|
|
210
219
|
new
|
|
211
220
|
{
|
|
212
221
|
Id = 11,
|
|
213
|
-
Active = true,
|
|
214
222
|
CategoryId = 2,
|
|
215
|
-
|
|
216
|
-
|
|
223
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg",
|
|
224
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6978),
|
|
225
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6978),
|
|
217
226
|
Name = "Item 11",
|
|
218
|
-
|
|
227
|
+
Status = true
|
|
219
228
|
},
|
|
220
229
|
new
|
|
221
230
|
{
|
|
222
231
|
Id = 12,
|
|
223
|
-
Active = true,
|
|
224
232
|
CategoryId = 2,
|
|
225
|
-
|
|
226
|
-
|
|
233
|
+
CoverImage = "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg",
|
|
234
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6980),
|
|
235
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6980),
|
|
227
236
|
Name = "Item 12",
|
|
228
|
-
|
|
237
|
+
Status = true
|
|
229
238
|
});
|
|
230
239
|
});
|
|
231
240
|
|
|
@@ -237,16 +246,13 @@ namespace Blueprint.Infra.Migrations
|
|
|
237
246
|
|
|
238
247
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
239
248
|
|
|
240
|
-
b.Property<
|
|
241
|
-
.HasColumnType("tinyint(1)");
|
|
242
|
-
|
|
243
|
-
b.Property<DateTime>("CreatedDate")
|
|
249
|
+
b.Property<DateTime>("Date")
|
|
244
250
|
.HasColumnType("datetime(6)");
|
|
245
251
|
|
|
246
252
|
b.Property<string>("Email")
|
|
247
253
|
.HasColumnType("longtext");
|
|
248
254
|
|
|
249
|
-
b.Property<DateTime>("
|
|
255
|
+
b.Property<DateTime>("Modified")
|
|
250
256
|
.HasColumnType("datetime(6)");
|
|
251
257
|
|
|
252
258
|
b.Property<string>("Name")
|
|
@@ -258,6 +264,9 @@ namespace Blueprint.Infra.Migrations
|
|
|
258
264
|
b.Property<int>("Role")
|
|
259
265
|
.HasColumnType("int");
|
|
260
266
|
|
|
267
|
+
b.Property<bool>("Status")
|
|
268
|
+
.HasColumnType("tinyint(1)");
|
|
269
|
+
|
|
261
270
|
b.HasKey("Id");
|
|
262
271
|
|
|
263
272
|
b.ToTable("User");
|
|
@@ -266,32 +275,32 @@ namespace Blueprint.Infra.Migrations
|
|
|
266
275
|
new
|
|
267
276
|
{
|
|
268
277
|
Id = 1,
|
|
269
|
-
|
|
270
|
-
CreatedDate = new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3853),
|
|
278
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6827),
|
|
271
279
|
Email = "",
|
|
272
|
-
|
|
280
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6827),
|
|
273
281
|
Name = "Test",
|
|
274
|
-
Role = 0
|
|
282
|
+
Role = 0,
|
|
283
|
+
Status = true
|
|
275
284
|
},
|
|
276
285
|
new
|
|
277
286
|
{
|
|
278
287
|
Id = 2,
|
|
279
|
-
|
|
280
|
-
CreatedDate = new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3856),
|
|
288
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6830),
|
|
281
289
|
Email = "truongdxfx08031@funix.edu.vn",
|
|
282
|
-
|
|
290
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6830),
|
|
283
291
|
Name = "Truong Dang",
|
|
284
|
-
Role = 0
|
|
292
|
+
Role = 0,
|
|
293
|
+
Status = true
|
|
285
294
|
},
|
|
286
295
|
new
|
|
287
296
|
{
|
|
288
297
|
Id = 3,
|
|
289
|
-
|
|
290
|
-
CreatedDate = new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3859),
|
|
298
|
+
Date = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6832),
|
|
291
299
|
Email = "truonghusk17aws1@gmail.com",
|
|
292
|
-
|
|
300
|
+
Modified = new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6833),
|
|
293
301
|
Name = "Thai Son",
|
|
294
|
-
Role = 0
|
|
302
|
+
Role = 0,
|
|
303
|
+
Status = true
|
|
295
304
|
});
|
|
296
305
|
});
|
|
297
306
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
using Microsoft.EntityFrameworkCore.Metadata;
|
|
2
|
+
using Microsoft.EntityFrameworkCore.Migrations;
|
|
3
|
+
|
|
4
|
+
#nullable disable
|
|
5
|
+
|
|
6
|
+
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
7
|
+
|
|
8
|
+
namespace Blueprint.Infra.Migrations
|
|
9
|
+
{
|
|
10
|
+
/// <inheritdoc />
|
|
11
|
+
public partial class InitialCreate : Migration
|
|
12
|
+
{
|
|
13
|
+
/// <inheritdoc />
|
|
14
|
+
protected override void Up(MigrationBuilder migrationBuilder)
|
|
15
|
+
{
|
|
16
|
+
migrationBuilder.AlterDatabase()
|
|
17
|
+
.Annotation("MySql:CharSet", "utf8mb4");
|
|
18
|
+
|
|
19
|
+
migrationBuilder.CreateTable(
|
|
20
|
+
name: "Category",
|
|
21
|
+
columns: table => new
|
|
22
|
+
{
|
|
23
|
+
Id = table.Column<int>(type: "int", nullable: false)
|
|
24
|
+
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
25
|
+
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
26
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
27
|
+
CoverImage = table.Column<string>(type: "longtext", nullable: true)
|
|
28
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
29
|
+
Title = table.Column<string>(type: "longtext", nullable: true)
|
|
30
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
31
|
+
Content = table.Column<string>(type: "longtext", nullable: true)
|
|
32
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
33
|
+
Status = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
34
|
+
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
35
|
+
Modified = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
36
|
+
},
|
|
37
|
+
constraints: table =>
|
|
38
|
+
{
|
|
39
|
+
table.PrimaryKey("PK_Category", x => x.Id);
|
|
40
|
+
})
|
|
41
|
+
.Annotation("MySql:CharSet", "utf8mb4");
|
|
42
|
+
|
|
43
|
+
migrationBuilder.CreateTable(
|
|
44
|
+
name: "User",
|
|
45
|
+
columns: table => new
|
|
46
|
+
{
|
|
47
|
+
Id = table.Column<int>(type: "int", nullable: false)
|
|
48
|
+
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
49
|
+
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
50
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
51
|
+
Email = table.Column<string>(type: "longtext", nullable: true)
|
|
52
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
53
|
+
Picture = table.Column<string>(type: "longtext", nullable: true)
|
|
54
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
55
|
+
Role = table.Column<int>(type: "int", nullable: false),
|
|
56
|
+
Status = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
57
|
+
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
58
|
+
Modified = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
59
|
+
},
|
|
60
|
+
constraints: table =>
|
|
61
|
+
{
|
|
62
|
+
table.PrimaryKey("PK_User", x => x.Id);
|
|
63
|
+
})
|
|
64
|
+
.Annotation("MySql:CharSet", "utf8mb4");
|
|
65
|
+
|
|
66
|
+
migrationBuilder.CreateTable(
|
|
67
|
+
name: "Product",
|
|
68
|
+
columns: table => new
|
|
69
|
+
{
|
|
70
|
+
Id = table.Column<int>(type: "int", nullable: false)
|
|
71
|
+
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
72
|
+
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
73
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
74
|
+
CoverImage = table.Column<string>(type: "longtext", nullable: true)
|
|
75
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
76
|
+
Title = table.Column<string>(type: "longtext", nullable: true)
|
|
77
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
78
|
+
Content = table.Column<string>(type: "longtext", nullable: true)
|
|
79
|
+
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
80
|
+
CategoryId = table.Column<int>(type: "int", nullable: true),
|
|
81
|
+
Status = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
82
|
+
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
83
|
+
Modified = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
84
|
+
},
|
|
85
|
+
constraints: table =>
|
|
86
|
+
{
|
|
87
|
+
table.PrimaryKey("PK_Product", x => x.Id);
|
|
88
|
+
table.ForeignKey(
|
|
89
|
+
name: "FK_Product_Category_CategoryId",
|
|
90
|
+
column: x => x.CategoryId,
|
|
91
|
+
principalTable: "Category",
|
|
92
|
+
principalColumn: "Id",
|
|
93
|
+
onDelete: ReferentialAction.Cascade);
|
|
94
|
+
})
|
|
95
|
+
.Annotation("MySql:CharSet", "utf8mb4");
|
|
96
|
+
|
|
97
|
+
migrationBuilder.InsertData(
|
|
98
|
+
table: "Category",
|
|
99
|
+
columns: new[] { "Id", "Content", "CoverImage", "Date", "Modified", "Name", "Status", "Title" },
|
|
100
|
+
values: new object[,]
|
|
101
|
+
{
|
|
102
|
+
{ 1, null, null, new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6934), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6935), "Item 1", true, null },
|
|
103
|
+
{ 2, null, null, new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6937), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6937), "Item 2", true, null }
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
migrationBuilder.InsertData(
|
|
107
|
+
table: "User",
|
|
108
|
+
columns: new[] { "Id", "Date", "Email", "Modified", "Name", "Picture", "Role", "Status" },
|
|
109
|
+
values: new object[,]
|
|
110
|
+
{
|
|
111
|
+
{ 1, new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6827), "", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6827), "Test", null, 0, true },
|
|
112
|
+
{ 2, new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6830), "truongdxfx08031@funix.edu.vn", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6830), "Truong Dang", null, 0, true },
|
|
113
|
+
{ 3, new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6832), "truonghusk17aws1@gmail.com", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6833), "Thai Son", null, 0, true }
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
migrationBuilder.InsertData(
|
|
117
|
+
table: "Product",
|
|
118
|
+
columns: new[] { "Id", "CategoryId", "Content", "CoverImage", "Date", "Modified", "Name", "Status", "Title" },
|
|
119
|
+
values: new object[,]
|
|
120
|
+
{
|
|
121
|
+
{ 1, 1, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6954), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6954), "Item 1", true, null },
|
|
122
|
+
{ 2, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6956), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6957), "Item 2", true, null },
|
|
123
|
+
{ 3, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6959), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6959), "Item 3", true, null },
|
|
124
|
+
{ 4, 1, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6961), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6962), "Item 4", true, null },
|
|
125
|
+
{ 5, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6964), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6964), "Item 5", true, null },
|
|
126
|
+
{ 6, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-1.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6966), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6966), "Item 6", true, null },
|
|
127
|
+
{ 7, 1, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-303.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6968), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6969), "Item 7", true, null },
|
|
128
|
+
{ 8, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6971), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6971), "Item 8", true, null },
|
|
129
|
+
{ 9, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6973), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6973), "Item 9", true, null },
|
|
130
|
+
{ 10, 1, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6975), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6976), "Item 10", true, null },
|
|
131
|
+
{ 11, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6978), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6978), "Item 11", true, null },
|
|
132
|
+
{ 12, 2, null, "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg", new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6980), new DateTime(2025, 4, 6, 6, 56, 0, 937, DateTimeKind.Local).AddTicks(6980), "Item 12", true, null }
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
migrationBuilder.CreateIndex(
|
|
136
|
+
name: "IX_Product_CategoryId",
|
|
137
|
+
table: "Product",
|
|
138
|
+
column: "CategoryId");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/// <inheritdoc />
|
|
142
|
+
protected override void Down(MigrationBuilder migrationBuilder)
|
|
143
|
+
{
|
|
144
|
+
migrationBuilder.DropTable(
|
|
145
|
+
name: "Product");
|
|
146
|
+
|
|
147
|
+
migrationBuilder.DropTable(
|
|
148
|
+
name: "User");
|
|
149
|
+
|
|
150
|
+
migrationBuilder.DropTable(
|
|
151
|
+
name: "Category");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|