diff --git a/Frontend/src/environments/environment.ts b/Frontend/src/environments/environment.ts index 98dcec0..b4ed8cc 100644 --- a/Frontend/src/environments/environment.ts +++ b/Frontend/src/environments/environment.ts @@ -7,8 +7,8 @@ export const environment = { appName: "LOCAL_DiunaBI", production: false, api: { - //url: "http://localhost:5400/api" - url: "https://diunabi-morska.bim-it.pl/api" + url: "http://localhost:5400/api" + //url: "https://diunabi-morska.bim-it.pl/api" }, google: { clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com" diff --git a/WebAPI/AppDbContext.cs b/WebAPI/AppDbContext.cs index 0ba188f..273a172 100644 --- a/WebAPI/AppDbContext.cs +++ b/WebAPI/AppDbContext.cs @@ -9,7 +9,7 @@ public class AppDbContext : DbContext public DbSet Layers { get; init; } public DbSet Records { get; init; } public DbSet ProcessSources { get; init; } - public DbSet DataInbox { get; set; } + // public DbSet DataInbox { get; set; } public AppDbContext(DbContextOptions options) : base(options) { diff --git a/WebAPI/Migrations/AppDbContextModelSnapshot.cs b/WebAPI/Migrations/AppDbContextModelSnapshot.cs index e08c03b..e08ff41 100644 --- a/WebAPI/Migrations/AppDbContextModelSnapshot.cs +++ b/WebAPI/Migrations/AppDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace WebAPI.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("ProductVersion", "8.0.6") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -45,7 +45,8 @@ namespace WebAPI.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Number") .HasColumnType("int"); @@ -53,10 +54,6 @@ namespace WebAPI.Migrations b.Property("ParentId") .HasColumnType("uniqueidentifier"); - b.Property("Source") - .IsRequired() - .HasColumnType("nvarchar(max)"); - b.Property("Type") .HasColumnType("int"); @@ -94,7 +91,8 @@ namespace WebAPI.Migrations b.Property("Code") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CreatedAt") .HasColumnType("datetime2"); @@ -103,19 +101,8 @@ namespace WebAPI.Migrations .HasColumnType("uniqueidentifier"); b.Property("Desc1") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc2") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc3") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc4") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc5") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("IsDeleted") .HasColumnType("bit"); @@ -246,7 +233,8 @@ namespace WebAPI.Migrations .HasColumnType("datetime2"); b.Property("Email") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("UserName") .HasMaxLength(50) @@ -285,7 +273,7 @@ namespace WebAPI.Migrations modelBuilder.Entity("WebAPI.Models.ProcessSource", b => { b.HasOne("WebAPI.Models.Layer", "Source") - .WithMany("Sources") + .WithMany() .HasForeignKey("SourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); @@ -321,8 +309,6 @@ namespace WebAPI.Migrations modelBuilder.Entity("WebAPI.Models.Layer", b => { b.Navigation("Records"); - - b.Navigation("Sources"); }); #pragma warning restore 612, 618 } diff --git a/WebAPI/Models/Layer.cs b/WebAPI/Models/Layer.cs index 0dedcba..8fbb41c 100644 --- a/WebAPI/Models/Layer.cs +++ b/WebAPI/Models/Layer.cs @@ -15,7 +15,6 @@ public class Layer public Guid Id { get; init; } [Required] public int Number { get; init; } - [Required] [MaxLength(50)] public string? Name { get; set; } diff --git a/WebAPI/Models/Record.cs b/WebAPI/Models/Record.cs index 4f8bf8f..9621a93 100644 --- a/WebAPI/Models/Record.cs +++ b/WebAPI/Models/Record.cs @@ -43,17 +43,8 @@ public class Record public double? Value31 { get; set; } public double? Value32 { get; set; } //Description fields - [StringLength(50)] + [StringLength(1000)] public string? Desc1 { get; init; } - [StringLength(50)] - public string? Desc2 { get; init; } - [StringLength(50)] - public string? Desc3 { get; init; } - [StringLength(50)] - public string? Desc4 { get; init; } - [StringLength(50)] - public string? Desc5 { get; init; } - [StringLength(50)] public DateTime CreatedAt { get; set; } public DateTime ModifiedAt { get; set; } public bool IsDeleted { get; init; }