diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index 197e27aa..81d1e495 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -2625,7 +2625,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "WorkcenterId", Width = 150, ListOrderNo = 6, @@ -2642,7 +2642,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, + SourceDbType = DbType.String, FieldName = "StatusId", Width = 150, ListOrderNo = 7, diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs index 4d8f2e35..731e38db 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Project/Project.cs @@ -16,8 +16,10 @@ public class Project : FullAuditedEntity, IMultiTenant public string? ProjectTypeId { get; set; } //Dahili, Müşteri, Araştırma, Bakım, Geliştirme public Type ProjectType { get; set; } + public string? StatusId { get; set; } //Planlanıyor, Devam Ediyor, Tamamlandı, Beklemede, İptal Edildi public Status Status { get; set; } + public string Priority { get; set; } //Düşük, Orta, Yüksek, Kritik, Acil public Guid? ManagerId { get; set; } public Employee Manager { get; set; } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 3955f821..76e20a97 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -1045,7 +1045,7 @@ public class PlatformDbContext : b.Property(x => x.Type).IsRequired().HasConversion().HasMaxLength(32); b.Property(x => x.Ratio).HasPrecision(18, 6); b.Property(x => x.Rounding).HasPrecision(18, 6); - b.Property(x => x.UomCategoryId).IsRequired(); + b.Property(x => x.UomCategoryId).IsRequired().HasMaxLength(128); b.HasOne(x => x.UomCategory) .WithMany(x => x.Uoms) @@ -1236,6 +1236,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EducationStatus)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).HasMaxLength(50).IsRequired(); b.Property(x => x.Name).HasMaxLength(50).IsRequired(); }); @@ -2441,6 +2442,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PaymentTerm)), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(x => x.Id).IsRequired().HasMaxLength(100); b.Property(x => x.Name).IsRequired().HasMaxLength(100); b.Property(x => x.Description).IsRequired().HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -2512,7 +2514,7 @@ public class PlatformDbContext : b.Property(p => p.SectorId).IsRequired().HasMaxLength(128); b.Property(p => p.TaxNumber).IsRequired(); b.Property(p => p.TaxOffice).HasMaxLength(128); - b.Property(p => p.PaymentTermId).IsRequired(); + b.Property(p => p.PaymentTermId).IsRequired().HasMaxLength(100); b.Property(p => p.Country).IsRequired().HasMaxLength(128); b.Property(p => p.City).IsRequired().HasMaxLength(128); b.Property(p => p.District).HasMaxLength(128); @@ -2817,7 +2819,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Request)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.RequestTypeId).IsRequired(); + b.Property(x => x.RequestTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.DepartmentId).IsRequired(); b.Property(x => x.EmployeeId).IsRequired(); b.Property(x => x.RequestDate).IsRequired(); @@ -2890,7 +2892,7 @@ public class PlatformDbContext : b.Property(x => x.Code).IsRequired().HasMaxLength(100); b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.WorkcenterTypeId).IsRequired(); + b.Property(x => x.WorkcenterTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Manufacturer).HasMaxLength(200); b.Property(x => x.Model).HasMaxLength(100); b.Property(x => x.SerialNumber).HasMaxLength(100); @@ -3000,7 +3002,7 @@ public class PlatformDbContext : b.Property(x => x.Code).IsRequired().HasMaxLength(100); b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); b.Property(x => x.Location).HasMaxLength(250); - b.Property(x => x.FaultTypeId).IsRequired(); + b.Property(x => x.FaultTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).HasMaxLength(50); b.Property(x => x.Severity).HasMaxLength(50); b.Property(x => x.Title).HasMaxLength(200); @@ -3066,8 +3068,8 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WarehouseType)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Id).HasMaxLength(50); + b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3083,7 +3085,7 @@ public class PlatformDbContext : b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.EmployeeId).IsRequired(); - b.Property(x => x.WarehouseTypeId).IsRequired(); + b.Property(x => x.WarehouseTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Country).HasMaxLength(128); b.Property(x => x.City).HasMaxLength(128); @@ -3113,8 +3115,8 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ZoneType)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Id).HasMaxLength(50); + b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3125,12 +3127,12 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Zone)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.WarehouseId).IsRequired(); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(50); b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.ZoneTypeId).IsRequired(); + b.Property(x => x.ZoneTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Temperature).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.Humidity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3163,13 +3165,13 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Location)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.WarehouseId).IsRequired(); - b.Property(x => x.ZoneId).IsRequired(); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(50); + b.Property(x => x.ZoneId).IsRequired().HasMaxLength(50); b.Property(x => x.Code).IsRequired().HasMaxLength(50); b.Property(x => x.Id).HasMaxLength(50); b.Property(x => x.Name).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.LocationTypeId).IsRequired(); + b.Property(x => x.LocationTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Capacity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.CurrentStock).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3203,7 +3205,7 @@ public class PlatformDbContext : b.Property(x => x.Code).IsRequired().HasMaxLength(100); b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.WarehouseId).IsRequired(); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).IsRequired().HasDefaultValue(1); b.Property(x => x.Strategy).IsRequired(); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3455,8 +3457,8 @@ public class PlatformDbContext : b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.ProjectTypeId).IsRequired(); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.ProjectTypeId).IsRequired().HasMaxLength(50); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); b.Property(x => x.Currency).HasMaxLength(10); @@ -3495,7 +3497,7 @@ public class PlatformDbContext : b.Property(x => x.ActualCost).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.Progress).HasDefaultValue(0); b.Property(x => x.Risks).HasMaxLength(500); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.IsActive).HasDefaultValue(true); @@ -3521,7 +3523,7 @@ public class PlatformDbContext : b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.EmployeeId).IsRequired(); @@ -3555,10 +3557,10 @@ public class PlatformDbContext : b.Property(x => x.EmployeeId).IsRequired(); b.Property(x => x.TaskId).IsRequired(); b.Property(x => x.Date).IsRequired(); - b.Property(x => x.WorkedTypeId).IsRequired(); + b.Property(x => x.WorkedTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.HoursWorked).HasDefaultValue(0); b.Property(x => x.Progress).HasDefaultValue(0); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.Description).HasMaxLength(500); b.Property(x => x.Challenges).HasMaxLength(500); @@ -3637,17 +3639,17 @@ public class PlatformDbContext : b.Property(x => x.QuotationNumber).IsRequired().HasMaxLength(50); b.Property(x => x.RequestTitle).IsRequired().HasMaxLength(200); - b.Property(x => x.RequestTypeId).IsRequired(); + b.Property(x => x.RequestTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.SupplierId).IsRequired(); b.Property(x => x.QuotationDate).IsRequired(); b.Property(x => x.ValidUntil).IsRequired(); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.Notes).HasMaxLength(1000); b.Property(x => x.TotalAmount).HasPrecision(18, 2).IsRequired(); b.Property(x => x.Currency).IsRequired().HasMaxLength(10); - b.Property(x => x.PaymentTermId).IsRequired(); - b.Property(x => x.DeliveryTermId).IsRequired(); + b.Property(x => x.PaymentTermId).IsRequired().HasMaxLength(100); + b.Property(x => x.DeliveryTermId).IsRequired().HasMaxLength(50); b.Property(x => x.DeliveryTime).HasDefaultValue(0); b.Property(x => x.SubmittedBy).HasMaxLength(100); b.Property(x => x.SubmittedAt).IsRequired(false); @@ -3714,7 +3716,7 @@ public class PlatformDbContext : b.Property(x => x.WorkorderNumber).HasMaxLength(50); b.Property(x => x.WorkcenterId).IsRequired().HasMaxLength(100); - b.Property(x => x.WorkorderTypeId).IsRequired(); + b.Property(x => x.WorkorderTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); b.Property(x => x.Status).IsRequired().HasMaxLength(50); b.Property(x => x.Subject).HasMaxLength(500); @@ -3803,7 +3805,7 @@ public class PlatformDbContext : b.Property(x => x.OrderNumber).IsRequired().HasMaxLength(50); b.Property(x => x.SupplierId).IsRequired(); b.Property(x => x.OrderDate).IsRequired(); - b.Property(x => x.PaymentTermId).IsRequired(); + b.Property(x => x.PaymentTermId).IsRequired().HasMaxLength(100); b.Property(x => x.Status).IsRequired().HasMaxLength(64); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); @@ -3894,8 +3896,8 @@ public class PlatformDbContext : b.Property(x => x.RequestedDeliveryDate).IsRequired(); b.Property(x => x.Status).IsRequired().HasMaxLength(64); b.Property(x => x.Currency).IsRequired().HasMaxLength(8); - b.Property(x => x.PaymentTermId).IsRequired(); - b.Property(x => x.DeliveryTermId).IsRequired(); + b.Property(x => x.PaymentTermId).IsRequired().HasMaxLength(100); + b.Property(x => x.DeliveryTermId).IsRequired().HasMaxLength(50); b.Property(x => x.Subtotal).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.TaxAmount).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.TotalAmount).HasPrecision(18, 2).HasDefaultValue(0); @@ -3959,9 +3961,9 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.MaterialId).IsRequired(); - b.Property(x => x.WarehouseId).IsRequired(); - b.Property(x => x.ZoneId).IsRequired(); - b.Property(x => x.LocationId).IsRequired(); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(50); + b.Property(x => x.ZoneId).IsRequired().HasMaxLength(50); + b.Property(x => x.LocationId).IsRequired().HasMaxLength(50); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.ReservedQuantity).HasPrecision(18, 2).HasDefaultValue(0); @@ -4019,7 +4021,7 @@ public class PlatformDbContext : b.Property(x => x.MovementNumber).IsRequired().HasMaxLength(50); b.Property(x => x.MovementDate).IsRequired(); b.Property(x => x.MovementType).HasMaxLength(50); - b.Property(x => x.ReferenceTypeId).IsRequired(); + b.Property(x => x.ReferenceTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.ReferenceDocument).HasMaxLength(100); b.Property(x => x.Description).HasMaxLength(1000); @@ -4037,9 +4039,9 @@ public class PlatformDbContext : b.Property(x => x.MovementId).IsRequired(); b.Property(x => x.MaterialId).IsRequired(); - b.Property(x => x.WarehouseId).IsRequired(); - b.Property(x => x.ZoneId).IsRequired(); - b.Property(x => x.LocationId).IsRequired(); + b.Property(x => x.WarehouseId).IsRequired().HasMaxLength(50); + b.Property(x => x.ZoneId).IsRequired().HasMaxLength(50); + b.Property(x => x.LocationId).IsRequired().HasMaxLength(50); b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0); b.Property(x => x.UomId).IsRequired().HasMaxLength(64); b.Property(x => x.LotNumber).HasMaxLength(100); @@ -4104,7 +4106,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.WaybillNumber).IsRequired().HasMaxLength(50); - b.Property(x => x.WaybillTypeId).IsRequired(); + b.Property(x => x.WaybillTypeId).IsRequired().HasMaxLength(50); b.Property(x => x.WaybillDate).IsRequired(); @@ -4114,7 +4116,7 @@ public class PlatformDbContext : b.Property(x => x.TotalAmount).HasDefaultValue(0).HasPrecision(18, 2); b.Property(x => x.Currency).IsRequired().HasMaxLength(10); - b.Property(x => x.WaybillStatusId).IsRequired(); + b.Property(x => x.WaybillStatusId).IsRequired().HasMaxLength(50); b.Property(x => x.IsInvoiced).HasDefaultValue(false); @@ -4229,7 +4231,7 @@ public class PlatformDbContext : b.Property(x => x.RemainingAmount).HasDefaultValue(0).HasPrecision(18, 2); b.Property(x => x.Currency).IsRequired().HasMaxLength(10); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.Notes).HasMaxLength(1000); b.HasOne(x => x.CurrentAccount) @@ -4333,13 +4335,12 @@ public class PlatformDbContext : b.Property(x => x.Amount).HasDefaultValue(0).HasPrecision(18, 2); b.Property(x => x.Currency).HasMaxLength(10).IsRequired(); - b.Property(x => x.StatusId).IsRequired(); - b.Property(x => x.TypeId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); + b.Property(x => x.TypeId).IsRequired().HasMaxLength(50); b.Property(x => x.EndorsedTo).HasMaxLength(200); b.Property(x => x.Notes).HasMaxLength(1000); - // FK → CurrentAccount (ZORUNLU) b.HasOne(x => x.CurrentAccount) .WithMany(ca => ca.Checks) .HasForeignKey(x => x.CurrentAccountId) @@ -4385,8 +4386,8 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.OrderNumber).IsRequired().HasMaxLength(50); - b.Property(x => x.OrderTypeId).IsRequired(); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.OrderTypeId).IsRequired().HasMaxLength(50); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.Property(x => x.Priority).IsRequired().HasMaxLength(50); b.Property(x => x.UomId).HasMaxLength(64); b.Property(x => x.Currency).HasMaxLength(10); @@ -4462,7 +4463,7 @@ public class PlatformDbContext : b.Property(x => x.ProcessTime).HasDefaultValue(0); b.Property(x => x.ActualSetupTime).HasDefaultValue(0); b.Property(x => x.ActualProcessTime).HasDefaultValue(0); - b.Property(x => x.StatusId).IsRequired(); + b.Property(x => x.StatusId).IsRequired().HasMaxLength(50); b.HasOne(x => x.ProductionOrder) .WithMany(po => po.Workorders) diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.Designer.cs index e8137f2d..a2723cdb 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251211134804_Initial")] + [Migration("20251211144929_Initial")] partial class Initial { /// @@ -2307,6 +2307,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -2315,6 +2316,7 @@ namespace Erp.Platform.Migrations b.Property("TypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -3786,7 +3788,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier"); b.Property("PaymentTermId") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(100)"); b.Property("Risk") .HasMaxLength(10) @@ -4776,6 +4778,7 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.EducationStatus", b => { b.Property("Id") + .HasMaxLength(50) .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -5501,6 +5504,7 @@ namespace Erp.Platform.Migrations b.Property("FaultTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("FollowUpRequired") @@ -5886,7 +5890,8 @@ namespace Erp.Platform.Migrations b.Property("LocationId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("LotNumber") .HasMaxLength(100) @@ -5925,11 +5930,13 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -6026,6 +6033,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Subtotal") @@ -7531,6 +7539,7 @@ namespace Erp.Platform.Migrations b.Property("LocationTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Name") @@ -7547,10 +7556,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -8372,6 +8383,7 @@ namespace Erp.Platform.Migrations b.Property("ReferenceTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -8428,6 +8440,7 @@ namespace Erp.Platform.Migrations b.Property("LocationId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("LotNumber") @@ -8457,10 +8470,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -9512,7 +9527,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("PerformanceMetricsJson") .HasColumnType("text"); @@ -9979,7 +9995,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10635,6 +10652,7 @@ namespace Erp.Platform.Migrations b.Property("OrderTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlannedCost") @@ -10674,6 +10692,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11004,6 +11023,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11188,6 +11208,7 @@ namespace Erp.Platform.Migrations b.Property("ProjectTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("StartDate") @@ -11195,6 +11216,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskTypeId") @@ -11325,6 +11347,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11475,6 +11498,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskTypeId") @@ -11564,6 +11588,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskId") @@ -11575,6 +11600,7 @@ namespace Erp.Platform.Migrations b.Property("WorkedTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -11777,7 +11803,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("QuotationId") .HasColumnType("uniqueidentifier"); @@ -12014,7 +12041,8 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -12385,6 +12413,7 @@ namespace Erp.Platform.Migrations b.Property("DeliveryTermId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DeliveryTime") @@ -12434,7 +12463,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("QuotationDate") .HasColumnType("datetime2"); @@ -12454,10 +12484,12 @@ namespace Erp.Platform.Migrations b.Property("RequestTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SubmittedAt") @@ -13141,6 +13173,7 @@ namespace Erp.Platform.Migrations b.Property("RequestTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("RequiredDate") @@ -13549,6 +13582,7 @@ namespace Erp.Platform.Migrations b.Property("DeliveryTermId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DiscountAmount") @@ -13597,7 +13631,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("RequestedDeliveryDate") .HasColumnType("datetime2"); @@ -15698,6 +15733,7 @@ namespace Erp.Platform.Migrations b.Property("UomCategoryId") .IsRequired() + .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -16095,6 +16131,7 @@ namespace Erp.Platform.Migrations b.Property("WarehouseTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16289,10 +16326,12 @@ namespace Erp.Platform.Migrations b.Property("WaybillStatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("WaybillTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16787,6 +16826,7 @@ namespace Erp.Platform.Migrations b.Property("WorkcenterTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17097,6 +17137,7 @@ namespace Erp.Platform.Migrations b.Property("WorkorderTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17437,10 +17478,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.cs index fff68e7f..b3b9faa2 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211134804_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251211144929_Initial.cs @@ -810,7 +810,7 @@ namespace Erp.Platform.Migrations name: "Adm_T_EducationStatus", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), + Id = table.Column(type: "uniqueidentifier", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Order = table.Column(type: "smallint", nullable: true), @@ -2961,7 +2961,7 @@ namespace Erp.Platform.Migrations name: "Scp_T_PaymentTerm", columns: table => new { - Id = table.Column(type: "nvarchar(450)", nullable: false), + Id = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), @@ -3249,7 +3249,7 @@ namespace Erp.Platform.Migrations IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), MaterialTypeId = table.Column(type: "uniqueidentifier", nullable: true), MaterialGroupId = table.Column(type: "uniqueidentifier", nullable: true), - WarehouseId = table.Column(type: "nvarchar(max)", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TargetZoneId = table.Column(type: "nvarchar(max)", nullable: true), TargetLocationId = table.Column(type: "nvarchar(max)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -5057,8 +5057,8 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - TypeId = table.Column(type: "nvarchar(50)", nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + TypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), CheckNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), BankName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), BranchName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), @@ -5116,7 +5116,7 @@ namespace Erp.Platform.Migrations Balance = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), Risk = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - PaymentTermId = table.Column(type: "nvarchar(450)", nullable: true), + PaymentTermId = table.Column(type: "nvarchar(100)", nullable: true), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -5145,7 +5145,7 @@ namespace Erp.Platform.Migrations BranchId = table.Column(type: "uniqueidentifier", nullable: true), InvoiceTypeId = table.Column(type: "nvarchar(50)", nullable: false), CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: true), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), InvoiceNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), InvoiceDate = table.Column(type: "datetime2", nullable: false), DueDate = table.Column(type: "datetime2", nullable: false), @@ -5203,9 +5203,9 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), - WaybillTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WaybillTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: true), - WaybillStatusId = table.Column(type: "nvarchar(50)", nullable: false), + WaybillStatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), WaybillNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), WaybillDate = table.Column(type: "datetime2", nullable: false), DeliveryDate = table.Column(type: "datetime2", nullable: true), @@ -5391,7 +5391,7 @@ namespace Erp.Platform.Migrations Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), CreditLimit = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), LastOrderDate = table.Column(type: "datetime2", nullable: true), Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), @@ -5580,8 +5580,8 @@ namespace Erp.Platform.Migrations DiscountAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TotalAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), - DeliveryTermId = table.Column(type: "nvarchar(50)", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + DeliveryTermId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), ExchangeRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), DiscountRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), TaxRate = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -5634,7 +5634,7 @@ namespace Erp.Platform.Migrations MovementDate = table.Column(type: "datetime2", nullable: false), MovementType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), PartnerId = table.Column(type: "uniqueidentifier", nullable: true), - ReferenceTypeId = table.Column(type: "nvarchar(50)", nullable: false), + ReferenceTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), ReferenceDocument = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), IsTransfer = table.Column(type: "bit", nullable: false), @@ -5669,7 +5669,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UomCategoryId = table.Column(type: "nvarchar(128)", nullable: false), + UomCategoryId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), @@ -5702,8 +5702,8 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), OrderNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - OrderTypeId = table.Column(type: "nvarchar(50)", nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + OrderTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), PlannedStartDate = table.Column(type: "datetime2", nullable: false), PlannedEndDate = table.Column(type: "datetime2", nullable: false), @@ -5806,9 +5806,9 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseId = table.Column(type: "nvarchar(max)", nullable: false), - ZoneId = table.Column(type: "nvarchar(max)", nullable: false), - LocationId = table.Column(type: "nvarchar(max)", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + ZoneId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + LocationId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), ReservedQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), AvailableQuantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), @@ -6276,7 +6276,7 @@ namespace Erp.Platform.Migrations Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - WorkcenterTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WorkcenterTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Manufacturer = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Model = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), SerialNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), @@ -6454,7 +6454,7 @@ namespace Erp.Platform.Migrations Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Location = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), - FaultTypeId = table.Column(type: "nvarchar(50)", nullable: false), + FaultTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), Severity = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), EstimatedRepairTime = table.Column(type: "int", nullable: true), @@ -7030,15 +7030,15 @@ namespace Erp.Platform.Migrations QuotationNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), RequestId = table.Column(type: "nvarchar(max)", nullable: true), RequestTitle = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - RequestTypeId = table.Column(type: "nvarchar(50)", nullable: false), + RequestTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), SupplierId = table.Column(type: "uniqueidentifier", nullable: false), QuotationDate = table.Column(type: "datetime2", nullable: false), ValidUntil = table.Column(type: "datetime2", nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TotalAmount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), - DeliveryTermId = table.Column(type: "nvarchar(50)", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + DeliveryTermId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), DeliveryTime = table.Column(type: "int", nullable: true, defaultValue: 0), EvaluationScore = table.Column(type: "int", nullable: true, defaultValue: 0), EvaluationComments = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), @@ -7110,7 +7110,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - RequestTypeId = table.Column(type: "nvarchar(50)", nullable: false), + RequestTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), DepartmentId = table.Column(type: "uniqueidentifier", nullable: false), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), RequestDate = table.Column(type: "datetime2", nullable: false), @@ -7159,7 +7159,7 @@ namespace Erp.Platform.Migrations Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WarehouseTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -7263,7 +7263,7 @@ namespace Erp.Platform.Migrations WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), PlanId = table.Column(type: "uniqueidentifier", nullable: true), PlanWizardId = table.Column(type: "uniqueidentifier", nullable: true), - WorkorderTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WorkorderTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Subject = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -7434,7 +7434,7 @@ namespace Erp.Platform.Migrations OperationId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), WorkcenterId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Sequence = table.Column(type: "int", nullable: false, defaultValue: 1), PlannedStartDate = table.Column(type: "datetime2", nullable: false), PlannedEndDate = table.Column(type: "datetime2", nullable: false), @@ -7766,7 +7766,7 @@ namespace Erp.Platform.Migrations SupplierId = table.Column(type: "uniqueidentifier", nullable: false), OrderDate = table.Column(type: "datetime2", nullable: false), DeliveryDate = table.Column(type: "datetime2", nullable: true), - PaymentTermId = table.Column(type: "nvarchar(450)", nullable: false), + PaymentTermId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Terms = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), RequestId = table.Column(type: "uniqueidentifier", nullable: true), @@ -7865,8 +7865,8 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), - ZoneTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + ZoneTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -8050,9 +8050,9 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), - ZoneId = table.Column(type: "nvarchar(50)", nullable: false), - LocationTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + ZoneId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + LocationTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), @@ -8105,9 +8105,9 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), MovementId = table.Column(type: "uniqueidentifier", nullable: false), - WarehouseId = table.Column(type: "nvarchar(50)", nullable: false), - ZoneId = table.Column(type: "nvarchar(50)", nullable: false), - LocationId = table.Column(type: "nvarchar(50)", nullable: false), + WarehouseId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + ZoneId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + LocationId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), UomId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), @@ -8182,7 +8182,7 @@ namespace Erp.Platform.Migrations ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Progress = table.Column(type: "int", nullable: false, defaultValue: 0), Risks = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), RiskId = table.Column(type: "nvarchar(50)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -8224,8 +8224,8 @@ namespace Erp.Platform.Migrations Code = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - ProjectTypeId = table.Column(type: "nvarchar(50)", nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + ProjectTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), ManagerId = table.Column(type: "uniqueidentifier", nullable: true), StartDate = table.Column(type: "datetime2", nullable: false), @@ -8330,7 +8330,7 @@ namespace Erp.Platform.Migrations Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TaskTypeId = table.Column(type: "nvarchar(50)", nullable: true), Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), StartDate = table.Column(type: "datetime2", nullable: false), EndDate = table.Column(type: "datetime2", nullable: false), @@ -8426,10 +8426,10 @@ namespace Erp.Platform.Migrations EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), Date = table.Column(type: "datetime2", nullable: false), - WorkedTypeId = table.Column(type: "nvarchar(50)", nullable: false), + WorkedTypeId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), HoursWorked = table.Column(type: "int", nullable: false, defaultValue: 0), Progress = table.Column(type: "int", nullable: false, defaultValue: 0), - StatusId = table.Column(type: "nvarchar(50)", nullable: false), + StatusId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), Challenges = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), NextSteps = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 96f3ad67..5f69fa3c 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -2304,6 +2304,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -2312,6 +2313,7 @@ namespace Erp.Platform.Migrations b.Property("TypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -3783,7 +3785,7 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier"); b.Property("PaymentTermId") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(100)"); b.Property("Risk") .HasMaxLength(10) @@ -4773,6 +4775,7 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.EducationStatus", b => { b.Property("Id") + .HasMaxLength(50) .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -5498,6 +5501,7 @@ namespace Erp.Platform.Migrations b.Property("FaultTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("FollowUpRequired") @@ -5883,7 +5887,8 @@ namespace Erp.Platform.Migrations b.Property("LocationId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("LotNumber") .HasMaxLength(100) @@ -5922,11 +5927,13 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -6023,6 +6030,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Subtotal") @@ -7528,6 +7536,7 @@ namespace Erp.Platform.Migrations b.Property("LocationTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Name") @@ -7544,10 +7553,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -8369,6 +8380,7 @@ namespace Erp.Platform.Migrations b.Property("ReferenceTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -8425,6 +8437,7 @@ namespace Erp.Platform.Migrations b.Property("LocationId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("LotNumber") @@ -8454,10 +8467,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -9509,7 +9524,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("PerformanceMetricsJson") .HasColumnType("text"); @@ -9976,7 +9992,8 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10632,6 +10649,7 @@ namespace Erp.Platform.Migrations b.Property("OrderTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlannedCost") @@ -10671,6 +10689,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11001,6 +11020,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11185,6 +11205,7 @@ namespace Erp.Platform.Migrations b.Property("ProjectTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("StartDate") @@ -11192,6 +11213,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskTypeId") @@ -11322,6 +11344,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TenantId") @@ -11472,6 +11495,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskTypeId") @@ -11561,6 +11585,7 @@ namespace Erp.Platform.Migrations b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("TaskId") @@ -11572,6 +11597,7 @@ namespace Erp.Platform.Migrations b.Property("WorkedTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -11774,7 +11800,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("QuotationId") .HasColumnType("uniqueidentifier"); @@ -12011,7 +12038,8 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -12382,6 +12410,7 @@ namespace Erp.Platform.Migrations b.Property("DeliveryTermId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DeliveryTime") @@ -12431,7 +12460,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("QuotationDate") .HasColumnType("datetime2"); @@ -12451,10 +12481,12 @@ namespace Erp.Platform.Migrations b.Property("RequestTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("StatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SubmittedAt") @@ -13138,6 +13170,7 @@ namespace Erp.Platform.Migrations b.Property("RequestTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("RequiredDate") @@ -13546,6 +13579,7 @@ namespace Erp.Platform.Migrations b.Property("DeliveryTermId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DiscountAmount") @@ -13594,7 +13628,8 @@ namespace Erp.Platform.Migrations b.Property("PaymentTermId") .IsRequired() - .HasColumnType("nvarchar(450)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("RequestedDeliveryDate") .HasColumnType("datetime2"); @@ -15695,6 +15730,7 @@ namespace Erp.Platform.Migrations b.Property("UomCategoryId") .IsRequired() + .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -16092,6 +16128,7 @@ namespace Erp.Platform.Migrations b.Property("WarehouseTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16286,10 +16323,12 @@ namespace Erp.Platform.Migrations b.Property("WaybillStatusId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("WaybillTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -16784,6 +16823,7 @@ namespace Erp.Platform.Migrations b.Property("WorkcenterTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17094,6 +17134,7 @@ namespace Erp.Platform.Migrations b.Property("WorkorderTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id"); @@ -17434,10 +17475,12 @@ namespace Erp.Platform.Migrations b.Property("WarehouseId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ZoneTypeId") .IsRequired() + .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.HasKey("Id");