rename
This commit is contained in:
parent
98151dc393
commit
bda574f0fe
@ -11,7 +11,7 @@ namespace HardwareShopContracts.BindingModels
|
|||||||
|
|
||||||
public string BuildName { get; set; } = string.Empty;
|
public string BuildName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int UserID { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ namespace HardwareShopContracts.BindingModels
|
|||||||
|
|
||||||
public string Text { get; set; } = string.Empty;
|
public string Text { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int BuildID { get; set; }
|
public int BuildId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace HardwareShopContracts.BindingModels
|
|||||||
|
|
||||||
public DateTime? DatePurchase { get; set; }
|
public DateTime? DatePurchase { get; set; }
|
||||||
|
|
||||||
public int UserID { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; set; }
|
public Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; set; }
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace HardwareShopContracts.ViewModels
|
|||||||
[DisplayName("Клиент")]
|
[DisplayName("Клиент")]
|
||||||
public string UserEmail { get; set; } = string.Empty;
|
public string UserEmail { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int UserID { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
public Dictionary<int, (IComponentModel, int)>? BuildComponents { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,6 @@ namespace HardwareShopContracts.ViewModels
|
|||||||
[DisplayName("Название сборки")]
|
[DisplayName("Название сборки")]
|
||||||
public string BuildName { get; set; } = string.Empty;
|
public string BuildName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int BuildID { get; set; }
|
public int BuildId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ namespace HardwareShopContracts.ViewModels
|
|||||||
[DisplayName("Дата оплаты")]
|
[DisplayName("Дата оплаты")]
|
||||||
public DateTime? DatePurchase { get; set; }
|
public DateTime? DatePurchase { get; set; }
|
||||||
|
|
||||||
public int UserID { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
[DisplayName("Email клиента")]
|
[DisplayName("Email клиента")]
|
||||||
public string UserEmail { get; set; } = string.Empty;
|
public string UserEmail { get; set; } = string.Empty;
|
||||||
|
@ -13,7 +13,7 @@ namespace HardwareShopDataModels.Models
|
|||||||
|
|
||||||
string BuildName { get; }
|
string BuildName { get; }
|
||||||
|
|
||||||
int UserID { get; }
|
int UserId { get; }
|
||||||
|
|
||||||
Dictionary<int, (IComponentModel, int)>? BuildComponents { get; }
|
Dictionary<int, (IComponentModel, int)>? BuildComponents { get; }
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ namespace HardwareShopDataModels.Models
|
|||||||
{
|
{
|
||||||
string Text { get; }
|
string Text { get; }
|
||||||
|
|
||||||
int BuildID { get; }
|
int BuildId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace HardwareShopDataModels.Models
|
|||||||
//через "?" обозначается что поле может быть null
|
//через "?" обозначается что поле может быть null
|
||||||
DateTime? DatePurchase { get; }
|
DateTime? DatePurchase { get; }
|
||||||
|
|
||||||
int UserID { get; }
|
int UserId { get; }
|
||||||
|
|
||||||
Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; }
|
Dictionary<int, (IBuildModel, int)>? PurchaseBuilds { get; }
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ namespace HardwareShopDatabaseImplement
|
|||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
modelBuilder.Entity<BuildComponent>().HasKey(x => new { x.ComponentId, x.BuildID });
|
modelBuilder.Entity<BuildComponent>().HasKey(x => new { x.ComponentId, x.BuildId });
|
||||||
modelBuilder.Entity<PurchaseBuild>().HasKey(x => new { x.PurchaseID, x.BuildID });
|
modelBuilder.Entity<PurchaseBuild>().HasKey(x => new { x.PurchaseId, x.BuildId });
|
||||||
modelBuilder.Entity<PurchaseGood>().HasKey(x => new { x.PurchaseID, x.GoodID });
|
modelBuilder.Entity<PurchaseGood>().HasKey(x => new { x.PurchaseId, x.GoodId });
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual DbSet<Build> Builds { set; get; }
|
public virtual DbSet<Build> Builds { set; get; }
|
||||||
|
@ -40,7 +40,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<decimal>("Price")
|
b.Property<decimal>("Price")
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
b.Property<int>("UserID")
|
b.Property<int>("UserId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -53,7 +53,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("ComponentId")
|
b.Property<int>("ComponentId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildId")
|
b.Property<int>("BuildId")
|
||||||
@ -62,7 +62,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("Count")
|
b.Property<int>("Count")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("ComponentId", "BuildID");
|
b.HasKey("ComponentId", "BuildId");
|
||||||
|
|
||||||
b.HasIndex("BuildId");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("BuildName")
|
b.Property<string>("BuildName")
|
||||||
@ -90,7 +90,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("BuildID");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
b.ToTable("Comments");
|
b.ToTable("Comments");
|
||||||
});
|
});
|
||||||
@ -151,22 +151,22 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<decimal>("Sum")
|
b.Property<decimal>("Sum")
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
b.Property<int>("UserID")
|
b.Property<int>("UserId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("UserID");
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
b.ToTable("Purchase");
|
b.ToTable("Purchase");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseBuild", b =>
|
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseBuild", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("PurchaseID")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildId")
|
b.Property<int>("BuildId")
|
||||||
@ -178,7 +178,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("PurchaseId")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("PurchaseID", "BuildID");
|
b.HasKey("PurchaseId", "BuildId");
|
||||||
|
|
||||||
b.HasIndex("BuildId");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
@ -189,10 +189,10 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseGood", b =>
|
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseGood", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("PurchaseID")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("GoodID")
|
b.Property<int>("GoodId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("Count")
|
b.Property<int>("Count")
|
||||||
@ -201,9 +201,9 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("PurchaseId")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("PurchaseID", "GoodID");
|
b.HasKey("PurchaseId", "GoodId");
|
||||||
|
|
||||||
b.HasIndex("GoodID");
|
b.HasIndex("GoodId");
|
||||||
|
|
||||||
b.HasIndex("PurchaseId");
|
b.HasIndex("PurchaseId");
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.Build", "Build")
|
b.HasOne("HardwareShopDatabaseImplement.Models.Build", "Build")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("BuildID")
|
.HasForeignKey("BuildId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
|
b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserID")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.Good", "Good")
|
b.HasOne("HardwareShopDatabaseImplement.Models.Good", "Good")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("GoodID")
|
.HasForeignKey("GoodId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||||
BuildName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
BuildName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
UserID = table.Column<int>(type: "int", nullable: false)
|
UserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -86,14 +86,14 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
Text = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Text = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
BuildName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
BuildName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
BuildID = table.Column<int>(type: "int", nullable: false)
|
BuildId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Comments", x => x.Id);
|
table.PrimaryKey("PK_Comments", x => x.Id);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_Comments_Builds_BuildID",
|
name: "FK_Comments_Builds_BuildId",
|
||||||
column: x => x.BuildID,
|
column: x => x.BuildId,
|
||||||
principalTable: "Builds",
|
principalTable: "Builds",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
@ -103,14 +103,14 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
name: "BuildComponent",
|
name: "BuildComponent",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
BuildID = table.Column<int>(type: "int", nullable: false),
|
BuildId = table.Column<int>(type: "int", nullable: false),
|
||||||
ComponentId = table.Column<int>(type: "int", nullable: false),
|
ComponentId = table.Column<int>(type: "int", nullable: false),
|
||||||
Count = table.Column<int>(type: "int", nullable: false),
|
Count = table.Column<int>(type: "int", nullable: false),
|
||||||
BuildId = table.Column<int>(type: "int", nullable: false)
|
BuildId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_BuildComponent", x => new { x.ComponentId, x.BuildID });
|
table.PrimaryKey("PK_BuildComponent", x => new { x.ComponentId, x.BuildId });
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_BuildComponent_Builds_BuildId",
|
name: "FK_BuildComponent_Builds_BuildId",
|
||||||
column: x => x.BuildId,
|
column: x => x.BuildId,
|
||||||
@ -134,14 +134,14 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
Sum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
Sum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||||
PurchaseStatus = table.Column<int>(type: "int", nullable: false),
|
PurchaseStatus = table.Column<int>(type: "int", nullable: false),
|
||||||
DatePurchase = table.Column<DateTime>(type: "datetime2", nullable: true),
|
DatePurchase = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
UserID = table.Column<int>(type: "int", nullable: false)
|
UserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Purchase", x => x.Id);
|
table.PrimaryKey("PK_Purchase", x => x.Id);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_Purchase_Users_UserID",
|
name: "FK_Purchase_Users_UserId",
|
||||||
column: x => x.UserID,
|
column: x => x.UserId,
|
||||||
principalTable: "Users",
|
principalTable: "Users",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
@ -151,15 +151,15 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
name: "PurchasesBuilds",
|
name: "PurchasesBuilds",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
BuildID = table.Column<int>(type: "int", nullable: false),
|
BuildId = table.Column<int>(type: "int", nullable: false),
|
||||||
PurchaseID = table.Column<int>(type: "int", nullable: false),
|
PurchaseId = table.Column<int>(type: "int", nullable: false),
|
||||||
Count = table.Column<int>(type: "int", nullable: false),
|
Count = table.Column<int>(type: "int", nullable: false),
|
||||||
BuildId = table.Column<int>(type: "int", nullable: false),
|
BuildId = table.Column<int>(type: "int", nullable: false),
|
||||||
PurchaseId = table.Column<int>(type: "int", nullable: false)
|
PurchaseId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_PurchasesBuilds", x => new { x.PurchaseID, x.BuildID });
|
table.PrimaryKey("PK_PurchasesBuilds", x => new { x.PurchaseId, x.BuildId });
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_PurchasesBuilds_Builds_BuildId",
|
name: "FK_PurchasesBuilds_Builds_BuildId",
|
||||||
column: x => x.BuildId,
|
column: x => x.BuildId,
|
||||||
@ -178,17 +178,17 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
name: "PurchasesGoods",
|
name: "PurchasesGoods",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
PurchaseID = table.Column<int>(type: "int", nullable: false),
|
PurchaseId = table.Column<int>(type: "int", nullable: false),
|
||||||
GoodID = table.Column<int>(type: "int", nullable: false),
|
GoodId = table.Column<int>(type: "int", nullable: false),
|
||||||
Count = table.Column<int>(type: "int", nullable: false),
|
Count = table.Column<int>(type: "int", nullable: false),
|
||||||
PurchaseId = table.Column<int>(type: "int", nullable: false)
|
PurchaseId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_PurchasesGoods", x => new { x.PurchaseID, x.GoodID });
|
table.PrimaryKey("PK_PurchasesGoods", x => new { x.PurchaseId, x.GoodId });
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_PurchasesGoods_Goods_GoodID",
|
name: "FK_PurchasesGoods_Goods_GoodId",
|
||||||
column: x => x.GoodID,
|
column: x => x.GoodId,
|
||||||
principalTable: "Goods",
|
principalTable: "Goods",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
@ -206,14 +206,14 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
column: "BuildId");
|
column: "BuildId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Comments_BuildID",
|
name: "IX_Comments_BuildId",
|
||||||
table: "Comments",
|
table: "Comments",
|
||||||
column: "BuildID");
|
column: "BuildId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Purchase_UserID",
|
name: "IX_Purchase_UserId",
|
||||||
table: "Purchase",
|
table: "Purchase",
|
||||||
column: "UserID");
|
column: "UserId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_PurchasesBuilds_BuildId",
|
name: "IX_PurchasesBuilds_BuildId",
|
||||||
@ -226,9 +226,9 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
column: "PurchaseId");
|
column: "PurchaseId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_PurchasesGoods_GoodID",
|
name: "IX_PurchasesGoods_GoodId",
|
||||||
table: "PurchasesGoods",
|
table: "PurchasesGoods",
|
||||||
column: "GoodID");
|
column: "GoodId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_PurchasesGoods_PurchaseId",
|
name: "IX_PurchasesGoods_PurchaseId",
|
||||||
|
@ -37,7 +37,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<decimal>("Price")
|
b.Property<decimal>("Price")
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
b.Property<int>("UserID")
|
b.Property<int>("UserId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
@ -50,7 +50,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("ComponentId")
|
b.Property<int>("ComponentId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildId")
|
b.Property<int>("BuildId")
|
||||||
@ -59,7 +59,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("Count")
|
b.Property<int>("Count")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("ComponentId", "BuildID");
|
b.HasKey("ComponentId", "BuildId");
|
||||||
|
|
||||||
b.HasIndex("BuildId");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("BuildName")
|
b.Property<string>("BuildName")
|
||||||
@ -87,7 +87,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("BuildID");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
b.ToTable("Comments");
|
b.ToTable("Comments");
|
||||||
});
|
});
|
||||||
@ -148,22 +148,22 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<decimal>("Sum")
|
b.Property<decimal>("Sum")
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
b.Property<int>("UserID")
|
b.Property<int>("UserId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("UserID");
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
b.ToTable("Purchase");
|
b.ToTable("Purchase");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseBuild", b =>
|
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseBuild", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("PurchaseID")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildID")
|
b.Property<int>("BuildId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("BuildId")
|
b.Property<int>("BuildId")
|
||||||
@ -175,7 +175,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("PurchaseId")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("PurchaseID", "BuildID");
|
b.HasKey("PurchaseId", "BuildId");
|
||||||
|
|
||||||
b.HasIndex("BuildId");
|
b.HasIndex("BuildId");
|
||||||
|
|
||||||
@ -186,10 +186,10 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseGood", b =>
|
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.PurchaseGood", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("PurchaseID")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("GoodID")
|
b.Property<int>("GoodId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("Count")
|
b.Property<int>("Count")
|
||||||
@ -198,9 +198,9 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
b.Property<int>("PurchaseId")
|
b.Property<int>("PurchaseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("PurchaseID", "GoodID");
|
b.HasKey("PurchaseId", "GoodId");
|
||||||
|
|
||||||
b.HasIndex("GoodID");
|
b.HasIndex("GoodId");
|
||||||
|
|
||||||
b.HasIndex("PurchaseId");
|
b.HasIndex("PurchaseId");
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.Build", "Build")
|
b.HasOne("HardwareShopDatabaseImplement.Models.Build", "Build")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("BuildID")
|
.HasForeignKey("BuildId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
|
b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserID")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ namespace HardwareShopDatabaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.HasOne("HardwareShopDatabaseImplement.Models.Good", "Good")
|
b.HasOne("HardwareShopDatabaseImplement.Models.Good", "Good")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("GoodID")
|
.HasForeignKey("GoodId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace HardwareShopDatabaseImplement.Models.ModelsManyToMany
|
|||||||
public class BuildComponent
|
public class BuildComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
public int BuildID { get; set; }
|
public int BuildId { get; set; }
|
||||||
|
|
||||||
public int ComponentId { get; set; }
|
public int ComponentId { get; set; }
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ namespace HardwareShopDatabaseImplement.Models.ModelsManyToMany
|
|||||||
public class PurchaseBuild
|
public class PurchaseBuild
|
||||||
{
|
{
|
||||||
|
|
||||||
public int BuildID { get; set; }
|
public int BuildId { get; set; }
|
||||||
|
|
||||||
public int PurchaseID { get; set; }
|
public int PurchaseId { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
|
@ -12,9 +12,9 @@ namespace HardwareShopDatabaseImplement.Models.ModelsManyToMany
|
|||||||
public class PurchaseGood
|
public class PurchaseGood
|
||||||
{
|
{
|
||||||
|
|
||||||
public int PurchaseID { get; set; }
|
public int PurchaseId { get; set; }
|
||||||
|
|
||||||
public int GoodID { get; set; }
|
public int GoodId { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
|
Loading…
Reference in New Issue
Block a user