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
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
using System;
|
|
2
|
-
using Microsoft.EntityFrameworkCore.Metadata;
|
|
3
|
-
using Microsoft.EntityFrameworkCore.Migrations;
|
|
4
|
-
|
|
5
|
-
#nullable disable
|
|
6
|
-
|
|
7
|
-
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
8
|
-
|
|
9
|
-
namespace Blueprint.Infra.Migrations
|
|
10
|
-
{
|
|
11
|
-
/// <inheritdoc />
|
|
12
|
-
public partial class InitialCreate : Migration
|
|
13
|
-
{
|
|
14
|
-
/// <inheritdoc />
|
|
15
|
-
protected override void Up(MigrationBuilder migrationBuilder)
|
|
16
|
-
{
|
|
17
|
-
migrationBuilder.AlterDatabase()
|
|
18
|
-
.Annotation("MySql:CharSet", "utf8mb4");
|
|
19
|
-
|
|
20
|
-
migrationBuilder.CreateTable(
|
|
21
|
-
name: "Category",
|
|
22
|
-
columns: table => new
|
|
23
|
-
{
|
|
24
|
-
Id = table.Column<int>(type: "int", nullable: false)
|
|
25
|
-
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
26
|
-
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
27
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
28
|
-
Description = table.Column<string>(type: "longtext", nullable: true)
|
|
29
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
30
|
-
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
31
|
-
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
32
|
-
LastModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
33
|
-
},
|
|
34
|
-
constraints: table =>
|
|
35
|
-
{
|
|
36
|
-
table.PrimaryKey("PK_Category", x => x.Id);
|
|
37
|
-
})
|
|
38
|
-
.Annotation("MySql:CharSet", "utf8mb4");
|
|
39
|
-
|
|
40
|
-
migrationBuilder.CreateTable(
|
|
41
|
-
name: "User",
|
|
42
|
-
columns: table => new
|
|
43
|
-
{
|
|
44
|
-
Id = table.Column<int>(type: "int", nullable: false)
|
|
45
|
-
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
46
|
-
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
47
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
48
|
-
Email = table.Column<string>(type: "longtext", nullable: true)
|
|
49
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
50
|
-
Picture = table.Column<string>(type: "longtext", nullable: true)
|
|
51
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
52
|
-
Role = table.Column<int>(type: "int", nullable: false),
|
|
53
|
-
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
54
|
-
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
55
|
-
LastModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
56
|
-
},
|
|
57
|
-
constraints: table =>
|
|
58
|
-
{
|
|
59
|
-
table.PrimaryKey("PK_User", x => x.Id);
|
|
60
|
-
})
|
|
61
|
-
.Annotation("MySql:CharSet", "utf8mb4");
|
|
62
|
-
|
|
63
|
-
migrationBuilder.CreateTable(
|
|
64
|
-
name: "Product",
|
|
65
|
-
columns: table => new
|
|
66
|
-
{
|
|
67
|
-
Id = table.Column<int>(type: "int", nullable: false)
|
|
68
|
-
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
69
|
-
Name = table.Column<string>(type: "longtext", nullable: true)
|
|
70
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
71
|
-
Url = table.Column<string>(type: "longtext", nullable: true)
|
|
72
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
73
|
-
Description = table.Column<string>(type: "longtext", nullable: true)
|
|
74
|
-
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
75
|
-
CategoryId = table.Column<int>(type: "int", nullable: true),
|
|
76
|
-
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
77
|
-
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
78
|
-
LastModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
79
|
-
},
|
|
80
|
-
constraints: table =>
|
|
81
|
-
{
|
|
82
|
-
table.PrimaryKey("PK_Product", x => x.Id);
|
|
83
|
-
table.ForeignKey(
|
|
84
|
-
name: "FK_Product_Category_CategoryId",
|
|
85
|
-
column: x => x.CategoryId,
|
|
86
|
-
principalTable: "Category",
|
|
87
|
-
principalColumn: "Id",
|
|
88
|
-
onDelete: ReferentialAction.Cascade);
|
|
89
|
-
})
|
|
90
|
-
.Annotation("MySql:CharSet", "utf8mb4");
|
|
91
|
-
|
|
92
|
-
migrationBuilder.InsertData(
|
|
93
|
-
table: "Category",
|
|
94
|
-
columns: new[] { "Id", "Active", "CreatedDate", "Description", "LastModifiedDate", "Name" },
|
|
95
|
-
values: new object[,]
|
|
96
|
-
{
|
|
97
|
-
{ 1, true, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3948), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3948), "Item 1" },
|
|
98
|
-
{ 2, true, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3950), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3950), "Item 2" }
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
migrationBuilder.InsertData(
|
|
102
|
-
table: "User",
|
|
103
|
-
columns: new[] { "Id", "Active", "CreatedDate", "Email", "LastModifiedDate", "Name", "Picture", "Role" },
|
|
104
|
-
values: new object[,]
|
|
105
|
-
{
|
|
106
|
-
{ 1, true, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3853), "", new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3854), "Test", null, 0 },
|
|
107
|
-
{ 2, true, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3856), "truongdxfx08031@funix.edu.vn", new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3857), "Truong Dang", null, 0 },
|
|
108
|
-
{ 3, true, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3859), "truonghusk17aws1@gmail.com", new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3859), "Thai Son", null, 0 }
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
migrationBuilder.InsertData(
|
|
112
|
-
table: "Product",
|
|
113
|
-
columns: new[] { "Id", "Active", "CategoryId", "CreatedDate", "Description", "LastModifiedDate", "Name", "Url" },
|
|
114
|
-
values: new object[,]
|
|
115
|
-
{
|
|
116
|
-
{ 1, true, 1, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3965), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3965), "Item 1", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png" },
|
|
117
|
-
{ 2, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3967), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3968), "Item 2", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png" },
|
|
118
|
-
{ 3, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3969), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3970), "Item 3", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png" },
|
|
119
|
-
{ 4, true, 1, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3972), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3972), "Item 4", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg" },
|
|
120
|
-
{ 5, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3974), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3974), "Item 5", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg" },
|
|
121
|
-
{ 6, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3976), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3976), "Item 6", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-1.jpg" },
|
|
122
|
-
{ 7, true, 1, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3978), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3979), "Item 7", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-303.jpg" },
|
|
123
|
-
{ 8, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3980), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3981), "Item 8", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Premtilmiue.png" },
|
|
124
|
-
{ 9, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3982), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3983), "Item 9", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Protile.png" },
|
|
125
|
-
{ 10, true, 1, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3985), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3985), "Item 10", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/keo-dan-gach-TOA-Supertile.png" },
|
|
126
|
-
{ 11, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3987), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3987), "Item 11", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-Sealant-HP.jpg" },
|
|
127
|
-
{ 12, true, 2, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3989), null, new DateTime(2025, 4, 1, 21, 34, 58, 114, DateTimeKind.Local).AddTicks(3989), "Item 12", "https://innocons.s3.ap-southeast-1.amazonaws.com/products/Silicone-TOA-.jpg" }
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
migrationBuilder.CreateIndex(
|
|
131
|
-
name: "IX_Product_CategoryId",
|
|
132
|
-
table: "Product",
|
|
133
|
-
column: "CategoryId");
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/// <inheritdoc />
|
|
137
|
-
protected override void Down(MigrationBuilder migrationBuilder)
|
|
138
|
-
{
|
|
139
|
-
migrationBuilder.DropTable(
|
|
140
|
-
name: "Product");
|
|
141
|
-
|
|
142
|
-
migrationBuilder.DropTable(
|
|
143
|
-
name: "User");
|
|
144
|
-
|
|
145
|
-
migrationBuilder.DropTable(
|
|
146
|
-
name: "Category");
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
File without changes
|