//
using System;
using Distribution.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Distribution.Migrations
{
[DbContext(typeof(AppDBContext))]
partial class AppDBContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("Distribution.Models.Brand", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("ExternalErpId")
.HasColumnType("int");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Brands");
});
modelBuilder.Entity("Distribution.Models.Category", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("AllowCustomerReturn")
.HasColumnType("tinyint(1)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("ExternalErpId")
.HasColumnType("int");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("Distribution.Models.DeliveryRun", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("ActivatedAt")
.HasColumnType("datetime(6)");
b.Property("ClosedAt")
.HasColumnType("datetime(6)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FK_DriverProfileId")
.HasColumnType("char(36)");
b.Property("FK_RouteId")
.HasColumnType("char(36)");
b.Property("FK_SourceWarehouseId")
.HasColumnType("char(36)");
b.Property("FK_VehicleId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Meterend")
.HasColumnType("int");
b.Property("Meterstart")
.HasColumnType("int");
b.Property("RideType")
.HasColumnType("int");
b.Property("StartedAt")
.HasColumnType("datetime(6)");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_DriverProfileId");
b.HasIndex("FK_RouteId");
b.HasIndex("FK_SourceWarehouseId");
b.HasIndex("FK_VehicleId");
b.ToTable("DeliveryRuns");
});
modelBuilder.Entity("Distribution.Models.DriverComplianceConfig", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("EnforceLicenseExpiry")
.HasColumnType("tinyint(1)");
b.Property("EnforceMedicalClearance")
.HasColumnType("tinyint(1)");
b.Property("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property("UpdatedBy")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("DriverComplianceConfigs");
});
modelBuilder.Entity("Distribution.Models.DriverProfile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FK_UserId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("LicenseExpiry")
.HasColumnType("datetime(6)");
b.Property("LicenseNumber")
.IsRequired()
.HasColumnType("longtext");
b.Property("MedicalClearanceExpiry")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("FK_UserId")
.IsUnique();
b.ToTable("DriverProfiles");
});
modelBuilder.Entity("Distribution.Models.Item", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CostPrice")
.HasColumnType("decimal(65,30)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Description")
.HasColumnType("longtext");
b.Property("ExternalErpItemId")
.HasColumnType("int");
b.Property("FK_BaseUomId")
.HasColumnType("char(36)");
b.Property("FK_BrandId")
.HasColumnType("char(36)");
b.Property("FK_CategoryId")
.HasColumnType("char(36)");
b.Property("FK_SubCategoryId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("LastSyncedAt")
.HasColumnType("datetime(6)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property("SalePrice")
.HasColumnType("decimal(65,30)");
b.Property("Sku")
.IsRequired()
.HasColumnType("longtext");
b.Property("SyncSource")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_BaseUomId");
b.HasIndex("FK_BrandId");
b.HasIndex("FK_CategoryId");
b.HasIndex("FK_SubCategoryId");
b.ToTable("Items");
});
modelBuilder.Entity("Distribution.Models.LoadingSheet", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("DispatchConfirmedAt")
.HasColumnType("datetime(6)");
b.Property("DispatchConfirmedBy")
.HasColumnType("char(36)");
b.Property("FK_RideId")
.HasColumnType("char(36)");
b.Property("FK_SourceWarehouseId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("ReceiptConfirmedAt")
.HasColumnType("datetime(6)");
b.Property("ReceiptConfirmedBy")
.HasColumnType("char(36)");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_RideId");
b.HasIndex("FK_SourceWarehouseId");
b.ToTable("LoadingSheets");
});
modelBuilder.Entity("Distribution.Models.LoadingSheetItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("FK_LoadingSheetId")
.HasColumnType("char(36)");
b.Property("QuantityDispatched")
.HasColumnType("decimal(65,30)");
b.Property("QuantityReceived")
.HasColumnType("decimal(65,30)");
b.Property("QuantityResolved")
.HasColumnType("decimal(65,30)");
b.HasKey("Id");
b.HasIndex("FK_ItemId");
b.HasIndex("FK_LoadingSheetId");
b.ToTable("LoadingSheetItems");
});
modelBuilder.Entity("Distribution.Models.Order", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FK_StoreId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("OrderDate")
.HasColumnType("datetime(6)");
b.Property("TotalAmount")
.HasColumnType("decimal(65,30)");
b.HasKey("Id");
b.HasIndex("FK_StoreId");
b.ToTable("Orders");
});
modelBuilder.Entity("Distribution.Models.OrderItem", b =>
{
b.Property("FK_OrderId")
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Id")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Quantity")
.HasColumnType("int");
b.Property("UnitPrice")
.HasColumnType("decimal(65,30)");
b.HasKey("FK_OrderId", "FK_ItemId");
b.HasIndex("FK_ItemId");
b.ToTable("OrderItems");
});
modelBuilder.Entity("Distribution.Models.Permission", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Code")
.IsRequired()
.HasColumnType("longtext");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("Id");
b.ToTable("Permissions");
});
modelBuilder.Entity("Distribution.Models.PriceList", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("EffectiveFrom")
.HasColumnType("datetime(6)");
b.Property("EffectiveTo")
.HasColumnType("datetime(6)");
b.Property("FK_RegionId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("FK_RegionId");
b.ToTable("PriceLists");
});
modelBuilder.Entity("Distribution.Models.PriceListItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("FK_PriceListId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("MinPrice")
.HasColumnType("decimal(65,30)");
b.Property("Price")
.HasColumnType("decimal(65,30)");
b.HasKey("Id");
b.HasIndex("FK_ItemId");
b.HasIndex("FK_PriceListId", "FK_ItemId")
.IsUnique();
b.ToTable("PriceListItems");
});
modelBuilder.Entity("Distribution.Models.Region", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Regions");
});
modelBuilder.Entity("Distribution.Models.RideCancelRequest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("ApprovedAt")
.HasColumnType("datetime(6)");
b.Property("ApprovedBy")
.HasColumnType("char(36)");
b.Property("FK_RideId")
.HasColumnType("char(36)");
b.Property("Reason")
.IsRequired()
.HasColumnType("longtext");
b.Property("RequestedAt")
.HasColumnType("datetime(6)");
b.Property("RequestedBy")
.HasColumnType("char(36)");
b.Property("Status")
.HasColumnType("int");
b.Property("TypeCode")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_RideId");
b.ToTable("RideCancelRequests");
});
modelBuilder.Entity("Distribution.Models.Role", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Level")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Roles");
b.HasData(
new
{
Id = new Guid("10000000-0000-0000-0000-000000000001"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 10,
Name = "SalesRep"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000002"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 20,
Name = "Supervisor"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000003"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 30,
Name = "AreaManager"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000004"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 40,
Name = "AreaSupervisor"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000005"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 50,
Name = "RegionalManager"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000006"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
IsActive = true,
Level = 60,
Name = "RegionalAgency"
});
});
modelBuilder.Entity("Distribution.Models.RolePermission", b =>
{
b.Property("FK_RoleId")
.HasColumnType("char(36)");
b.Property("FK_PermissionId")
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Id")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("FK_RoleId", "FK_PermissionId");
b.HasIndex("FK_PermissionId");
b.ToTable("RolePermissions");
});
modelBuilder.Entity("Distribution.Models.Route", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("EndPoint")
.IsRequired()
.HasColumnType("longtext");
b.Property("FK_RegionId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Length")
.HasColumnType("decimal(65,30)");
b.Property("RouteName")
.IsRequired()
.HasColumnType("longtext");
b.Property("StartPoint")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("FK_RegionId");
b.ToTable("Routes");
});
modelBuilder.Entity("Distribution.Models.SaleRoute", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("Id");
b.ToTable("SaleRoutes");
});
modelBuilder.Entity("Distribution.Models.Scheme", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("AgentLimitExempt")
.HasColumnType("tinyint(1)");
b.Property("BaselineExpectedSales")
.HasColumnType("decimal(65,30)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("DateRangeFrom")
.HasColumnType("datetime(6)");
b.Property("DateRangeTo")
.HasColumnType("datetime(6)");
b.Property("EligibleSegment")
.HasColumnType("longtext");
b.Property("FK_FreeItemId")
.HasColumnType("char(36)");
b.Property("FK_RegionId")
.HasColumnType("char(36)");
b.Property("FK_TriggerItemId")
.HasColumnType("char(36)");
b.Property("FreeQty")
.HasColumnType("decimal(65,30)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property("RegionId")
.HasColumnType("char(36)");
b.Property("RuleConfig")
.HasColumnType("longtext");
b.Property("RuleType")
.HasColumnType("int");
b.Property("TriggerQty")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_FreeItemId");
b.HasIndex("FK_TriggerItemId");
b.HasIndex("RegionId");
b.ToTable("Schemes");
});
modelBuilder.Entity("Distribution.Models.SchemeBundleComponent", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("FK_SchemeId")
.HasColumnType("char(36)");
b.Property("Qty")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_ItemId");
b.HasIndex("FK_SchemeId", "FK_ItemId")
.IsUnique();
b.ToTable("SchemeBundleComponents");
});
modelBuilder.Entity("Distribution.Models.SchemeRedemption", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("DiscountAmount")
.HasColumnType("decimal(65,30)");
b.Property("FK_FreeItemId")
.HasColumnType("char(36)");
b.Property("FK_OrderId")
.HasColumnType("char(36)");
b.Property("FK_SchemeId")
.HasColumnType("char(36)");
b.Property("FieldInvoiceId")
.HasColumnType("char(36)");
b.Property("FreeItemCostValue")
.HasColumnType("decimal(65,30)");
b.Property("FreeQty")
.HasColumnType("decimal(65,30)");
b.Property("RedeemedAt")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("FK_FreeItemId");
b.HasIndex("FK_OrderId");
b.HasIndex("FK_SchemeId");
b.ToTable("SchemeRedemptions");
});
modelBuilder.Entity("Distribution.Models.StockBalance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("LocationId")
.HasColumnType("char(36)");
b.Property("LocationType")
.HasColumnType("int");
b.Property("Quantity")
.HasColumnType("decimal(65,30)");
b.Property("UpdatedAt")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("FK_ItemId", "LocationId")
.IsUnique();
b.ToTable("StockBalances");
});
modelBuilder.Entity("Distribution.Models.StockMovement", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("CreatedBy")
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("FromLocationId")
.HasColumnType("char(36)");
b.Property("FromLocationType")
.HasColumnType("int");
b.Property("Quantity")
.HasColumnType("decimal(65,30)");
b.Property("ReasonCode")
.HasColumnType("longtext");
b.Property("ReferenceId")
.HasColumnType("char(36)");
b.Property("ToLocationId")
.HasColumnType("char(36)");
b.Property("ToLocationType")
.HasColumnType("int");
b.Property("Type")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("FK_ItemId");
b.ToTable("StockMovements");
});
modelBuilder.Entity("Distribution.Models.Store", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("CreditAmount")
.HasColumnType("decimal(65,30)");
b.Property("CreditLimit")
.HasColumnType("decimal(65,30)");
b.Property("FK_RouteId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("KycStatus")
.HasColumnType("int");
b.Property("Latitude")
.HasColumnType("decimal(65,30)");
b.Property("Longitude")
.HasColumnType("decimal(65,30)");
b.Property("OneTimeAmount")
.HasColumnType("decimal(65,30)");
b.Property("OutstandingBalance")
.HasColumnType("decimal(65,30)");
b.Property("OwnerName")
.IsRequired()
.HasColumnType("longtext");
b.Property("Segment")
.HasColumnType("longtext");
b.Property("StoreAddress")
.IsRequired()
.HasColumnType("longtext");
b.Property("StoreName")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("FK_RouteId");
b.ToTable("Stores");
});
modelBuilder.Entity("Distribution.Models.StoreKycDocument", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("DocumentType")
.IsRequired()
.HasColumnType("longtext");
b.Property("FK_StoreId")
.HasColumnType("char(36)");
b.Property("FileReference")
.IsRequired()
.HasColumnType("longtext");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("UploadedAt")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("FK_StoreId");
b.ToTable("StoreKycDocuments");
});
modelBuilder.Entity("Distribution.Models.SubCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("ExternalErpId")
.HasColumnType("int");
b.Property("FK_CategoryId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("FK_CategoryId");
b.ToTable("SubCategories");
});
modelBuilder.Entity("Distribution.Models.Supplier", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("ContactInfo")
.HasColumnType("longtext");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property("PerformanceScore")
.HasColumnType("decimal(65,30)");
b.HasKey("Id");
b.ToTable("Suppliers");
});
modelBuilder.Entity("Distribution.Models.Uom", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("ExternalErpId")
.HasColumnType("int");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.ToTable("Uoms");
});
modelBuilder.Entity("Distribution.Models.UomConversion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("FK_FromUomId")
.HasColumnType("char(36)");
b.Property("FK_ItemId")
.HasColumnType("char(36)");
b.Property("FK_ToUomId")
.HasColumnType("char(36)");
b.Property("Factor")
.HasColumnType("decimal(65,30)");
b.HasKey("Id");
b.HasIndex("FK_FromUomId");
b.HasIndex("FK_ItemId");
b.HasIndex("FK_ToUomId");
b.ToTable("UomConversions");
});
modelBuilder.Entity("Distribution.Models.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("FK_ReportsToUserId")
.HasColumnType("char(36)");
b.Property("FK_RoleId")
.HasColumnType("char(36)");
b.Property("FullName")
.IsRequired()
.HasColumnType("longtext");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("longtext");
b.Property("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property("Username")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("FK_ReportsToUserId");
b.HasIndex("FK_RoleId");
b.ToTable("Users");
});
modelBuilder.Entity("Distribution.Models.UserRegionScope", b =>
{
b.Property("FK_UserId")
.HasColumnType("char(36)");
b.Property("FK_RegionId")
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Id")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("FK_UserId", "FK_RegionId");
b.HasIndex("FK_RegionId");
b.ToTable("UserRegionScopes");
});
modelBuilder.Entity("Distribution.Models.UserRouteScope", b =>
{
b.Property("FK_UserId")
.HasColumnType("char(36)");
b.Property("FK_RouteId")
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Id")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("FK_UserId", "FK_RouteId");
b.HasIndex("FK_RouteId");
b.ToTable("UserRouteScopes");
});
modelBuilder.Entity("Distribution.Models.UserStoreScope", b =>
{
b.Property("FK_UserId")
.HasColumnType("char(36)");
b.Property("FK_StoreId")
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("Id")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("FK_UserId", "FK_StoreId");
b.HasIndex("FK_StoreId");
b.ToTable("UserStoreScopes");
});
modelBuilder.Entity("Distribution.Models.Vehicle", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("CreatedAt")
.HasColumnType("datetime(6)");
b.Property("DefaultWarehouseId")
.HasColumnType("char(36)");
b.Property("IsActive")
.HasColumnType("tinyint(1)");
b.Property