From 92c01004f597a7c8e7d3a4f6c8332b6356ee3052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C4=83ng=20Nguy=E1=BB=85n?= Date: Mon, 22 Dec 2025 10:33:24 +0700 Subject: [PATCH] update --- .../Pages/{Home.razor => Dashboard.razor} | 16 +- .../Account/IdentityRedirectManager.cs | 24 +- RobotApp/Components/Pages/Home.razor | 14 +- ...000000000_CreateIdentitySchema.Designer.cs | 279 ------- .../00000000000000_CreateIdentitySchema.cs | 224 ------ .../20250926020848_initDb.Designer.cs | 268 ------- .../Data/Migrations/20250926020848_initDb.cs | 721 ------------------ .../20251028102815_InitConfigDb.Designer.cs | 503 ------------ .../Migrations/20251028102815_InitConfigDb.cs | 118 --- ...51029064620_InitConfigSafetyDb.Designer.cs | 565 -------------- .../20251029064620_InitConfigSafetyDb.cs | 45 -- ...1029064649_InitConfigSafety1Db.Designer.cs | 565 -------------- .../20251029064649_InitConfigSafety1Db.cs | 22 - ...1031073231_UpdateVDA5050Config.Designer.cs | 577 -------------- .../20251031073231_UpdateVDA5050Config.cs | 48 -- ...031080648_UpdateVDA5050Config1.Designer.cs | 577 -------------- .../20251031080648_UpdateVDA5050Config1.cs | 22 - .../20251106025457_UpdateVDA5050St.cs | 29 - ...51222025151_InitApplicationDb.Designer.cs} | 4 +- .../20251222025151_InitApplicationDb.cs | 351 +++++++++ .../ApplicationDbContextModelSnapshot.cs | 2 +- RobotApp/Hubs/RobotHub.cs | 1 - RobotApp/RobotApp.csproj | 1 + RobotApp/robot.db | Bin 167936 -> 151552 bytes 24 files changed, 391 insertions(+), 4585 deletions(-) rename RobotApp.Client/Pages/{Home.razor => Dashboard.razor} (98%) delete mode 100644 RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs delete mode 100644 RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.cs delete mode 100644 RobotApp/Data/Migrations/20250926020848_initDb.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20250926020848_initDb.cs delete mode 100644 RobotApp/Data/Migrations/20251028102815_InitConfigDb.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20251028102815_InitConfigDb.cs delete mode 100644 RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.cs delete mode 100644 RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.cs delete mode 100644 RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.cs delete mode 100644 RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.Designer.cs delete mode 100644 RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.cs delete mode 100644 RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.cs rename RobotApp/Data/Migrations/{20251106025457_UpdateVDA5050St.Designer.cs => 20251222025151_InitApplicationDb.Designer.cs} (99%) create mode 100644 RobotApp/Data/Migrations/20251222025151_InitApplicationDb.cs diff --git a/RobotApp.Client/Pages/Home.razor b/RobotApp.Client/Pages/Dashboard.razor similarity index 98% rename from RobotApp.Client/Pages/Home.razor rename to RobotApp.Client/Pages/Dashboard.razor index 326a868..41e2ad8 100644 --- a/RobotApp.Client/Pages/Home.razor +++ b/RobotApp.Client/Pages/Dashboard.razor @@ -1,11 +1,14 @@ -@page "/" -@attribute [Authorize] +@page "/dashboard" + @using RobotApp.Client.Services @using RobotApp.VDA5050.State @using MudBlazor -@inject RobotStateClient RobotStateClient + @implements IDisposable -@rendermode InteractiveWebAssembly +@attribute [Authorize] + +@inject RobotStateClient RobotStateClient +@rendermode InteractiveWebAssemblyNoPrerender @@ -155,7 +158,7 @@
- @msg.BatteryState.BatteryCharge:F1% + @msg.BatteryState.BatteryCharge% Update ID: @msg.OrderUpdateId Last Node: @msg.LastNodeId (Seq: @msg.LastNodeSequenceId) - Distance since last: @msg.DistanceSinceLastNode:F1 m + Distance since last: @msg.DistanceSinceLastNode m @{ var nodeReleased = msg.NodeStates?.Count(n => n.Released) ?? 0; @@ -384,6 +387,7 @@ UpdateMessageRows(); } + private void OnRobotStateReceived(string serialNumber, StateMsg state) { if (serialNumber != RobotSerial) return; diff --git a/RobotApp/Components/Account/IdentityRedirectManager.cs b/RobotApp/Components/Account/IdentityRedirectManager.cs index 61cdac5..486de17 100644 --- a/RobotApp/Components/Account/IdentityRedirectManager.cs +++ b/RobotApp/Components/Account/IdentityRedirectManager.cs @@ -18,18 +18,22 @@ namespace RobotApp.Components.Account [DoesNotReturn] public void RedirectTo(string? uri) { - uri ??= ""; - - // Prevent open redirects. - if (!Uri.IsWellFormedUriString(uri, UriKind.Relative)) + try { - uri = navigationManager.ToBaseRelativePath(uri); - } + uri ??= "/"; - // During static rendering, NavigateTo throws a NavigationException which is handled by the framework as a redirect. - // So as long as this is called from a statically rendered Identity component, the InvalidOperationException is never thrown. - navigationManager.NavigateTo(uri); - throw new InvalidOperationException($"{nameof(IdentityRedirectManager)} can only be used during static rendering."); + // Prevent open redirects. + if (!Uri.IsWellFormedUriString(uri, UriKind.Relative)) + { + uri = navigationManager.ToBaseRelativePath(uri); + } + + // During static rendering, NavigateTo throws a NavigationException which is handled by the framework as a redirect. + // So as long as this is called from a statically rendered Identity component, the InvalidOperationException is never thrown. + navigationManager.NavigateTo(uri); + throw new InvalidOperationException($"{nameof(IdentityRedirectManager)} can only be used during static rendering."); + } + catch (NavigationException) { } } [DoesNotReturn] diff --git a/RobotApp/Components/Pages/Home.razor b/RobotApp/Components/Pages/Home.razor index 23f2ee7..5c7d1e4 100644 --- a/RobotApp/Components/Pages/Home.razor +++ b/RobotApp/Components/Pages/Home.razor @@ -1,7 +1,17 @@ -@page "/home" +@page "/" @using Microsoft.AspNetCore.Authorization @rendermode InteractiveServer @attribute [Authorize] -@*

Welcome to RobotApp!

*@ + +@inject NavigationManager Nav + +@code +{ + protected override void OnAfterRender(bool firstRender) + { + base.OnAfterRender(firstRender); + if (firstRender) Nav.NavigateTo("/dashboard", forceLoad: true); + } +} \ No newline at end of file diff --git a/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs b/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs deleted file mode 100644 index e9aeabb..0000000 --- a/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs +++ /dev/null @@ -1,279 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] - partial class CreateIdentitySchema - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("Text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("Text"); - - b.Property("PhoneNumber") - .HasColumnType("Text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("Text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("Text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("Text"); - - b.Property("ClaimValue") - .HasColumnType("Text"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("Text"); - - b.Property("ClaimValue") - .HasColumnType("Text"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("Text"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("Text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.cs b/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.cs deleted file mode 100644 index e2c70b6..0000000 --- a/RobotApp/Data/Migrations/00000000000000_CreateIdentitySchema.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Migrations -{ - /// - public partial class CreateIdentitySchema : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "Text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetUsers", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "Text", nullable: true), - SecurityStamp = table.Column(type: "Text", nullable: true), - ConcurrencyStamp = table.Column(type: "Text", nullable: true), - PhoneNumber = table.Column(type: "Text", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "Text", nullable: true), - ClaimValue = table.Column(type: "Text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "Text", nullable: true), - ClaimValue = table.Column(type: "Text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "Text", nullable: true), - UserId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - RoleId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "Text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "AspNetUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "AspNetUsers"); - } - } -} diff --git a/RobotApp/Data/Migrations/20250926020848_initDb.Designer.cs b/RobotApp/Data/Migrations/20250926020848_initDb.Designer.cs deleted file mode 100644 index e81f01b..0000000 --- a/RobotApp/Data/Migrations/20250926020848_initDb.Designer.cs +++ /dev/null @@ -1,268 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20250926020848_initDb")] - partial class initDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20250926020848_initDb.cs b/RobotApp/Data/Migrations/20250926020848_initDb.cs deleted file mode 100644 index 085e636..0000000 --- a/RobotApp/Data/Migrations/20250926020848_initDb.cs +++ /dev/null @@ -1,721 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class initDb : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "UserNameIndex", - table: "AspNetUsers"); - - migrationBuilder.DropIndex( - name: "RoleNameIndex", - table: "AspNetRoles"); - - migrationBuilder.AlterColumn( - name: "Value", - table: "AspNetUserTokens", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AspNetUserTokens", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "LoginProvider", - table: "AspNetUserTokens", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserTokens", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "UserName", - table: "AspNetUsers", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "TwoFactorEnabled", - table: "AspNetUsers", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "bit"); - - migrationBuilder.AlterColumn( - name: "SecurityStamp", - table: "AspNetUsers", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "PhoneNumberConfirmed", - table: "AspNetUsers", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "bit"); - - migrationBuilder.AlterColumn( - name: "PhoneNumber", - table: "AspNetUsers", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "PasswordHash", - table: "AspNetUsers", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "NormalizedUserName", - table: "AspNetUsers", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "NormalizedEmail", - table: "AspNetUsers", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "LockoutEnd", - table: "AspNetUsers", - type: "TEXT", - nullable: true, - oldClrType: typeof(DateTimeOffset), - oldType: "datetimeoffset", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "LockoutEnabled", - table: "AspNetUsers", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "bit"); - - migrationBuilder.AlterColumn( - name: "EmailConfirmed", - table: "AspNetUsers", - type: "INTEGER", - nullable: false, - oldClrType: typeof(bool), - oldType: "bit"); - - migrationBuilder.AlterColumn( - name: "Email", - table: "AspNetUsers", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AspNetUsers", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "AccessFailedCount", - table: "AspNetUsers", - type: "INTEGER", - nullable: false, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetUsers", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "RoleId", - table: "AspNetUserRoles", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserRoles", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserLogins", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "ProviderDisplayName", - table: "AspNetUserLogins", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ProviderKey", - table: "AspNetUserLogins", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "LoginProvider", - table: "AspNetUserLogins", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserClaims", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "ClaimValue", - table: "AspNetUserClaims", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ClaimType", - table: "AspNetUserClaims", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetUserClaims", - type: "INTEGER", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("Sqlite:Autoincrement", true) - .OldAnnotation("Sqlite:Autoincrement", true); - - migrationBuilder.AlterColumn( - name: "NormalizedName", - table: "AspNetRoles", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AspNetRoles", - type: "TEXT", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AspNetRoles", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetRoles", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "RoleId", - table: "AspNetRoleClaims", - type: "TEXT", - nullable: false, - oldClrType: typeof(string), - oldType: "nvarchar(450)"); - - migrationBuilder.AlterColumn( - name: "ClaimValue", - table: "AspNetRoleClaims", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ClaimType", - table: "AspNetRoleClaims", - type: "TEXT", - nullable: true, - oldClrType: typeof(string), - oldType: "Text", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetRoleClaims", - type: "INTEGER", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("Sqlite:Autoincrement", true) - .OldAnnotation("Sqlite:Autoincrement", true); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "UserNameIndex", - table: "AspNetUsers"); - - migrationBuilder.DropIndex( - name: "RoleNameIndex", - table: "AspNetRoles"); - - migrationBuilder.AlterColumn( - name: "Value", - table: "AspNetUserTokens", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AspNetUserTokens", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "LoginProvider", - table: "AspNetUserTokens", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserTokens", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "UserName", - table: "AspNetUsers", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "TwoFactorEnabled", - table: "AspNetUsers", - type: "bit", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "SecurityStamp", - table: "AspNetUsers", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "PhoneNumberConfirmed", - table: "AspNetUsers", - type: "bit", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "PhoneNumber", - table: "AspNetUsers", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "PasswordHash", - table: "AspNetUsers", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "NormalizedUserName", - table: "AspNetUsers", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "NormalizedEmail", - table: "AspNetUsers", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "LockoutEnd", - table: "AspNetUsers", - type: "datetimeoffset", - nullable: true, - oldClrType: typeof(DateTimeOffset), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "LockoutEnabled", - table: "AspNetUsers", - type: "bit", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "EmailConfirmed", - table: "AspNetUsers", - type: "bit", - nullable: false, - oldClrType: typeof(bool), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "Email", - table: "AspNetUsers", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AspNetUsers", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "AccessFailedCount", - table: "AspNetUsers", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "INTEGER"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetUsers", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "RoleId", - table: "AspNetUserRoles", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserRoles", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserLogins", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "ProviderDisplayName", - table: "AspNetUserLogins", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ProviderKey", - table: "AspNetUserLogins", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "LoginProvider", - table: "AspNetUserLogins", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "UserId", - table: "AspNetUserClaims", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "ClaimValue", - table: "AspNetUserClaims", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ClaimType", - table: "AspNetUserClaims", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetUserClaims", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "INTEGER") - .Annotation("Sqlite:Autoincrement", true) - .OldAnnotation("Sqlite:Autoincrement", true); - - migrationBuilder.AlterColumn( - name: "NormalizedName", - table: "AspNetRoles", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AspNetRoles", - type: "nvarchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AspNetRoles", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetRoles", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "RoleId", - table: "AspNetRoleClaims", - type: "nvarchar(450)", - nullable: false, - oldClrType: typeof(string), - oldType: "TEXT"); - - migrationBuilder.AlterColumn( - name: "ClaimValue", - table: "AspNetRoleClaims", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "ClaimType", - table: "AspNetRoleClaims", - type: "Text", - nullable: true, - oldClrType: typeof(string), - oldType: "TEXT", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AspNetRoleClaims", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "INTEGER") - .Annotation("Sqlite:Autoincrement", true) - .OldAnnotation("Sqlite:Autoincrement", true); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - } - } -} diff --git a/RobotApp/Data/Migrations/20251028102815_InitConfigDb.Designer.cs b/RobotApp/Data/Migrations/20251028102815_InitConfigDb.Designer.cs deleted file mode 100644 index 62ad2b7..0000000 --- a/RobotApp/Data/Migrations/20251028102815_InitConfigDb.Designer.cs +++ /dev/null @@ -1,503 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20251028102815_InitConfigDb")] - partial class InitConfigDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.RobotConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("Height") - .HasColumnType("float") - .HasColumnName("Height"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("Length") - .HasColumnType("float") - .HasColumnName("Length"); - - b.Property("NavigationType") - .HasColumnType("int") - .HasColumnName("NavigationType"); - - b.Property("RadiusWheel") - .HasColumnType("float") - .HasColumnName("RadiusWheel"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("Width") - .HasColumnType("float") - .HasColumnName("Width"); - - b.HasKey("Id"); - - b.ToTable("RobotConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotPlcConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("PLCAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("PLCAddress"); - - b.Property("PLCPort") - .HasColumnType("int") - .HasColumnName("PLCPort"); - - b.Property("PLCUnitId") - .HasColumnType("tinyint") - .HasColumnName("PLCUnitId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotPlcConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSimulationConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("EnableSimulation") - .HasColumnType("bit") - .HasColumnName("EnableSimulation"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SimulationAcceleration") - .HasColumnType("float") - .HasColumnName("SimulationAcceleration"); - - b.Property("SimulationDeceleration") - .HasColumnType("float") - .HasColumnName("SimulationDeceleration"); - - b.Property("SimulationMaxAngularVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxAngularVelocity"); - - b.Property("SimulationMaxVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxVelocity"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSimulationConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotVDA5050Config", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SerialNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("SerialNumber"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("VDA5050EnablePassword") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnablePassword"); - - b.Property("VDA5050EnableTls") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnableTls"); - - b.Property("VDA5050HostServer") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_HostServer"); - - b.Property("VDA5050Manufacturer") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Manufacturer"); - - b.Property("VDA5050Password") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Password"); - - b.Property("VDA5050Port") - .HasColumnType("int") - .HasColumnName("VDA5050_Port"); - - b.Property("VDA5050PublishRepeat") - .HasColumnType("int") - .HasColumnName("VDA5050_PublishRepeat"); - - b.Property("VDA5050UserName") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_UserName"); - - b.Property("VDA5050Version") - .HasMaxLength(20) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Version"); - - b.HasKey("Id"); - - b.ToTable("RobotVDA5050Config"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20251028102815_InitConfigDb.cs b/RobotApp/Data/Migrations/20251028102815_InitConfigDb.cs deleted file mode 100644 index 924cfa1..0000000 --- a/RobotApp/Data/Migrations/20251028102815_InitConfigDb.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class InitConfigDb : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "RobotConfig", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - NavigationType = table.Column(type: "int", nullable: false), - RadiusWheel = table.Column(type: "float", nullable: false), - Width = table.Column(type: "float", nullable: false), - Length = table.Column(type: "float", nullable: false), - Height = table.Column(type: "float", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - Description = table.Column(type: "ntext", maxLength: 500, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RobotConfig", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RobotPlcConfig", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PLCAddress = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), - PLCPort = table.Column(type: "int", nullable: false), - PLCUnitId = table.Column(type: "tinyint", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - Description = table.Column(type: "ntext", maxLength: 500, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RobotPlcConfig", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RobotSimulationConfig", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - EnableSimulation = table.Column(type: "bit", nullable: false), - SimulationMaxVelocity = table.Column(type: "float", nullable: false), - SimulationMaxAngularVelocity = table.Column(type: "float", nullable: false), - SimulationAcceleration = table.Column(type: "float", nullable: false), - SimulationDeceleration = table.Column(type: "float", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - Description = table.Column(type: "ntext", maxLength: 500, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RobotSimulationConfig", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RobotVDA5050Config", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SerialNumber = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), - VDA5050_HostServer = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - VDA5050_Port = table.Column(type: "int", nullable: false), - VDA5050_UserName = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), - VDA5050_Password = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), - VDA5050_Manufacturer = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), - VDA5050_Version = table.Column(type: "nvarchar(64)", maxLength: 20, nullable: true), - VDA5050_PublishRepeat = table.Column(type: "int", nullable: false), - VDA5050_EnablePassword = table.Column(type: "bit", nullable: false), - VDA5050_EnableTls = table.Column(type: "bit", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - Description = table.Column(type: "ntext", maxLength: 500, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RobotVDA5050Config", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RobotConfig"); - - migrationBuilder.DropTable( - name: "RobotPlcConfig"); - - migrationBuilder.DropTable( - name: "RobotSimulationConfig"); - - migrationBuilder.DropTable( - name: "RobotVDA5050Config"); - } - } -} diff --git a/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.Designer.cs b/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.Designer.cs deleted file mode 100644 index 8c1f2c1..0000000 --- a/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.Designer.cs +++ /dev/null @@ -1,565 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20251029064620_InitConfigSafetyDb")] - partial class InitConfigSafetyDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.RobotConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("Height") - .HasColumnType("float") - .HasColumnName("Height"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("Length") - .HasColumnType("float") - .HasColumnName("Length"); - - b.Property("NavigationType") - .HasColumnType("int") - .HasColumnName("NavigationType"); - - b.Property("RadiusWheel") - .HasColumnType("float") - .HasColumnName("RadiusWheel"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("Width") - .HasColumnType("float") - .HasColumnName("Width"); - - b.HasKey("Id"); - - b.ToTable("RobotConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotPlcConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("PLCAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("PLCAddress"); - - b.Property("PLCPort") - .HasColumnType("int") - .HasColumnName("PLCPort"); - - b.Property("PLCUnitId") - .HasColumnType("tinyint") - .HasColumnName("PLCUnitId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotPlcConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSafetyConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SafetySpeedFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedFast"); - - b.Property("SafetySpeedMedium") - .HasColumnType("float") - .HasColumnName("SafetySpeedMedium"); - - b.Property("SafetySpeedNormal") - .HasColumnType("float") - .HasColumnName("SafetySpeedNormal"); - - b.Property("SafetySpeedOptimal") - .HasColumnType("float") - .HasColumnName("SafetySpeedOptimal"); - - b.Property("SafetySpeedSlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedSlow"); - - b.Property("SafetySpeedVeryFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedVeryFast"); - - b.Property("SafetySpeedVerySlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedVerySlow"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSafetyConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSimulationConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("EnableSimulation") - .HasColumnType("bit") - .HasColumnName("EnableSimulation"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SimulationAcceleration") - .HasColumnType("float") - .HasColumnName("SimulationAcceleration"); - - b.Property("SimulationDeceleration") - .HasColumnType("float") - .HasColumnName("SimulationDeceleration"); - - b.Property("SimulationMaxAngularVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxAngularVelocity"); - - b.Property("SimulationMaxVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxVelocity"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSimulationConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotVDA5050Config", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SerialNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("SerialNumber"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("VDA5050EnablePassword") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnablePassword"); - - b.Property("VDA5050EnableTls") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnableTls"); - - b.Property("VDA5050HostServer") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_HostServer"); - - b.Property("VDA5050Manufacturer") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Manufacturer"); - - b.Property("VDA5050Password") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Password"); - - b.Property("VDA5050Port") - .HasColumnType("int") - .HasColumnName("VDA5050_Port"); - - b.Property("VDA5050PublishRepeat") - .HasColumnType("int") - .HasColumnName("VDA5050_PublishRepeat"); - - b.Property("VDA5050UserName") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_UserName"); - - b.Property("VDA5050Version") - .HasMaxLength(20) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Version"); - - b.HasKey("Id"); - - b.ToTable("RobotVDA5050Config"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.cs b/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.cs deleted file mode 100644 index 4b36c6c..0000000 --- a/RobotApp/Data/Migrations/20251029064620_InitConfigSafetyDb.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class InitConfigSafetyDb : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "RobotSafetyConfig", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SafetySpeedVerySlow = table.Column(type: "float", nullable: false), - SafetySpeedSlow = table.Column(type: "float", nullable: false), - SafetySpeedNormal = table.Column(type: "float", nullable: false), - SafetySpeedMedium = table.Column(type: "float", nullable: false), - SafetySpeedOptimal = table.Column(type: "float", nullable: false), - SafetySpeedFast = table.Column(type: "float", nullable: false), - SafetySpeedVeryFast = table.Column(type: "float", nullable: false), - CreatedAt = table.Column(type: "datetime2", nullable: false), - UpdatedAt = table.Column(type: "datetime2", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), - Description = table.Column(type: "ntext", maxLength: 500, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RobotSafetyConfig", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RobotSafetyConfig"); - } - } -} diff --git a/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.Designer.cs b/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.Designer.cs deleted file mode 100644 index 30666a8..0000000 --- a/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.Designer.cs +++ /dev/null @@ -1,565 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20251029064649_InitConfigSafety1Db")] - partial class InitConfigSafety1Db - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.RobotConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("Height") - .HasColumnType("float") - .HasColumnName("Height"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("Length") - .HasColumnType("float") - .HasColumnName("Length"); - - b.Property("NavigationType") - .HasColumnType("int") - .HasColumnName("NavigationType"); - - b.Property("RadiusWheel") - .HasColumnType("float") - .HasColumnName("RadiusWheel"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("Width") - .HasColumnType("float") - .HasColumnName("Width"); - - b.HasKey("Id"); - - b.ToTable("RobotConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotPlcConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("PLCAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("PLCAddress"); - - b.Property("PLCPort") - .HasColumnType("int") - .HasColumnName("PLCPort"); - - b.Property("PLCUnitId") - .HasColumnType("tinyint") - .HasColumnName("PLCUnitId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotPlcConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSafetyConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SafetySpeedFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedFast"); - - b.Property("SafetySpeedMedium") - .HasColumnType("float") - .HasColumnName("SafetySpeedMedium"); - - b.Property("SafetySpeedNormal") - .HasColumnType("float") - .HasColumnName("SafetySpeedNormal"); - - b.Property("SafetySpeedOptimal") - .HasColumnType("float") - .HasColumnName("SafetySpeedOptimal"); - - b.Property("SafetySpeedSlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedSlow"); - - b.Property("SafetySpeedVeryFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedVeryFast"); - - b.Property("SafetySpeedVerySlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedVerySlow"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSafetyConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSimulationConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("EnableSimulation") - .HasColumnType("bit") - .HasColumnName("EnableSimulation"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SimulationAcceleration") - .HasColumnType("float") - .HasColumnName("SimulationAcceleration"); - - b.Property("SimulationDeceleration") - .HasColumnType("float") - .HasColumnName("SimulationDeceleration"); - - b.Property("SimulationMaxAngularVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxAngularVelocity"); - - b.Property("SimulationMaxVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxVelocity"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSimulationConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotVDA5050Config", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SerialNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("SerialNumber"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("VDA5050EnablePassword") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnablePassword"); - - b.Property("VDA5050EnableTls") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnableTls"); - - b.Property("VDA5050HostServer") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_HostServer"); - - b.Property("VDA5050Manufacturer") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Manufacturer"); - - b.Property("VDA5050Password") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Password"); - - b.Property("VDA5050Port") - .HasColumnType("int") - .HasColumnName("VDA5050_Port"); - - b.Property("VDA5050PublishRepeat") - .HasColumnType("int") - .HasColumnName("VDA5050_PublishRepeat"); - - b.Property("VDA5050UserName") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_UserName"); - - b.Property("VDA5050Version") - .HasMaxLength(20) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Version"); - - b.HasKey("Id"); - - b.ToTable("RobotVDA5050Config"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.cs b/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.cs deleted file mode 100644 index b42f975..0000000 --- a/RobotApp/Data/Migrations/20251029064649_InitConfigSafety1Db.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class InitConfigSafety1Db : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.Designer.cs b/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.Designer.cs deleted file mode 100644 index 8bda907..0000000 --- a/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.Designer.cs +++ /dev/null @@ -1,577 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20251031073231_UpdateVDA5050Config")] - partial class UpdateVDA5050Config - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.RobotConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("Height") - .HasColumnType("float") - .HasColumnName("Height"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("Length") - .HasColumnType("float") - .HasColumnName("Length"); - - b.Property("NavigationType") - .HasColumnType("int") - .HasColumnName("NavigationType"); - - b.Property("RadiusWheel") - .HasColumnType("float") - .HasColumnName("RadiusWheel"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("Width") - .HasColumnType("float") - .HasColumnName("Width"); - - b.HasKey("Id"); - - b.ToTable("RobotConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotPlcConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("PLCAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("PLCAddress"); - - b.Property("PLCPort") - .HasColumnType("int") - .HasColumnName("PLCPort"); - - b.Property("PLCUnitId") - .HasColumnType("tinyint") - .HasColumnName("PLCUnitId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotPlcConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSafetyConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SafetySpeedFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedFast"); - - b.Property("SafetySpeedMedium") - .HasColumnType("float") - .HasColumnName("SafetySpeedMedium"); - - b.Property("SafetySpeedNormal") - .HasColumnType("float") - .HasColumnName("SafetySpeedNormal"); - - b.Property("SafetySpeedOptimal") - .HasColumnType("float") - .HasColumnName("SafetySpeedOptimal"); - - b.Property("SafetySpeedSlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedSlow"); - - b.Property("SafetySpeedVeryFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedVeryFast"); - - b.Property("SafetySpeedVerySlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedVerySlow"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSafetyConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSimulationConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("EnableSimulation") - .HasColumnType("bit") - .HasColumnName("EnableSimulation"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SimulationAcceleration") - .HasColumnType("float") - .HasColumnName("SimulationAcceleration"); - - b.Property("SimulationDeceleration") - .HasColumnType("float") - .HasColumnName("SimulationDeceleration"); - - b.Property("SimulationMaxAngularVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxAngularVelocity"); - - b.Property("SimulationMaxVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxVelocity"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSimulationConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotVDA5050Config", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SerialNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("SerialNumber"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("VDA5050CA") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_CA"); - - b.Property("VDA5050Cer") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Cer"); - - b.Property("VDA5050EnablePassword") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnablePassword"); - - b.Property("VDA5050EnableTls") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnableTls"); - - b.Property("VDA5050HostServer") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_HostServer"); - - b.Property("VDA5050Manufacturer") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Manufacturer"); - - b.Property("VDA5050Password") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Password"); - - b.Property("VDA5050Port") - .HasColumnType("int") - .HasColumnName("VDA5050_Port"); - - b.Property("VDA5050PublishRepeat") - .HasColumnType("int") - .HasColumnName("VDA5050_PublishRepeat"); - - b.Property("VDA5050UserName") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_UserName"); - - b.Property("VDA5050Version") - .HasMaxLength(20) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Version"); - - b.Property("VDA5050_Key") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Key"); - - b.HasKey("Id"); - - b.ToTable("RobotVDA5050Config"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.cs b/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.cs deleted file mode 100644 index b525df1..0000000 --- a/RobotApp/Data/Migrations/20251031073231_UpdateVDA5050Config.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class UpdateVDA5050Config : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "VDA5050_CA", - table: "RobotVDA5050Config", - type: "nvarchar(64)", - nullable: true); - - migrationBuilder.AddColumn( - name: "VDA5050_Cer", - table: "RobotVDA5050Config", - type: "nvarchar(64)", - nullable: true); - - migrationBuilder.AddColumn( - name: "VDA5050_Key", - table: "RobotVDA5050Config", - type: "nvarchar(64)", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "VDA5050_CA", - table: "RobotVDA5050Config"); - - migrationBuilder.DropColumn( - name: "VDA5050_Cer", - table: "RobotVDA5050Config"); - - migrationBuilder.DropColumn( - name: "VDA5050_Key", - table: "RobotVDA5050Config"); - } - } -} diff --git a/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.Designer.cs b/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.Designer.cs deleted file mode 100644 index 2b495f6..0000000 --- a/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.Designer.cs +++ /dev/null @@ -1,577 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using RobotApp.Data; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20251031080648_UpdateVDA5050Config1")] - partial class UpdateVDA5050Config1 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.9"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ClaimType") - .HasColumnType("TEXT"); - - b.Property("ClaimValue") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("ProviderKey") - .HasColumnType("TEXT"); - - b.Property("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("TEXT"); - - b.Property("LoginProvider") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationRole", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("TEXT"); - - b.Property("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("PasswordHash") - .HasColumnType("TEXT"); - - b.Property("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("RobotApp.Data.RobotConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("Height") - .HasColumnType("float") - .HasColumnName("Height"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("Length") - .HasColumnType("float") - .HasColumnName("Length"); - - b.Property("NavigationType") - .HasColumnType("int") - .HasColumnName("NavigationType"); - - b.Property("RadiusWheel") - .HasColumnType("float") - .HasColumnName("RadiusWheel"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("Width") - .HasColumnType("float") - .HasColumnName("Width"); - - b.HasKey("Id"); - - b.ToTable("RobotConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotPlcConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("PLCAddress") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("PLCAddress"); - - b.Property("PLCPort") - .HasColumnType("int") - .HasColumnName("PLCPort"); - - b.Property("PLCUnitId") - .HasColumnType("tinyint") - .HasColumnName("PLCUnitId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotPlcConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSafetyConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SafetySpeedFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedFast"); - - b.Property("SafetySpeedMedium") - .HasColumnType("float") - .HasColumnName("SafetySpeedMedium"); - - b.Property("SafetySpeedNormal") - .HasColumnType("float") - .HasColumnName("SafetySpeedNormal"); - - b.Property("SafetySpeedOptimal") - .HasColumnType("float") - .HasColumnName("SafetySpeedOptimal"); - - b.Property("SafetySpeedSlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedSlow"); - - b.Property("SafetySpeedVeryFast") - .HasColumnType("float") - .HasColumnName("SafetySpeedVeryFast"); - - b.Property("SafetySpeedVerySlow") - .HasColumnType("float") - .HasColumnName("SafetySpeedVerySlow"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSafetyConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotSimulationConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("EnableSimulation") - .HasColumnType("bit") - .HasColumnName("EnableSimulation"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SimulationAcceleration") - .HasColumnType("float") - .HasColumnName("SimulationAcceleration"); - - b.Property("SimulationDeceleration") - .HasColumnType("float") - .HasColumnName("SimulationDeceleration"); - - b.Property("SimulationMaxAngularVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxAngularVelocity"); - - b.Property("SimulationMaxVelocity") - .HasColumnType("float") - .HasColumnName("SimulationMaxVelocity"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.HasKey("Id"); - - b.ToTable("RobotSimulationConfig"); - }); - - modelBuilder.Entity("RobotApp.Data.RobotVDA5050Config", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasColumnName("Id"); - - b.Property("ConfigName") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("ConfigName"); - - b.Property("CreatedAt") - .HasColumnType("datetime2") - .HasColumnName("CreatedAt"); - - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("ntext") - .HasColumnName("Description"); - - b.Property("IsActive") - .HasColumnType("bit") - .HasColumnName("IsActive"); - - b.Property("SerialNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("SerialNumber"); - - b.Property("UpdatedAt") - .HasColumnType("datetime2") - .HasColumnName("UpdatedAt"); - - b.Property("VDA5050CA") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_CA"); - - b.Property("VDA5050Cer") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Cer"); - - b.Property("VDA5050EnablePassword") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnablePassword"); - - b.Property("VDA5050EnableTls") - .HasColumnType("bit") - .HasColumnName("VDA5050_EnableTls"); - - b.Property("VDA5050HostServer") - .HasMaxLength(100) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_HostServer"); - - b.Property("VDA5050Key") - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Key"); - - b.Property("VDA5050Manufacturer") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Manufacturer"); - - b.Property("VDA5050Password") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Password"); - - b.Property("VDA5050Port") - .HasColumnType("int") - .HasColumnName("VDA5050_Port"); - - b.Property("VDA5050PublishRepeat") - .HasColumnType("int") - .HasColumnName("VDA5050_PublishRepeat"); - - b.Property("VDA5050UserName") - .HasMaxLength(50) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_UserName"); - - b.Property("VDA5050Version") - .HasMaxLength(20) - .HasColumnType("nvarchar(64)") - .HasColumnName("VDA5050_Version"); - - b.HasKey("Id"); - - b.ToTable("RobotVDA5050Config"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("RobotApp.Data.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("RobotApp.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.cs b/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.cs deleted file mode 100644 index 642bbb3..0000000 --- a/RobotApp/Data/Migrations/20251031080648_UpdateVDA5050Config1.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class UpdateVDA5050Config1 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.cs b/RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.cs deleted file mode 100644 index 6d8d20b..0000000 --- a/RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace RobotApp.Data.Migrations -{ - /// - public partial class UpdateVDA5050St : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "VDA5050_TopicPrefix", - table: "RobotVDA5050Config", - type: "nvarchar(64)", - maxLength: 64, - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "VDA5050_TopicPrefix", - table: "RobotVDA5050Config"); - } - } -} diff --git a/RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.Designer.cs b/RobotApp/Data/Migrations/20251222025151_InitApplicationDb.Designer.cs similarity index 99% rename from RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.Designer.cs rename to RobotApp/Data/Migrations/20251222025151_InitApplicationDb.Designer.cs index aa834e1..9ebf882 100644 --- a/RobotApp/Data/Migrations/20251106025457_UpdateVDA5050St.Designer.cs +++ b/RobotApp/Data/Migrations/20251222025151_InitApplicationDb.Designer.cs @@ -11,8 +11,8 @@ using RobotApp.Data; namespace RobotApp.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20251106025457_UpdateVDA5050St")] - partial class UpdateVDA5050St + [Migration("20251222025151_InitApplicationDb")] + partial class InitApplicationDb { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/RobotApp/Data/Migrations/20251222025151_InitApplicationDb.cs b/RobotApp/Data/Migrations/20251222025151_InitApplicationDb.cs new file mode 100644 index 0000000..4ab5aac --- /dev/null +++ b/RobotApp/Data/Migrations/20251222025151_InitApplicationDb.cs @@ -0,0 +1,351 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace RobotApp.Data.Migrations +{ + /// + public partial class InitApplicationDb : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", maxLength: 256, nullable: true), + NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + UserName = table.Column(type: "TEXT", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "TEXT", maxLength: 256, nullable: true), + Email = table.Column(type: "TEXT", maxLength: 256, nullable: true), + NormalizedEmail = table.Column(type: "TEXT", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "INTEGER", nullable: false), + PasswordHash = table.Column(type: "TEXT", nullable: true), + SecurityStamp = table.Column(type: "TEXT", nullable: true), + ConcurrencyStamp = table.Column(type: "TEXT", nullable: true), + PhoneNumber = table.Column(type: "TEXT", nullable: true), + PhoneNumberConfirmed = table.Column(type: "INTEGER", nullable: false), + TwoFactorEnabled = table.Column(type: "INTEGER", nullable: false), + LockoutEnd = table.Column(type: "TEXT", nullable: true), + LockoutEnabled = table.Column(type: "INTEGER", nullable: false), + AccessFailedCount = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RobotConfig", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + NavigationType = table.Column(type: "int", nullable: false), + RadiusWheel = table.Column(type: "float", nullable: false), + Width = table.Column(type: "float", nullable: false), + Length = table.Column(type: "float", nullable: false), + Height = table.Column(type: "float", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + Description = table.Column(type: "ntext", maxLength: 500, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RobotConfig", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RobotPlcConfig", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PLCAddress = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), + PLCPort = table.Column(type: "int", nullable: false), + PLCUnitId = table.Column(type: "tinyint", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + Description = table.Column(type: "ntext", maxLength: 500, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RobotPlcConfig", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RobotSafetyConfig", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SafetySpeedVerySlow = table.Column(type: "float", nullable: false), + SafetySpeedSlow = table.Column(type: "float", nullable: false), + SafetySpeedNormal = table.Column(type: "float", nullable: false), + SafetySpeedMedium = table.Column(type: "float", nullable: false), + SafetySpeedOptimal = table.Column(type: "float", nullable: false), + SafetySpeedFast = table.Column(type: "float", nullable: false), + SafetySpeedVeryFast = table.Column(type: "float", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + Description = table.Column(type: "ntext", maxLength: 500, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RobotSafetyConfig", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RobotSimulationConfig", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + EnableSimulation = table.Column(type: "bit", nullable: false), + SimulationMaxVelocity = table.Column(type: "float", nullable: false), + SimulationMaxAngularVelocity = table.Column(type: "float", nullable: false), + SimulationAcceleration = table.Column(type: "float", nullable: false), + SimulationDeceleration = table.Column(type: "float", nullable: false), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + Description = table.Column(type: "ntext", maxLength: 500, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RobotSimulationConfig", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RobotVDA5050Config", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SerialNumber = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), + VDA5050_HostServer = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + VDA5050_Port = table.Column(type: "int", nullable: false), + VDA5050_UserName = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), + VDA5050_Password = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), + VDA5050_Manufacturer = table.Column(type: "nvarchar(64)", maxLength: 50, nullable: true), + VDA5050_Version = table.Column(type: "nvarchar(64)", maxLength: 20, nullable: true), + VDA5050_TopicPrefix = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + VDA5050_PublishRepeat = table.Column(type: "int", nullable: false), + VDA5050_EnablePassword = table.Column(type: "bit", nullable: false), + VDA5050_EnableTls = table.Column(type: "bit", nullable: false), + VDA5050_CA = table.Column(type: "nvarchar(64)", nullable: true), + VDA5050_Cer = table.Column(type: "nvarchar(64)", nullable: true), + VDA5050_Key = table.Column(type: "nvarchar(64)", nullable: true), + CreatedAt = table.Column(type: "datetime2", nullable: false), + UpdatedAt = table.Column(type: "datetime2", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + ConfigName = table.Column(type: "nvarchar(64)", maxLength: 100, nullable: true), + Description = table.Column(type: "ntext", maxLength: 500, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RobotVDA5050Config", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RoleId = table.Column(type: "TEXT", nullable: false), + ClaimType = table.Column(type: "TEXT", nullable: true), + ClaimValue = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + UserId = table.Column(type: "TEXT", nullable: false), + ClaimType = table.Column(type: "TEXT", nullable: true), + ClaimValue = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column(type: "TEXT", nullable: false), + ProviderKey = table.Column(type: "TEXT", nullable: false), + ProviderDisplayName = table.Column(type: "TEXT", nullable: true), + UserId = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column(type: "TEXT", nullable: false), + RoleId = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "TEXT", nullable: false), + LoginProvider = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: false), + Value = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "RobotConfig"); + + migrationBuilder.DropTable( + name: "RobotPlcConfig"); + + migrationBuilder.DropTable( + name: "RobotSafetyConfig"); + + migrationBuilder.DropTable( + name: "RobotSimulationConfig"); + + migrationBuilder.DropTable( + name: "RobotVDA5050Config"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "AspNetUsers"); + } + } +} diff --git a/RobotApp/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/RobotApp/Data/Migrations/ApplicationDbContextModelSnapshot.cs index 7616c0d..6b887cb 100644 --- a/RobotApp/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/RobotApp/Data/Migrations/ApplicationDbContextModelSnapshot.cs @@ -7,7 +7,7 @@ using RobotApp.Data; #nullable disable -namespace RobotApp.Migrations +namespace RobotApp.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot diff --git a/RobotApp/Hubs/RobotHub.cs b/RobotApp/Hubs/RobotHub.cs index b10bca8..0ab9023 100644 --- a/RobotApp/Hubs/RobotHub.cs +++ b/RobotApp/Hubs/RobotHub.cs @@ -11,7 +11,6 @@ namespace RobotApp.Hubs public async Task JoinRobot(string serialNumber) { await Groups.AddToGroupAsync(Context.ConnectionId, serialNumber); - Console.WriteLine($"Client {Context.ConnectionId} joined robot group: {serialNumber}"); } public async Task LeaveRobot(string serialNumber) diff --git a/RobotApp/RobotApp.csproj b/RobotApp/RobotApp.csproj index 38962ca..ef7c9c1 100644 --- a/RobotApp/RobotApp.csproj +++ b/RobotApp/RobotApp.csproj @@ -39,6 +39,7 @@ + diff --git a/RobotApp/robot.db b/RobotApp/robot.db index b198f6405c22e45af6b6963bfee2cdb42da99b90..95eba7cf2d609b737aceedf9c866493b567d9190 100644 GIT binary patch delta 1735 zcmd^9Uuaup6u;-o^(MKwH}|G(n)Lt8zcx+M?B=GOYhBxPX;-qYN!vM;>8MpQjdW{l z3(7X3n&QN+)o@|Q4d%)w3W^{rl0C@OJ=HN*C}U%=`l3E4A_!6+_E5hh`eG~kD0uk} z-?``eopboU^E+p5nV(xWhYpP%%*>{hV^h<|CuWr>BQu0BF-2h*hEVZQ`SY{qLz+sh z;gc^tLTyCaES`9!htj5aj~^AjG&c$t<JSeaE?@K8S+5_8d)KC#Dt#=fg8-_P~Q&0`#?I( z_)aU-V}1ynEI&WV;c6?m^*y{F8$ICB&+=Y;G6*(2yFhqM2B8iw2Iw_Pzo8)2J_~>! zGeKz5&sbzkFAy0|2B_yvixtlWp$C5rLI5`cG_N%XRYlFO=Y&dQBKi2h;J}!EUg#%B zS-j(>c|k1Y?bfG64o@wR04{pKR18?Ra!2$LW0jpgd8Kew{$BEFZJMU2T31K3OH;$q zNVKzaPkT^RyHr)AD3I z(f@2`SPggbCC>+p^kBs{vM%{NhGFwRIf^Tg-D%EJ*J`!?ApG_h zYHS!Tz!(_+h8l7{zk3^9j1@Z&V@CpQC&rEhGW|1QFkQNmF zB0pqWHQEhLPN*Q=F2~jdxk75$M(1cnN5>Q9I?09JyT+moV z9U#56xVA`|^%QZk4Y|ge!Yd(Y*l`a0%W~&bJKB~=2%LqUC6WU}j;TV<3n6gm*I6eH zdEt3nUn2GTxKYIG^Z;XRAn4;}Gs-Q%qT+*NWTX;5S|F`ZjT;_1Q!235MI+etH%%cN z_d+wCcR?F&xnO&knQiQ~RGe|jMn@z9i%;RH7_`!1Qkr?!V(>2D{WyJ$*gkjzFYTk9 z{&JjV&Gyl`h;dqjl6LJ6&4{-Sz=uG)ZMoQOGVQjjbF6%Y%_?PCmg@!6X-4`&{89W^ z;4NQU2KamYA@iDf#PqZ2^omV>+C;K098hRceE6aQ2SLGtLJQ)-`wH~@M=0T_6d3{HA=^pnVm($^{_&91q@UZkuTvkDb1oHV$bR*G*IZ=rl8(xYKmTbtgaKA9bglPHg{ZlTJK+++6`e zJREj(rQLJBd-glu-96{()Me$V%c_=

R6K>rV|e0p$m>Z!2`rL z*NInZi%j}~LHI5QDupj=luH*naXY|$41C>(cTn2-KDAtDwSw~@SnB}|K$DMq&;x4M z#XaQ#H5*Np@P-G_X8uG@KM)OvTQn*?ItQs=C%y z?L|w`>IA1^>B%*VBTZ?f)-11N>7}Zn!2os$&ruA4#1k%3)za_JD82OikgAa7brl{` z#yqxJT_&Bl!kNTG=4dWBjUIz!EXU{4Q+y_sn&pe1lvP+PKFKGc-T-z9uc*sKt%bML zJ<1cLl>59#0Gf@t8-)qY?sd7psHt9OS?0U=drcEA-&up+z;g4O+Ix({W@X)a*52lF zwb|UQZnu+lvz}&_ZDUytLMiAajQJz;7ITqFGG0bae?%{#m-AJ6u2DgRbavM6vf0oS zyUXeFj74X}H23xRU95{8$#Jc0E7vS1M)Ek;VPn0l+vzRF1v1mA^tep|H_3>h0@&lQ zJ8YYQ5q7SXYbsd<+c^~1?c~Nn)9GA3;7BaR=T6#s;!NenIr&SUND2JAA_NDzS) zsMp5Yy*Aex=rX7}ffF7H#d3C(KI=tkrP0lo{mlSn%@!SFfh>>I2_^aITsn7hBypIZ zib>>DlF)ZC=FiN#%&W{vW|(Pa2>LD(`aOEiK!m{Kbyk>&kv!z_63ZKjp#pA8b!7z@ z(rRu?VM`i_!R2s|(Uhzu0xPJ^LK{ni7mfx-Sf{!@(k6yZN+$`ynzkIy^qV9XulxW!mZ zL{!NoQ+Ag(=CN`%&SiD7tiu|QJKWY}EMZUauDI9EajHeo{lD5v5mE-22N?4J&A!K! zY6(*@jVqCvg@`;#BD$4mJb{MTDXW&RMVol7L!)BN`HD@AY!n(IUSz67W5>!ldRAUz zE*&DxWmo`XI_Ma^OMO)BRQ^W!lKi^-*^=LuoF@t58vY0T6`;d@js+I{I()_qzv{*7 zfec>t;$dKd550IDD1l`h-bu`3jqoz6`M@le{yCU#2VVG0CvJhSw}V-kt3jp<8R0b_ zUL!oxl#!;>2kV8;)CSNfRBMvLbxoDfOex`Y2cU!tn)(ur$`Ucc{x)C%4e)pyFarbp zofn0#Uu|^b`Fq^)01NEz!Zq+72U2)fozx*o<2T1D38H7(%4X6Rs3LjBn;aikmXjV5>h^=xUHYGOI;DJ%8x1bEWs-(6m z?pUh86HA&7{5t>-5yB9$TaYtWfu=u%9ecogSILOhz+gu(<~02u`Xo(ho~M39&7#$M zLEbI<7j{JU2H8&hTPW4`sh%gDa-GcvE;wMO1F5$|@PqQDpLBq40GRCr$Ka0}!1q84 z{A(x5oazE~&?bJhbpkVC@q2_)SvOg6HtU9Wji43nAN*j);$317jt5-ukRG%wJlsX> z3ONwRUb6IT&<-y+fg5NS{eZ@0?KYWi&?2sK#lqbZ!KkPtnfYc`h|0`>7Ktn_$TCRf zJu50pFrTWN)XYEKDs(FhKrO+JDP9A_X<&s1?I=10=i2eT_+$&bZv*u}1^?TIhd?u& zupy^Xbn2kK4JY9{Hn0axYZ5(`FWW#hP^@|#_;VIG&H^Wpui8jB!QpE7Qx31Y5@D}I zwCHmwLV;cAm3+V~L`vQ~MCxULzK_xO(JS*8dhQGZN~4NsP^rLzy3;O9(XY@sS*OS2 z;^J18OK?`Fhvlp>r-Qe89kB$T|+71){+GnPy zi>+IgZFeWlRS?nYG+)OQidz_SlcqKAQ=d^kP`#l_D{divZ!7lAS2W6XJ|8$2$cdZK zH94by1%+I1=2n0OP0?SGO^l|~ zN9*M}hXc%)ZozMMlUa?Mvnt$7aB0Gy->6K{3d7do6xO_$LBU?XISnY|R>Uc8crx^y YdlNoMq1_vUhBM>oX(ZG3+9Ig?KWS_~bpQYW