//
using System;
using Inventory.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Inventory.Core.Migrations
{
[DbContext(typeof(InventoryContext))]
[Migration("20251019025843_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Inventory.Core.Device", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ComputerName")
.HasColumnType("nvarchar(max)");
b.Property("DeviceType")
.HasColumnType("nvarchar(max)");
b.Property("GPUs")
.HasColumnType("nvarchar(max)");
b.Property("HardwareIdentifier")
.HasColumnType("nvarchar(450)");
b.Property("HasOpticalDrive")
.HasColumnType("bit");
b.Property("IPAddress")
.HasColumnType("nvarchar(max)");
b.Property("LastSeen")
.HasColumnType("datetime2");
b.Property("MACAddress")
.HasColumnType("nvarchar(max)");
b.Property("Monitors")
.HasColumnType("nvarchar(max)");
b.Property("MotherboardSerialNumber")
.HasColumnType("nvarchar(max)");
b.Property("OSLicenseKey")
.HasColumnType("nvarchar(max)");
b.Property("OSVersion")
.HasColumnType("nvarchar(max)");
b.Property("PreviousIPAddress")
.HasColumnType("nvarchar(max)");
b.Property("Processor")
.HasColumnType("nvarchar(max)");
b.Property("RAM")
.HasColumnType("nvarchar(max)");
b.Property("SerialNumber")
.HasColumnType("nvarchar(max)");
b.Property("Storage")
.HasColumnType("nvarchar(max)");
b.Property("SystemUUID")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("HardwareIdentifier")
.IsUnique()
.HasFilter("[HardwareIdentifier] IS NOT NULL");
b.ToTable("Devices");
});
#pragma warning restore 612, 618
}
}
}