docker sql, migrations

This commit is contained in:
2026-01-11 23:18:45 -08:00
parent a57e60beb8
commit 27d401aa63
5 changed files with 613 additions and 1 deletions

View File

@@ -0,0 +1,256 @@
// <auto-generated />
using System;
using Catalog26.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Catalog26.Migrations
{
[DbContext(typeof(Catalog26Context))]
[Migration("20260112070934_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("PricingCatalog.Models.TDSPriceAvailability", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ABCCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("COOListCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("ContractPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<DateTime?>("ETADate")
.HasColumnType("datetime2");
b.Property<decimal?>("EduPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("FederalGovPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("GSANTEPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("GSAPricing")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("GovClass")
.HasColumnType("nvarchar(max)");
b.Property<string>("Height")
.HasColumnType("nvarchar(max)");
b.Property<string>("KitStandAloneFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("Length")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription1")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription2")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription3")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("MAPPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("MSRP")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("MediaTypeCode")
.HasColumnType("nvarchar(max)");
b.Property<int?>("MfgDropShipWHouseQty")
.HasColumnType("int");
b.Property<string>("MfgName")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<string>("MfgPartNo")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.Property<int?>("MinimumQtyOrder")
.HasColumnType("int");
b.Property<string>("ParcelShippableFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartDescription")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)");
b.Property<string>("PartnerCode")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PlatformType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ProductDescription")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("ProductStreetDate")
.HasColumnType("datetime2");
b.Property<string>("PromoComment")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("PromoExpDate")
.HasColumnType("datetime2");
b.Property<string>("PromoFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("PurchasingRequirements")
.HasColumnType("nvarchar(max)");
b.Property<string>("RecordId")
.HasColumnType("nvarchar(max)");
b.Property<string>("ReplacementSKU")
.HasColumnType("nvarchar(max)");
b.Property<string>("ReturnableFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("SKUAttribute")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("SKUCreatedDate")
.HasColumnType("datetime2");
b.Property<string>("SerializedFlag")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("ShipWeight")
.HasPrecision(7, 2)
.HasColumnType("decimal(7, 2)");
b.Property<decimal?>("StateGovPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("StatusCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("TAAFlag")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("TDS_HCPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<int?>("TotalQtyOnHand")
.HasColumnType("int");
b.Property<string>("UNSPSCCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("UPCCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("UnitCost")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("VendorCategoryCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("VendorPartNo")
.IsRequired()
.HasMaxLength(80)
.HasColumnType("nvarchar(80)");
b.Property<string>("VendorSKUNo")
.HasColumnType("nvarchar(max)");
b.Property<int?>("WQtyOnHand_16DFL")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_31DCG")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_3DFR_26DHA")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_502DGA")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_504DIN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_505DFW")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_506DFO")
.HasColumnType("int");
b.Property<int>("WQtyOnHand_50DCO")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_6DCH_29DGU")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_7DTN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_80DMS")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_81DRN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_Future1")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_Future2")
.HasColumnType("int");
b.Property<string>("Width")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("TDSPriceAvailability", (string)null);
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,99 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Catalog26.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TDSPriceAvailability",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PartnerCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
RecordId = table.Column<string>(type: "nvarchar(max)", nullable: true),
MfgPartNo = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false),
VendorPartNo = table.Column<string>(type: "nvarchar(80)", maxLength: 80, nullable: false),
VendorSKUNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
StatusCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
PartDescription = table.Column<string>(type: "nvarchar(80)", maxLength: 80, nullable: true),
MfgName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
TotalQtyOnHand = table.Column<int>(type: "int", nullable: true),
ContractPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
MSRP = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
WQtyOnHand_16DFL = table.Column<int>(type: "int", nullable: true),
WQtyOnHand_3DFR_26DHA = table.Column<int>(type: "int", nullable: true),
ReturnableFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_Future1 = table.Column<int>(type: "int", nullable: true),
ParcelShippableFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_31DCG = table.Column<int>(type: "int", nullable: true),
UnitCost = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
WQtyOnHand_6DCH_29DGU = table.Column<int>(type: "int", nullable: true),
MediaTypeCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_7DTN = table.Column<int>(type: "int", nullable: true),
VendorCategoryCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_Future2 = table.Column<int>(type: "int", nullable: true),
ShipWeight = table.Column<decimal>(type: "decimal(7,2)", precision: 7, scale: 2, nullable: true),
SerializedFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_50DCO = table.Column<int>(type: "int", nullable: false),
MAPPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
COOListCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
TDS_HCPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
UPCCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
UNSPSCCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
SKUCreatedDate = table.Column<DateTime>(type: "datetime2", nullable: true),
SKUAttribute = table.Column<string>(type: "nvarchar(max)", nullable: true),
ETADate = table.Column<DateTime>(type: "datetime2", nullable: true),
ABCCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
KitStandAloneFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
StateGovPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
FederalGovPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
EduPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
TAAFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
GSAPricing = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
PromoFlag = table.Column<string>(type: "nvarchar(max)", nullable: true),
PromoComment = table.Column<string>(type: "nvarchar(max)", nullable: true),
PromoExpDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LongDescription1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
LongDescription2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
LongDescription3 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Length = table.Column<string>(type: "nvarchar(max)", nullable: true),
Width = table.Column<string>(type: "nvarchar(max)", nullable: true),
Height = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_502DGA = table.Column<int>(type: "int", nullable: true),
GSANTEPrice = table.Column<decimal>(type: "decimal(12,2)", precision: 12, scale: 2, nullable: true),
PlatformType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ProductDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
ProductStreetDate = table.Column<DateTime>(type: "datetime2", nullable: true),
WQtyOnHand_80DMS = table.Column<int>(type: "int", nullable: true),
WQtyOnHand_81DRN = table.Column<int>(type: "int", nullable: true),
WQtyOnHand_504DIN = table.Column<int>(type: "int", nullable: true),
WQtyOnHand_505DFW = table.Column<int>(type: "int", nullable: true),
ReplacementSKU = table.Column<string>(type: "nvarchar(max)", nullable: true),
MinimumQtyOrder = table.Column<int>(type: "int", nullable: true),
PurchasingRequirements = table.Column<string>(type: "nvarchar(max)", nullable: true),
GovClass = table.Column<string>(type: "nvarchar(max)", nullable: true),
WQtyOnHand_506DFO = table.Column<int>(type: "int", nullable: true),
MfgDropShipWHouseQty = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TDSPriceAvailability", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TDSPriceAvailability");
}
}
}

View File

@@ -0,0 +1,253 @@
// <auto-generated />
using System;
using Catalog26.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Catalog26.Migrations
{
[DbContext(typeof(Catalog26Context))]
partial class Catalog26ContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("PricingCatalog.Models.TDSPriceAvailability", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ABCCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("COOListCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("ContractPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<DateTime?>("ETADate")
.HasColumnType("datetime2");
b.Property<decimal?>("EduPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("FederalGovPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("GSANTEPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("GSAPricing")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("GovClass")
.HasColumnType("nvarchar(max)");
b.Property<string>("Height")
.HasColumnType("nvarchar(max)");
b.Property<string>("KitStandAloneFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("Length")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription1")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription2")
.HasColumnType("nvarchar(max)");
b.Property<string>("LongDescription3")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("MAPPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<decimal?>("MSRP")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("MediaTypeCode")
.HasColumnType("nvarchar(max)");
b.Property<int?>("MfgDropShipWHouseQty")
.HasColumnType("int");
b.Property<string>("MfgName")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property<string>("MfgPartNo")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.Property<int?>("MinimumQtyOrder")
.HasColumnType("int");
b.Property<string>("ParcelShippableFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartDescription")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)");
b.Property<string>("PartnerCode")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PlatformType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ProductDescription")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("ProductStreetDate")
.HasColumnType("datetime2");
b.Property<string>("PromoComment")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("PromoExpDate")
.HasColumnType("datetime2");
b.Property<string>("PromoFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("PurchasingRequirements")
.HasColumnType("nvarchar(max)");
b.Property<string>("RecordId")
.HasColumnType("nvarchar(max)");
b.Property<string>("ReplacementSKU")
.HasColumnType("nvarchar(max)");
b.Property<string>("ReturnableFlag")
.HasColumnType("nvarchar(max)");
b.Property<string>("SKUAttribute")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("SKUCreatedDate")
.HasColumnType("datetime2");
b.Property<string>("SerializedFlag")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("ShipWeight")
.HasPrecision(7, 2)
.HasColumnType("decimal(7, 2)");
b.Property<decimal?>("StateGovPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("StatusCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("TAAFlag")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("TDS_HCPrice")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<int?>("TotalQtyOnHand")
.HasColumnType("int");
b.Property<string>("UNSPSCCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("UPCCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal?>("UnitCost")
.HasPrecision(12, 2)
.HasColumnType("decimal(12, 2)");
b.Property<string>("VendorCategoryCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("VendorPartNo")
.IsRequired()
.HasMaxLength(80)
.HasColumnType("nvarchar(80)");
b.Property<string>("VendorSKUNo")
.HasColumnType("nvarchar(max)");
b.Property<int?>("WQtyOnHand_16DFL")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_31DCG")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_3DFR_26DHA")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_502DGA")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_504DIN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_505DFW")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_506DFO")
.HasColumnType("int");
b.Property<int>("WQtyOnHand_50DCO")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_6DCH_29DGU")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_7DTN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_80DMS")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_81DRN")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_Future1")
.HasColumnType("int");
b.Property<int?>("WQtyOnHand_Future2")
.HasColumnType("int");
b.Property<string>("Width")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("TDSPriceAvailability", (string)null);
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -13,14 +13,18 @@ public class TDSPriceAvailability
public required string PartnerCode { get; set; }
public string? RecordId { get; set; }
[Display(Name = "Mfg PartNo")]
[MaxLength(60)]
public required string MfgPartNo { get; set; }
[Display(Name = "Vendor PartNo")]
[MaxLength(80)]
public required string VendorPartNo { get; set; }
public string? VendorSKUNo { get; set; }
public string? StatusCode { get; set; }
[Display(Name = "Product Description")]
[MaxLength(80)]
public string? PartDescription { get; set; }
[Display(Name = "Mfg Name")]
[MaxLength(30)]
public string? MfgName { get; set; }
[Display(Name = "Total Quantity")]
public int? TotalQtyOnHand { get; set; }

View File

@@ -8,6 +8,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Catalog26Context": "Server=localhost;Database=Catalog;User ID=dbuser;Password=dbpass;Integrated Security=false;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True"
"Catalog26Context": "Server=sql1.chopark.home;Database=Catalog;User ID=sa;Password=dbP@ss01;Integrated Security=false;MultipleActiveResultSets=true;TrustServerCertificate=True"
}
}