< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 1657
Coverable lines: 1657
Total lines: 1809
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%210%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%210%

File(s)

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Migrations/20250218225237_InitialCreate.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 4
 5#nullable disable
 6
 7#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
 8
 9namespace LGDXRobotCloud.Data.Migrations
 10{
 11    /// <inheritdoc />
 12    public partial class InitialCreate : Migration
 13    {
 14        /// <inheritdoc />
 15        protected override void Up(MigrationBuilder migrationBuilder)
 016        {
 017            migrationBuilder.CreateTable(
 018                name: "Administration.ApiKeys",
 019                columns: table => new
 020                {
 021                    Id = table.Column<int>(type: "integer", nullable: false)
 022                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 023                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
 024                    Secret = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
 025                    IsThirdParty = table.Column<bool>(type: "boolean", nullable: false)
 026                },
 027                constraints: table =>
 028                {
 029                    table.PrimaryKey("PK_Administration.ApiKeys", x => x.Id);
 030                });
 31
 032            migrationBuilder.CreateTable(
 033                name: "AspNetRoles",
 034                columns: table => new
 035                {
 036                    Id = table.Column<string>(type: "text", nullable: false),
 037                    Description = table.Column<string>(type: "text", nullable: true),
 038                    Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
 039                    NormalizedName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true
 040                    ConcurrencyStamp = table.Column<string>(type: "text", nullable: true)
 041                },
 042                constraints: table =>
 043                {
 044                    table.PrimaryKey("PK_AspNetRoles", x => x.Id);
 045                });
 46
 047            migrationBuilder.CreateTable(
 048                name: "AspNetUsers",
 049                columns: table => new
 050                {
 051                    Id = table.Column<string>(type: "text", nullable: false),
 052                    Name = table.Column<string>(type: "text", nullable: true),
 053                    RefreshTokenHash = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true
 054                    UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
 055                    NormalizedUserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: 
 056                    Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
 057                    NormalizedEmail = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: tru
 058                    EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false),
 059                    PasswordHash = table.Column<string>(type: "text", nullable: true),
 060                    SecurityStamp = table.Column<string>(type: "text", nullable: true),
 061                    ConcurrencyStamp = table.Column<string>(type: "text", nullable: true),
 062                    PhoneNumber = table.Column<string>(type: "text", nullable: true),
 063                    PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false),
 064                    TwoFactorEnabled = table.Column<bool>(type: "boolean", nullable: false),
 065                    LockoutEnd = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
 066                    LockoutEnabled = table.Column<bool>(type: "boolean", nullable: false),
 067                    AccessFailedCount = table.Column<int>(type: "integer", nullable: false)
 068                },
 069                constraints: table =>
 070                {
 071                    table.PrimaryKey("PK_AspNetUsers", x => x.Id);
 072                });
 73
 074            migrationBuilder.CreateTable(
 075                name: "Automation.Flows",
 076                columns: table => new
 077                {
 078                    Id = table.Column<int>(type: "integer", nullable: false)
 079                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 080                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false)
 081                },
 082                constraints: table =>
 083                {
 084                    table.PrimaryKey("PK_Automation.Flows", x => x.Id);
 085                });
 86
 087            migrationBuilder.CreateTable(
 088                name: "Automation.Progresses",
 089                columns: table => new
 090                {
 091                    Id = table.Column<int>(type: "integer", nullable: false)
 092                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 093                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
 094                    System = table.Column<bool>(type: "boolean", nullable: false),
 095                    Reserved = table.Column<bool>(type: "boolean", nullable: false)
 096                },
 097                constraints: table =>
 098                {
 099                    table.PrimaryKey("PK_Automation.Progresses", x => x.Id);
 0100                });
 101
 0102            migrationBuilder.CreateTable(
 0103                name: "Navigation.Realms",
 0104                columns: table => new
 0105                {
 0106                    Id = table.Column<int>(type: "integer", nullable: false)
 0107                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0108                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
 0109                    Description = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
 0110                    Image = table.Column<byte[]>(type: "bytea", nullable: false),
 0111                    Resolution = table.Column<double>(type: "double precision", nullable: false),
 0112                    OriginX = table.Column<double>(type: "double precision", nullable: false),
 0113                    OriginY = table.Column<double>(type: "double precision", nullable: false),
 0114                    OriginRotation = table.Column<double>(type: "double precision", nullable: false)
 0115                },
 0116                constraints: table =>
 0117                {
 0118                    table.PrimaryKey("PK_Navigation.Realms", x => x.Id);
 0119                });
 120
 0121            migrationBuilder.CreateTable(
 0122                name: "Automation.Triggers",
 0123                columns: table => new
 0124                {
 0125                    Id = table.Column<int>(type: "integer", nullable: false)
 0126                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0127                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
 0128                    Url = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
 0129                    HttpMethodId = table.Column<int>(type: "integer", nullable: false),
 0130                    Body = table.Column<string>(type: "text", nullable: true),
 0131                    SkipOnFailure = table.Column<bool>(type: "boolean", nullable: false),
 0132                    ApiKeyInsertLocationId = table.Column<int>(type: "integer", nullable: true),
 0133                    ApiKeyFieldName = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true)
 0134                    ApiKeyId = table.Column<int>(type: "integer", nullable: true)
 0135                },
 0136                constraints: table =>
 0137                {
 0138                    table.PrimaryKey("PK_Automation.Triggers", x => x.Id);
 0139                    table.ForeignKey(
 0140                        name: "FK_Automation.Triggers_Administration.ApiKeys_ApiKeyId",
 0141                        column: x => x.ApiKeyId,
 0142                        principalTable: "Administration.ApiKeys",
 0143                        principalColumn: "Id",
 0144                        onDelete: ReferentialAction.SetNull);
 0145                });
 146
 0147            migrationBuilder.CreateTable(
 0148                name: "AspNetRoleClaims",
 0149                columns: table => new
 0150                {
 0151                    Id = table.Column<int>(type: "integer", nullable: false)
 0152                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0153                    RoleId = table.Column<string>(type: "text", nullable: false),
 0154                    ClaimType = table.Column<string>(type: "text", nullable: true),
 0155                    ClaimValue = table.Column<string>(type: "text", nullable: true)
 0156                },
 0157                constraints: table =>
 0158                {
 0159                    table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
 0160                    table.ForeignKey(
 0161                        name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
 0162                        column: x => x.RoleId,
 0163                        principalTable: "AspNetRoles",
 0164                        principalColumn: "Id",
 0165                        onDelete: ReferentialAction.Cascade);
 0166                });
 167
 0168            migrationBuilder.CreateTable(
 0169                name: "AspNetUserClaims",
 0170                columns: table => new
 0171                {
 0172                    Id = table.Column<int>(type: "integer", nullable: false)
 0173                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0174                    UserId = table.Column<string>(type: "text", nullable: false),
 0175                    ClaimType = table.Column<string>(type: "text", nullable: true),
 0176                    ClaimValue = table.Column<string>(type: "text", nullable: true)
 0177                },
 0178                constraints: table =>
 0179                {
 0180                    table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
 0181                    table.ForeignKey(
 0182                        name: "FK_AspNetUserClaims_AspNetUsers_UserId",
 0183                        column: x => x.UserId,
 0184                        principalTable: "AspNetUsers",
 0185                        principalColumn: "Id",
 0186                        onDelete: ReferentialAction.Cascade);
 0187                });
 188
 0189            migrationBuilder.CreateTable(
 0190                name: "AspNetUserLogins",
 0191                columns: table => new
 0192                {
 0193                    LoginProvider = table.Column<string>(type: "text", nullable: false),
 0194                    ProviderKey = table.Column<string>(type: "text", nullable: false),
 0195                    ProviderDisplayName = table.Column<string>(type: "text", nullable: true),
 0196                    UserId = table.Column<string>(type: "text", nullable: false)
 0197                },
 0198                constraints: table =>
 0199                {
 0200                    table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
 0201                    table.ForeignKey(
 0202                        name: "FK_AspNetUserLogins_AspNetUsers_UserId",
 0203                        column: x => x.UserId,
 0204                        principalTable: "AspNetUsers",
 0205                        principalColumn: "Id",
 0206                        onDelete: ReferentialAction.Cascade);
 0207                });
 208
 0209            migrationBuilder.CreateTable(
 0210                name: "AspNetUserRoles",
 0211                columns: table => new
 0212                {
 0213                    UserId = table.Column<string>(type: "text", nullable: false),
 0214                    RoleId = table.Column<string>(type: "text", nullable: false)
 0215                },
 0216                constraints: table =>
 0217                {
 0218                    table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
 0219                    table.ForeignKey(
 0220                        name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
 0221                        column: x => x.RoleId,
 0222                        principalTable: "AspNetRoles",
 0223                        principalColumn: "Id",
 0224                        onDelete: ReferentialAction.Cascade);
 0225                    table.ForeignKey(
 0226                        name: "FK_AspNetUserRoles_AspNetUsers_UserId",
 0227                        column: x => x.UserId,
 0228                        principalTable: "AspNetUsers",
 0229                        principalColumn: "Id",
 0230                        onDelete: ReferentialAction.Cascade);
 0231                });
 232
 0233            migrationBuilder.CreateTable(
 0234                name: "AspNetUserTokens",
 0235                columns: table => new
 0236                {
 0237                    UserId = table.Column<string>(type: "text", nullable: false),
 0238                    LoginProvider = table.Column<string>(type: "text", nullable: false),
 0239                    Name = table.Column<string>(type: "text", nullable: false),
 0240                    Value = table.Column<string>(type: "text", nullable: true)
 0241                },
 0242                constraints: table =>
 0243                {
 0244                    table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
 0245                    table.ForeignKey(
 0246                        name: "FK_AspNetUserTokens_AspNetUsers_UserId",
 0247                        column: x => x.UserId,
 0248                        principalTable: "AspNetUsers",
 0249                        principalColumn: "Id",
 0250                        onDelete: ReferentialAction.Cascade);
 0251                });
 252
 0253            migrationBuilder.CreateTable(
 0254                name: "Navigation.Robots",
 0255                columns: table => new
 0256                {
 0257                    Id = table.Column<Guid>(type: "uuid", nullable: false),
 0258                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
 0259                    RealmId = table.Column<int>(type: "integer", nullable: false),
 0260                    IsRealtimeExchange = table.Column<bool>(type: "boolean", nullable: false),
 0261                    IsProtectingHardwareSerialNumber = table.Column<bool>(type: "boolean", nullable: false)
 0262                },
 0263                constraints: table =>
 0264                {
 0265                    table.PrimaryKey("PK_Navigation.Robots", x => x.Id);
 0266                    table.ForeignKey(
 0267                        name: "FK_Navigation.Robots_Navigation.Realms_RealmId",
 0268                        column: x => x.RealmId,
 0269                        principalTable: "Navigation.Realms",
 0270                        principalColumn: "Id",
 0271                        onDelete: ReferentialAction.Restrict);
 0272                });
 273
 0274            migrationBuilder.CreateTable(
 0275                name: "Navigation.Waypoints",
 0276                columns: table => new
 0277                {
 0278                    Id = table.Column<int>(type: "integer", nullable: false)
 0279                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0280                    Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 0281                    RealmId = table.Column<int>(type: "integer", nullable: false),
 0282                    X = table.Column<double>(type: "double precision", nullable: false),
 0283                    Y = table.Column<double>(type: "double precision", nullable: false),
 0284                    Rotation = table.Column<double>(type: "double precision", nullable: false),
 0285                    IsParking = table.Column<bool>(type: "boolean", nullable: false),
 0286                    HasCharger = table.Column<bool>(type: "boolean", nullable: false),
 0287                    IsReserved = table.Column<bool>(type: "boolean", nullable: false)
 0288                },
 0289                constraints: table =>
 0290                {
 0291                    table.PrimaryKey("PK_Navigation.Waypoints", x => x.Id);
 0292                    table.ForeignKey(
 0293                        name: "FK_Navigation.Waypoints_Navigation.Realms_RealmId",
 0294                        column: x => x.RealmId,
 0295                        principalTable: "Navigation.Realms",
 0296                        principalColumn: "Id",
 0297                        onDelete: ReferentialAction.Restrict);
 0298                });
 299
 0300            migrationBuilder.CreateTable(
 0301                name: "Automation.FlowDetails",
 0302                columns: table => new
 0303                {
 0304                    Id = table.Column<int>(type: "integer", nullable: false)
 0305                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0306                    Order = table.Column<int>(type: "integer", nullable: false),
 0307                    ProgressId = table.Column<int>(type: "integer", nullable: false),
 0308                    AutoTaskNextControllerId = table.Column<int>(type: "integer", nullable: false),
 0309                    TriggerId = table.Column<int>(type: "integer", nullable: true),
 0310                    FlowId = table.Column<int>(type: "integer", nullable: false)
 0311                },
 0312                constraints: table =>
 0313                {
 0314                    table.PrimaryKey("PK_Automation.FlowDetails", x => x.Id);
 0315                    table.ForeignKey(
 0316                        name: "FK_Automation.FlowDetails_Automation.Flows_FlowId",
 0317                        column: x => x.FlowId,
 0318                        principalTable: "Automation.Flows",
 0319                        principalColumn: "Id",
 0320                        onDelete: ReferentialAction.Cascade);
 0321                    table.ForeignKey(
 0322                        name: "FK_Automation.FlowDetails_Automation.Progresses_ProgressId",
 0323                        column: x => x.ProgressId,
 0324                        principalTable: "Automation.Progresses",
 0325                        principalColumn: "Id",
 0326                        onDelete: ReferentialAction.Restrict);
 0327                    table.ForeignKey(
 0328                        name: "FK_Automation.FlowDetails_Automation.Triggers_TriggerId",
 0329                        column: x => x.TriggerId,
 0330                        principalTable: "Automation.Triggers",
 0331                        principalColumn: "Id",
 0332                        onDelete: ReferentialAction.Restrict);
 0333                });
 334
 0335            migrationBuilder.CreateTable(
 0336                name: "Automation.AutoTasks",
 0337                columns: table => new
 0338                {
 0339                    Id = table.Column<int>(type: "integer", nullable: false)
 0340                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0341                    Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
 0342                    Priority = table.Column<int>(type: "integer", nullable: false),
 0343                    FlowId = table.Column<int>(type: "integer", nullable: true),
 0344                    RealmId = table.Column<int>(type: "integer", nullable: false),
 0345                    AssignedRobotId = table.Column<Guid>(type: "uuid", nullable: true),
 0346                    CurrentProgressId = table.Column<int>(type: "integer", nullable: false),
 0347                    CurrentProgressOrder = table.Column<int>(type: "integer", nullable: true),
 0348                    NextToken = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true)
 0349                },
 0350                constraints: table =>
 0351                {
 0352                    table.PrimaryKey("PK_Automation.AutoTasks", x => x.Id);
 0353                    table.ForeignKey(
 0354                        name: "FK_Automation.AutoTasks_Automation.Flows_FlowId",
 0355                        column: x => x.FlowId,
 0356                        principalTable: "Automation.Flows",
 0357                        principalColumn: "Id",
 0358                        onDelete: ReferentialAction.SetNull);
 0359                    table.ForeignKey(
 0360                        name: "FK_Automation.AutoTasks_Automation.Progresses_CurrentProgressId",
 0361                        column: x => x.CurrentProgressId,
 0362                        principalTable: "Automation.Progresses",
 0363                        principalColumn: "Id",
 0364                        onDelete: ReferentialAction.Restrict);
 0365                    table.ForeignKey(
 0366                        name: "FK_Automation.AutoTasks_Navigation.Realms_RealmId",
 0367                        column: x => x.RealmId,
 0368                        principalTable: "Navigation.Realms",
 0369                        principalColumn: "Id",
 0370                        onDelete: ReferentialAction.Cascade);
 0371                    table.ForeignKey(
 0372                        name: "FK_Automation.AutoTasks_Navigation.Robots_AssignedRobotId",
 0373                        column: x => x.AssignedRobotId,
 0374                        principalTable: "Navigation.Robots",
 0375                        principalColumn: "Id",
 0376                        onDelete: ReferentialAction.SetNull);
 0377                });
 378
 0379            migrationBuilder.CreateTable(
 0380                name: "Navigation.RobotCertificates",
 0381                columns: table => new
 0382                {
 0383                    Id = table.Column<Guid>(type: "uuid", nullable: false),
 0384                    Thumbprint = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
 0385                    ThumbprintBackup = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true
 0386                    NotBefore = table.Column<DateTime>(type: "timestamp(0) with time zone", precision: 0, nullable: fals
 0387                    NotAfter = table.Column<DateTime>(type: "timestamp(0) with time zone", precision: 0, nullable: false
 0388                    RobotId = table.Column<Guid>(type: "uuid", nullable: false)
 0389                },
 0390                constraints: table =>
 0391                {
 0392                    table.PrimaryKey("PK_Navigation.RobotCertificates", x => x.Id);
 0393                    table.ForeignKey(
 0394                        name: "FK_Navigation.RobotCertificates_Navigation.Robots_RobotId",
 0395                        column: x => x.RobotId,
 0396                        principalTable: "Navigation.Robots",
 0397                        principalColumn: "Id",
 0398                        onDelete: ReferentialAction.Cascade);
 0399                });
 400
 0401            migrationBuilder.CreateTable(
 0402                name: "Navigation.RobotChassisInfos",
 0403                columns: table => new
 0404                {
 0405                    Id = table.Column<int>(type: "integer", nullable: false)
 0406                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0407                    RobotTypeId = table.Column<int>(type: "integer", nullable: false),
 0408                    ChassisLengthX = table.Column<double>(type: "double precision", nullable: false),
 0409                    ChassisLengthY = table.Column<double>(type: "double precision", nullable: false),
 0410                    ChassisWheelCount = table.Column<int>(type: "integer", nullable: false),
 0411                    ChassisWheelRadius = table.Column<double>(type: "double precision", nullable: false),
 0412                    BatteryCount = table.Column<int>(type: "integer", nullable: false),
 0413                    BatteryMaxVoltage = table.Column<double>(type: "double precision", nullable: false),
 0414                    BatteryMinVoltage = table.Column<double>(type: "double precision", nullable: false),
 0415                    RobotId = table.Column<Guid>(type: "uuid", nullable: false)
 0416                },
 0417                constraints: table =>
 0418                {
 0419                    table.PrimaryKey("PK_Navigation.RobotChassisInfos", x => x.Id);
 0420                    table.ForeignKey(
 0421                        name: "FK_Navigation.RobotChassisInfos_Navigation.Robots_RobotId",
 0422                        column: x => x.RobotId,
 0423                        principalTable: "Navigation.Robots",
 0424                        principalColumn: "Id",
 0425                        onDelete: ReferentialAction.Cascade);
 0426                });
 427
 0428            migrationBuilder.CreateTable(
 0429                name: "Navigation.RobotSystemInfos",
 0430                columns: table => new
 0431                {
 0432                    Id = table.Column<int>(type: "integer", nullable: false)
 0433                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0434                    Cpu = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 0435                    IsLittleEndian = table.Column<bool>(type: "boolean", nullable: false),
 0436                    Motherboard = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 0437                    MotherboardSerialNumber = table.Column<string>(type: "character varying(100)", maxLength: 100, nulla
 0438                    RamMiB = table.Column<int>(type: "integer", nullable: false),
 0439                    Gpu = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
 0440                    Os = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
 0441                    Is32Bit = table.Column<bool>(type: "boolean", nullable: false),
 0442                    McuSerialNumber = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: tru
 0443                    RobotId = table.Column<Guid>(type: "uuid", nullable: false)
 0444                },
 0445                constraints: table =>
 0446                {
 0447                    table.PrimaryKey("PK_Navigation.RobotSystemInfos", x => x.Id);
 0448                    table.ForeignKey(
 0449                        name: "FK_Navigation.RobotSystemInfos_Navigation.Robots_RobotId",
 0450                        column: x => x.RobotId,
 0451                        principalTable: "Navigation.Robots",
 0452                        principalColumn: "Id",
 0453                        onDelete: ReferentialAction.Cascade);
 0454                });
 455
 0456            migrationBuilder.CreateTable(
 0457                name: "Automation.AutoTaskDetails",
 0458                columns: table => new
 0459                {
 0460                    Id = table.Column<int>(type: "integer", nullable: false)
 0461                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0462                    Order = table.Column<int>(type: "integer", nullable: false),
 0463                    CustomX = table.Column<double>(type: "double precision", nullable: true),
 0464                    CustomY = table.Column<double>(type: "double precision", nullable: true),
 0465                    CustomRotation = table.Column<double>(type: "double precision", nullable: true),
 0466                    WaypointId = table.Column<int>(type: "integer", nullable: true),
 0467                    AutoTaskId = table.Column<int>(type: "integer", nullable: false)
 0468                },
 0469                constraints: table =>
 0470                {
 0471                    table.PrimaryKey("PK_Automation.AutoTaskDetails", x => x.Id);
 0472                    table.ForeignKey(
 0473                        name: "FK_Automation.AutoTaskDetails_Automation.AutoTasks_AutoTaskId",
 0474                        column: x => x.AutoTaskId,
 0475                        principalTable: "Automation.AutoTasks",
 0476                        principalColumn: "Id",
 0477                        onDelete: ReferentialAction.Cascade);
 0478                    table.ForeignKey(
 0479                        name: "FK_Automation.AutoTaskDetails_Navigation.Waypoints_WaypointId",
 0480                        column: x => x.WaypointId,
 0481                        principalTable: "Navigation.Waypoints",
 0482                        principalColumn: "Id",
 0483                        onDelete: ReferentialAction.SetNull);
 0484                });
 485
 0486            migrationBuilder.CreateTable(
 0487                name: "Automation.TriggerRetries",
 0488                columns: table => new
 0489                {
 0490                    Id = table.Column<int>(type: "integer", nullable: false)
 0491                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 0492                    TriggerId = table.Column<int>(type: "integer", nullable: false),
 0493                    AutoTaskId = table.Column<int>(type: "integer", nullable: false),
 0494                    Body = table.Column<string>(type: "TEXT", nullable: false),
 0495                    CreatedAt = table.Column<DateTime>(type: "timestamp(3) with time zone", precision: 3, nullable: fals
 0496                },
 0497                constraints: table =>
 0498                {
 0499                    table.PrimaryKey("PK_Automation.TriggerRetries", x => x.Id);
 0500                    table.ForeignKey(
 0501                        name: "FK_Automation.TriggerRetries_Automation.AutoTasks_AutoTaskId",
 0502                        column: x => x.AutoTaskId,
 0503                        principalTable: "Automation.AutoTasks",
 0504                        principalColumn: "Id",
 0505                        onDelete: ReferentialAction.Cascade);
 0506                    table.ForeignKey(
 0507                        name: "FK_Automation.TriggerRetries_Automation.Triggers_TriggerId",
 0508                        column: x => x.TriggerId,
 0509                        principalTable: "Automation.Triggers",
 0510                        principalColumn: "Id",
 0511                        onDelete: ReferentialAction.Cascade);
 0512                });
 513
 0514            migrationBuilder.InsertData(
 0515                table: "Automation.Progresses",
 0516                columns: new[] { "Id", "Name", "Reserved", "System" },
 0517                values: new object[,]
 0518                {
 0519                    { 1, "Template", true, true },
 0520                    { 2, "Waiting", true, true },
 0521                    { 3, "Completed", true, true },
 0522                    { 4, "Aborted", true, true },
 0523                    { 5, "Starting", false, true },
 0524                    { 6, "Loading", false, true },
 0525                    { 7, "PreMoving", false, true },
 0526                    { 8, "Moving", false, true },
 0527                    { 9, "Unloading", false, true },
 0528                    { 10, "Completing", false, true },
 0529                    { 99, "Reserved", true, true }
 0530                });
 531
 0532            migrationBuilder.InsertData(
 0533                table: "Navigation.Realms",
 0534                columns: new[] { "Id", "Description", "Image", "Name", "OriginRotation", "OriginX", "OriginY", "Resoluti
 0535                values: new object[] { 1, "Please update this realm", new byte[0], "First Realm", 0.0, 0.0, 0.0, 0.0 });
 536
 0537            migrationBuilder.CreateIndex(
 0538                name: "IX_AspNetRoleClaims_RoleId",
 0539                table: "AspNetRoleClaims",
 0540                column: "RoleId");
 541
 0542            migrationBuilder.CreateIndex(
 0543                name: "RoleNameIndex",
 0544                table: "AspNetRoles",
 0545                column: "NormalizedName",
 0546                unique: true);
 547
 0548            migrationBuilder.CreateIndex(
 0549                name: "IX_AspNetUserClaims_UserId",
 0550                table: "AspNetUserClaims",
 0551                column: "UserId");
 552
 0553            migrationBuilder.CreateIndex(
 0554                name: "IX_AspNetUserLogins_UserId",
 0555                table: "AspNetUserLogins",
 0556                column: "UserId");
 557
 0558            migrationBuilder.CreateIndex(
 0559                name: "IX_AspNetUserRoles_RoleId",
 0560                table: "AspNetUserRoles",
 0561                column: "RoleId");
 562
 0563            migrationBuilder.CreateIndex(
 0564                name: "EmailIndex",
 0565                table: "AspNetUsers",
 0566                column: "NormalizedEmail");
 567
 0568            migrationBuilder.CreateIndex(
 0569                name: "UserNameIndex",
 0570                table: "AspNetUsers",
 0571                column: "NormalizedUserName",
 0572                unique: true);
 573
 0574            migrationBuilder.CreateIndex(
 0575                name: "IX_Automation.AutoTaskDetails_AutoTaskId",
 0576                table: "Automation.AutoTaskDetails",
 0577                column: "AutoTaskId");
 578
 0579            migrationBuilder.CreateIndex(
 0580                name: "IX_Automation.AutoTaskDetails_Order",
 0581                table: "Automation.AutoTaskDetails",
 0582                column: "Order");
 583
 0584            migrationBuilder.CreateIndex(
 0585                name: "IX_Automation.AutoTaskDetails_WaypointId",
 0586                table: "Automation.AutoTaskDetails",
 0587                column: "WaypointId");
 588
 0589            migrationBuilder.CreateIndex(
 0590                name: "IX_Automation.AutoTasks_AssignedRobotId",
 0591                table: "Automation.AutoTasks",
 0592                column: "AssignedRobotId");
 593
 0594            migrationBuilder.CreateIndex(
 0595                name: "IX_Automation.AutoTasks_CurrentProgressId",
 0596                table: "Automation.AutoTasks",
 0597                column: "CurrentProgressId");
 598
 0599            migrationBuilder.CreateIndex(
 0600                name: "IX_Automation.AutoTasks_FlowId",
 0601                table: "Automation.AutoTasks",
 0602                column: "FlowId");
 603
 0604            migrationBuilder.CreateIndex(
 0605                name: "IX_Automation.AutoTasks_RealmId_AssignedRobotId",
 0606                table: "Automation.AutoTasks",
 0607                columns: new[] { "RealmId", "AssignedRobotId" });
 608
 0609            migrationBuilder.CreateIndex(
 0610                name: "IX_Automation.FlowDetails_FlowId",
 0611                table: "Automation.FlowDetails",
 0612                column: "FlowId");
 613
 0614            migrationBuilder.CreateIndex(
 0615                name: "IX_Automation.FlowDetails_Order",
 0616                table: "Automation.FlowDetails",
 0617                column: "Order");
 618
 0619            migrationBuilder.CreateIndex(
 0620                name: "IX_Automation.FlowDetails_ProgressId",
 0621                table: "Automation.FlowDetails",
 0622                column: "ProgressId");
 623
 0624            migrationBuilder.CreateIndex(
 0625                name: "IX_Automation.FlowDetails_TriggerId",
 0626                table: "Automation.FlowDetails",
 0627                column: "TriggerId");
 628
 0629            migrationBuilder.CreateIndex(
 0630                name: "IX_Automation.TriggerRetries_AutoTaskId",
 0631                table: "Automation.TriggerRetries",
 0632                column: "AutoTaskId");
 633
 0634            migrationBuilder.CreateIndex(
 0635                name: "IX_Automation.TriggerRetries_TriggerId",
 0636                table: "Automation.TriggerRetries",
 0637                column: "TriggerId");
 638
 0639            migrationBuilder.CreateIndex(
 0640                name: "IX_Automation.Triggers_ApiKeyId",
 0641                table: "Automation.Triggers",
 0642                column: "ApiKeyId");
 643
 0644            migrationBuilder.CreateIndex(
 0645                name: "IX_Automation.Triggers_ApiKeyInsertLocationId",
 0646                table: "Automation.Triggers",
 0647                column: "ApiKeyInsertLocationId");
 648
 0649            migrationBuilder.CreateIndex(
 0650                name: "IX_Navigation.RobotCertificates_RobotId",
 0651                table: "Navigation.RobotCertificates",
 0652                column: "RobotId",
 0653                unique: true);
 654
 0655            migrationBuilder.CreateIndex(
 0656                name: "IX_Navigation.RobotChassisInfos_RobotId",
 0657                table: "Navigation.RobotChassisInfos",
 0658                column: "RobotId",
 0659                unique: true);
 660
 0661            migrationBuilder.CreateIndex(
 0662                name: "IX_Navigation.Robots_RealmId",
 0663                table: "Navigation.Robots",
 0664                column: "RealmId");
 665
 0666            migrationBuilder.CreateIndex(
 0667                name: "IX_Navigation.RobotSystemInfos_RobotId",
 0668                table: "Navigation.RobotSystemInfos",
 0669                column: "RobotId",
 0670                unique: true);
 671
 0672            migrationBuilder.CreateIndex(
 0673                name: "IX_Navigation.Waypoints_RealmId",
 0674                table: "Navigation.Waypoints",
 0675                column: "RealmId");
 0676        }
 677
 678        /// <inheritdoc />
 679        protected override void Down(MigrationBuilder migrationBuilder)
 0680        {
 0681            migrationBuilder.DropTable(
 0682                name: "AspNetRoleClaims");
 683
 0684            migrationBuilder.DropTable(
 0685                name: "AspNetUserClaims");
 686
 0687            migrationBuilder.DropTable(
 0688                name: "AspNetUserLogins");
 689
 0690            migrationBuilder.DropTable(
 0691                name: "AspNetUserRoles");
 692
 0693            migrationBuilder.DropTable(
 0694                name: "AspNetUserTokens");
 695
 0696            migrationBuilder.DropTable(
 0697                name: "Automation.AutoTaskDetails");
 698
 0699            migrationBuilder.DropTable(
 0700                name: "Automation.FlowDetails");
 701
 0702            migrationBuilder.DropTable(
 0703                name: "Automation.TriggerRetries");
 704
 0705            migrationBuilder.DropTable(
 0706                name: "Navigation.RobotCertificates");
 707
 0708            migrationBuilder.DropTable(
 0709                name: "Navigation.RobotChassisInfos");
 710
 0711            migrationBuilder.DropTable(
 0712                name: "Navigation.RobotSystemInfos");
 713
 0714            migrationBuilder.DropTable(
 0715                name: "AspNetRoles");
 716
 0717            migrationBuilder.DropTable(
 0718                name: "AspNetUsers");
 719
 0720            migrationBuilder.DropTable(
 0721                name: "Navigation.Waypoints");
 722
 0723            migrationBuilder.DropTable(
 0724                name: "Automation.AutoTasks");
 725
 0726            migrationBuilder.DropTable(
 0727                name: "Automation.Triggers");
 728
 0729            migrationBuilder.DropTable(
 0730                name: "Automation.Flows");
 731
 0732            migrationBuilder.DropTable(
 0733                name: "Automation.Progresses");
 734
 0735            migrationBuilder.DropTable(
 0736                name: "Navigation.Robots");
 737
 0738            migrationBuilder.DropTable(
 0739                name: "Administration.ApiKeys");
 740
 0741            migrationBuilder.DropTable(
 0742                name: "Navigation.Realms");
 0743        }
 744    }
 745}

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Migrations/20250218225237_InitialCreate.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using LGDXRobotCloud.Data.DbContexts;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 9
 10#nullable disable
 11
 12namespace LGDXRobotCloud.Data.Migrations
 13{
 14    [DbContext(typeof(LgdxContext))]
 15    [Migration("20250218225237_InitialCreate")]
 16    partial class InitialCreate
 17    {
 18        /// <inheritdoc />
 19        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 020        {
 21#pragma warning disable 612, 618
 022            modelBuilder
 023                .HasAnnotation("ProductVersion", "9.0.1")
 024                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 25
 026            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 27
 028            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.ApiKey", b =>
 029                {
 030                    b.Property<int>("Id")
 031                        .ValueGeneratedOnAdd()
 032                        .HasColumnType("integer");
 033
 034                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 035
 036                    b.Property<bool>("IsThirdParty")
 037                        .HasColumnType("boolean");
 038
 039                    b.Property<string>("Name")
 040                        .IsRequired()
 041                        .HasMaxLength(50)
 042                        .HasColumnType("character varying(50)");
 043
 044                    b.Property<string>("Secret")
 045                        .IsRequired()
 046                        .HasMaxLength(200)
 047                        .HasColumnType("character varying(200)");
 048
 049                    b.HasKey("Id");
 050
 051                    b.ToTable("Administration.ApiKeys");
 052                });
 53
 054            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTask", b =>
 055                {
 056                    b.Property<int>("Id")
 057                        .ValueGeneratedOnAdd()
 058                        .HasColumnType("integer");
 059
 060                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 061
 062                    b.Property<Guid?>("AssignedRobotId")
 063                        .HasColumnType("uuid");
 064
 065                    b.Property<int>("CurrentProgressId")
 066                        .HasColumnType("integer");
 067
 068                    b.Property<int?>("CurrentProgressOrder")
 069                        .HasColumnType("integer");
 070
 071                    b.Property<int?>("FlowId")
 072                        .HasColumnType("integer");
 073
 074                    b.Property<string>("Name")
 075                        .HasMaxLength(50)
 076                        .HasColumnType("character varying(50)");
 077
 078                    b.Property<string>("NextToken")
 079                        .HasMaxLength(32)
 080                        .HasColumnType("character varying(32)");
 081
 082                    b.Property<int>("Priority")
 083                        .HasColumnType("integer");
 084
 085                    b.Property<int>("RealmId")
 086                        .HasColumnType("integer");
 087
 088                    b.HasKey("Id");
 089
 090                    b.HasIndex("AssignedRobotId");
 091
 092                    b.HasIndex("CurrentProgressId");
 093
 094                    b.HasIndex("FlowId");
 095
 096                    b.HasIndex("RealmId", "AssignedRobotId");
 097
 098                    b.ToTable("Automation.AutoTasks");
 099                });
 100
 0101            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTaskDetail", b =>
 0102                {
 0103                    b.Property<int>("Id")
 0104                        .ValueGeneratedOnAdd()
 0105                        .HasColumnType("integer");
 0106
 0107                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0108
 0109                    b.Property<int>("AutoTaskId")
 0110                        .HasColumnType("integer");
 0111
 0112                    b.Property<double?>("CustomRotation")
 0113                        .HasColumnType("double precision");
 0114
 0115                    b.Property<double?>("CustomX")
 0116                        .HasColumnType("double precision");
 0117
 0118                    b.Property<double?>("CustomY")
 0119                        .HasColumnType("double precision");
 0120
 0121                    b.Property<int>("Order")
 0122                        .HasColumnType("integer");
 0123
 0124                    b.Property<int?>("WaypointId")
 0125                        .HasColumnType("integer");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("AutoTaskId");
 0130
 0131                    b.HasIndex("Order");
 0132
 0133                    b.HasIndex("WaypointId");
 0134
 0135                    b.ToTable("Automation.AutoTaskDetails");
 0136                });
 137
 0138            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Flow", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("integer");
 0143
 0144                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0145
 0146                    b.Property<string>("Name")
 0147                        .IsRequired()
 0148                        .HasMaxLength(50)
 0149                        .HasColumnType("character varying(50)");
 0150
 0151                    b.HasKey("Id");
 0152
 0153                    b.ToTable("Automation.Flows");
 0154                });
 155
 0156            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.FlowDetail", b =>
 0157                {
 0158                    b.Property<int>("Id")
 0159                        .ValueGeneratedOnAdd()
 0160                        .HasColumnType("integer");
 0161
 0162                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0163
 0164                    b.Property<int>("AutoTaskNextControllerId")
 0165                        .HasColumnType("integer");
 0166
 0167                    b.Property<int>("FlowId")
 0168                        .HasColumnType("integer");
 0169
 0170                    b.Property<int>("Order")
 0171                        .HasColumnType("integer");
 0172
 0173                    b.Property<int>("ProgressId")
 0174                        .HasColumnType("integer");
 0175
 0176                    b.Property<int?>("TriggerId")
 0177                        .HasColumnType("integer");
 0178
 0179                    b.HasKey("Id");
 0180
 0181                    b.HasIndex("FlowId");
 0182
 0183                    b.HasIndex("Order");
 0184
 0185                    b.HasIndex("ProgressId");
 0186
 0187                    b.HasIndex("TriggerId");
 0188
 0189                    b.ToTable("Automation.FlowDetails");
 0190                });
 191
 0192            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.LgdxRole", b =>
 0193                {
 0194                    b.Property<string>("Id")
 0195                        .HasColumnType("text");
 0196
 0197                    b.Property<string>("ConcurrencyStamp")
 0198                        .IsConcurrencyToken()
 0199                        .HasColumnType("text");
 0200
 0201                    b.Property<string>("Description")
 0202                        .HasColumnType("text");
 0203
 0204                    b.Property<string>("Name")
 0205                        .HasMaxLength(256)
 0206                        .HasColumnType("character varying(256)");
 0207
 0208                    b.Property<string>("NormalizedName")
 0209                        .HasMaxLength(256)
 0210                        .HasColumnType("character varying(256)");
 0211
 0212                    b.HasKey("Id");
 0213
 0214                    b.HasIndex("NormalizedName")
 0215                        .IsUnique()
 0216                        .HasDatabaseName("RoleNameIndex");
 0217
 0218                    b.ToTable("AspNetRoles", (string)null);
 0219                });
 220
 0221            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.LgdxUser", b =>
 0222                {
 0223                    b.Property<string>("Id")
 0224                        .HasColumnType("text");
 0225
 0226                    b.Property<int>("AccessFailedCount")
 0227                        .HasColumnType("integer");
 0228
 0229                    b.Property<string>("ConcurrencyStamp")
 0230                        .IsConcurrencyToken()
 0231                        .HasColumnType("text");
 0232
 0233                    b.Property<string>("Email")
 0234                        .HasMaxLength(256)
 0235                        .HasColumnType("character varying(256)");
 0236
 0237                    b.Property<bool>("EmailConfirmed")
 0238                        .HasColumnType("boolean");
 0239
 0240                    b.Property<bool>("LockoutEnabled")
 0241                        .HasColumnType("boolean");
 0242
 0243                    b.Property<DateTimeOffset?>("LockoutEnd")
 0244                        .HasColumnType("timestamp with time zone");
 0245
 0246                    b.Property<string>("Name")
 0247                        .HasColumnType("text");
 0248
 0249                    b.Property<string>("NormalizedEmail")
 0250                        .HasMaxLength(256)
 0251                        .HasColumnType("character varying(256)");
 0252
 0253                    b.Property<string>("NormalizedUserName")
 0254                        .HasMaxLength(256)
 0255                        .HasColumnType("character varying(256)");
 0256
 0257                    b.Property<string>("PasswordHash")
 0258                        .HasColumnType("text");
 0259
 0260                    b.Property<string>("PhoneNumber")
 0261                        .HasColumnType("text");
 0262
 0263                    b.Property<bool>("PhoneNumberConfirmed")
 0264                        .HasColumnType("boolean");
 0265
 0266                    b.Property<string>("RefreshTokenHash")
 0267                        .HasMaxLength(64)
 0268                        .HasColumnType("character varying(64)");
 0269
 0270                    b.Property<string>("SecurityStamp")
 0271                        .HasColumnType("text");
 0272
 0273                    b.Property<bool>("TwoFactorEnabled")
 0274                        .HasColumnType("boolean");
 0275
 0276                    b.Property<string>("UserName")
 0277                        .HasMaxLength(256)
 0278                        .HasColumnType("character varying(256)");
 0279
 0280                    b.HasKey("Id");
 0281
 0282                    b.HasIndex("NormalizedEmail")
 0283                        .HasDatabaseName("EmailIndex");
 0284
 0285                    b.HasIndex("NormalizedUserName")
 0286                        .IsUnique()
 0287                        .HasDatabaseName("UserNameIndex");
 0288
 0289                    b.ToTable("AspNetUsers", (string)null);
 0290                });
 291
 0292            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Progress", b =>
 0293                {
 0294                    b.Property<int>("Id")
 0295                        .ValueGeneratedOnAdd()
 0296                        .HasColumnType("integer");
 0297
 0298                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0299
 0300                    b.Property<string>("Name")
 0301                        .IsRequired()
 0302                        .HasMaxLength(50)
 0303                        .HasColumnType("character varying(50)");
 0304
 0305                    b.Property<bool>("Reserved")
 0306                        .HasColumnType("boolean");
 0307
 0308                    b.Property<bool>("System")
 0309                        .HasColumnType("boolean");
 0310
 0311                    b.HasKey("Id");
 0312
 0313                    b.ToTable("Automation.Progresses");
 0314
 0315                    b.HasData(
 0316                        new
 0317                        {
 0318                            Id = 1,
 0319                            Name = "Template",
 0320                            Reserved = true,
 0321                            System = true
 0322                        },
 0323                        new
 0324                        {
 0325                            Id = 2,
 0326                            Name = "Waiting",
 0327                            Reserved = true,
 0328                            System = true
 0329                        },
 0330                        new
 0331                        {
 0332                            Id = 3,
 0333                            Name = "Completed",
 0334                            Reserved = true,
 0335                            System = true
 0336                        },
 0337                        new
 0338                        {
 0339                            Id = 4,
 0340                            Name = "Aborted",
 0341                            Reserved = true,
 0342                            System = true
 0343                        },
 0344                        new
 0345                        {
 0346                            Id = 5,
 0347                            Name = "Starting",
 0348                            Reserved = false,
 0349                            System = true
 0350                        },
 0351                        new
 0352                        {
 0353                            Id = 6,
 0354                            Name = "Loading",
 0355                            Reserved = false,
 0356                            System = true
 0357                        },
 0358                        new
 0359                        {
 0360                            Id = 7,
 0361                            Name = "PreMoving",
 0362                            Reserved = false,
 0363                            System = true
 0364                        },
 0365                        new
 0366                        {
 0367                            Id = 8,
 0368                            Name = "Moving",
 0369                            Reserved = false,
 0370                            System = true
 0371                        },
 0372                        new
 0373                        {
 0374                            Id = 9,
 0375                            Name = "Unloading",
 0376                            Reserved = false,
 0377                            System = true
 0378                        },
 0379                        new
 0380                        {
 0381                            Id = 10,
 0382                            Name = "Completing",
 0383                            Reserved = false,
 0384                            System = true
 0385                        },
 0386                        new
 0387                        {
 0388                            Id = 99,
 0389                            Name = "Reserved",
 0390                            Reserved = true,
 0391                            System = true
 0392                        });
 0393                });
 394
 0395            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Realm", b =>
 0396                {
 0397                    b.Property<int>("Id")
 0398                        .ValueGeneratedOnAdd()
 0399                        .HasColumnType("integer");
 0400
 0401                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0402
 0403                    b.Property<string>("Description")
 0404                        .HasMaxLength(200)
 0405                        .HasColumnType("character varying(200)");
 0406
 0407                    b.Property<byte[]>("Image")
 0408                        .IsRequired()
 0409                        .HasColumnType("bytea");
 0410
 0411                    b.Property<string>("Name")
 0412                        .IsRequired()
 0413                        .HasMaxLength(50)
 0414                        .HasColumnType("character varying(50)");
 0415
 0416                    b.Property<double>("OriginRotation")
 0417                        .HasColumnType("double precision");
 0418
 0419                    b.Property<double>("OriginX")
 0420                        .HasColumnType("double precision");
 0421
 0422                    b.Property<double>("OriginY")
 0423                        .HasColumnType("double precision");
 0424
 0425                    b.Property<double>("Resolution")
 0426                        .HasColumnType("double precision");
 0427
 0428                    b.HasKey("Id");
 0429
 0430                    b.ToTable("Navigation.Realms");
 0431
 0432                    b.HasData(
 0433                        new
 0434                        {
 0435                            Id = 1,
 0436                            Description = "Please update this realm",
 0437                            Image = new byte[0],
 0438                            Name = "First Realm",
 0439                            OriginRotation = 0.0,
 0440                            OriginX = 0.0,
 0441                            OriginY = 0.0,
 0442                            Resolution = 0.0
 0443                        });
 0444                });
 445
 0446            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 0447                {
 0448                    b.Property<Guid>("Id")
 0449                        .ValueGeneratedOnAdd()
 0450                        .HasColumnType("uuid");
 0451
 0452                    b.Property<bool>("IsProtectingHardwareSerialNumber")
 0453                        .HasColumnType("boolean");
 0454
 0455                    b.Property<bool>("IsRealtimeExchange")
 0456                        .HasColumnType("boolean");
 0457
 0458                    b.Property<string>("Name")
 0459                        .IsRequired()
 0460                        .HasMaxLength(50)
 0461                        .HasColumnType("character varying(50)");
 0462
 0463                    b.Property<int>("RealmId")
 0464                        .HasColumnType("integer");
 0465
 0466                    b.HasKey("Id");
 0467
 0468                    b.HasIndex("RealmId");
 0469
 0470                    b.ToTable("Navigation.Robots");
 0471                });
 472
 0473            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotCertificate", b =>
 0474                {
 0475                    b.Property<Guid>("Id")
 0476                        .ValueGeneratedOnAdd()
 0477                        .HasColumnType("uuid");
 0478
 0479                    b.Property<DateTime>("NotAfter")
 0480                        .HasPrecision(0)
 0481                        .HasColumnType("timestamp(0) with time zone");
 0482
 0483                    b.Property<DateTime>("NotBefore")
 0484                        .HasPrecision(0)
 0485                        .HasColumnType("timestamp(0) with time zone");
 0486
 0487                    b.Property<Guid>("RobotId")
 0488                        .HasColumnType("uuid");
 0489
 0490                    b.Property<string>("Thumbprint")
 0491                        .IsRequired()
 0492                        .HasMaxLength(40)
 0493                        .HasColumnType("character varying(40)");
 0494
 0495                    b.Property<string>("ThumbprintBackup")
 0496                        .HasMaxLength(40)
 0497                        .HasColumnType("character varying(40)");
 0498
 0499                    b.HasKey("Id");
 0500
 0501                    b.HasIndex("RobotId")
 0502                        .IsUnique();
 0503
 0504                    b.ToTable("Navigation.RobotCertificates");
 0505                });
 506
 0507            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotChassisInfo", b =>
 0508                {
 0509                    b.Property<int>("Id")
 0510                        .ValueGeneratedOnAdd()
 0511                        .HasColumnType("integer");
 0512
 0513                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0514
 0515                    b.Property<int>("BatteryCount")
 0516                        .HasColumnType("integer");
 0517
 0518                    b.Property<double>("BatteryMaxVoltage")
 0519                        .HasColumnType("double precision");
 0520
 0521                    b.Property<double>("BatteryMinVoltage")
 0522                        .HasColumnType("double precision");
 0523
 0524                    b.Property<double>("ChassisLengthX")
 0525                        .HasColumnType("double precision");
 0526
 0527                    b.Property<double>("ChassisLengthY")
 0528                        .HasColumnType("double precision");
 0529
 0530                    b.Property<int>("ChassisWheelCount")
 0531                        .HasColumnType("integer");
 0532
 0533                    b.Property<double>("ChassisWheelRadius")
 0534                        .HasColumnType("double precision");
 0535
 0536                    b.Property<Guid>("RobotId")
 0537                        .HasColumnType("uuid");
 0538
 0539                    b.Property<int>("RobotTypeId")
 0540                        .HasColumnType("integer");
 0541
 0542                    b.HasKey("Id");
 0543
 0544                    b.HasIndex("RobotId")
 0545                        .IsUnique();
 0546
 0547                    b.ToTable("Navigation.RobotChassisInfos");
 0548                });
 549
 0550            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotSystemInfo", b =>
 0551                {
 0552                    b.Property<int>("Id")
 0553                        .ValueGeneratedOnAdd()
 0554                        .HasColumnType("integer");
 0555
 0556                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0557
 0558                    b.Property<string>("Cpu")
 0559                        .IsRequired()
 0560                        .HasMaxLength(100)
 0561                        .HasColumnType("character varying(100)");
 0562
 0563                    b.Property<string>("Gpu")
 0564                        .HasMaxLength(100)
 0565                        .HasColumnType("character varying(100)");
 0566
 0567                    b.Property<bool>("Is32Bit")
 0568                        .HasColumnType("boolean");
 0569
 0570                    b.Property<bool>("IsLittleEndian")
 0571                        .HasColumnType("boolean");
 0572
 0573                    b.Property<string>("McuSerialNumber")
 0574                        .HasMaxLength(100)
 0575                        .HasColumnType("character varying(100)");
 0576
 0577                    b.Property<string>("Motherboard")
 0578                        .IsRequired()
 0579                        .HasMaxLength(100)
 0580                        .HasColumnType("character varying(100)");
 0581
 0582                    b.Property<string>("MotherboardSerialNumber")
 0583                        .IsRequired()
 0584                        .HasMaxLength(100)
 0585                        .HasColumnType("character varying(100)");
 0586
 0587                    b.Property<string>("Os")
 0588                        .IsRequired()
 0589                        .HasMaxLength(100)
 0590                        .HasColumnType("character varying(100)");
 0591
 0592                    b.Property<int>("RamMiB")
 0593                        .HasColumnType("integer");
 0594
 0595                    b.Property<Guid>("RobotId")
 0596                        .HasColumnType("uuid");
 0597
 0598                    b.HasKey("Id");
 0599
 0600                    b.HasIndex("RobotId")
 0601                        .IsUnique();
 0602
 0603                    b.ToTable("Navigation.RobotSystemInfos");
 0604                });
 605
 0606            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Trigger", b =>
 0607                {
 0608                    b.Property<int>("Id")
 0609                        .ValueGeneratedOnAdd()
 0610                        .HasColumnType("integer");
 0611
 0612                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0613
 0614                    b.Property<string>("ApiKeyFieldName")
 0615                        .HasMaxLength(50)
 0616                        .HasColumnType("character varying(50)");
 0617
 0618                    b.Property<int?>("ApiKeyId")
 0619                        .HasColumnType("integer");
 0620
 0621                    b.Property<int?>("ApiKeyInsertLocationId")
 0622                        .HasColumnType("integer");
 0623
 0624                    b.Property<string>("Body")
 0625                        .HasColumnType("text");
 0626
 0627                    b.Property<int>("HttpMethodId")
 0628                        .HasColumnType("integer");
 0629
 0630                    b.Property<string>("Name")
 0631                        .IsRequired()
 0632                        .HasMaxLength(50)
 0633                        .HasColumnType("character varying(50)");
 0634
 0635                    b.Property<bool>("SkipOnFailure")
 0636                        .HasColumnType("boolean");
 0637
 0638                    b.Property<string>("Url")
 0639                        .IsRequired()
 0640                        .HasMaxLength(200)
 0641                        .HasColumnType("character varying(200)");
 0642
 0643                    b.HasKey("Id");
 0644
 0645                    b.HasIndex("ApiKeyId");
 0646
 0647                    b.HasIndex("ApiKeyInsertLocationId");
 0648
 0649                    b.ToTable("Automation.Triggers");
 0650                });
 651
 0652            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.TriggerRetry", b =>
 0653                {
 0654                    b.Property<int>("Id")
 0655                        .ValueGeneratedOnAdd()
 0656                        .HasColumnType("integer");
 0657
 0658                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0659
 0660                    b.Property<int>("AutoTaskId")
 0661                        .HasColumnType("integer");
 0662
 0663                    b.Property<string>("Body")
 0664                        .IsRequired()
 0665                        .HasColumnType("TEXT");
 0666
 0667                    b.Property<DateTime>("CreatedAt")
 0668                        .HasPrecision(3)
 0669                        .HasColumnType("timestamp(3) with time zone");
 0670
 0671                    b.Property<int>("TriggerId")
 0672                        .HasColumnType("integer");
 0673
 0674                    b.HasKey("Id");
 0675
 0676                    b.HasIndex("AutoTaskId");
 0677
 0678                    b.HasIndex("TriggerId");
 0679
 0680                    b.ToTable("Automation.TriggerRetries");
 0681                });
 682
 0683            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Waypoint", b =>
 0684                {
 0685                    b.Property<int>("Id")
 0686                        .ValueGeneratedOnAdd()
 0687                        .HasColumnType("integer");
 0688
 0689                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0690
 0691                    b.Property<bool>("HasCharger")
 0692                        .HasColumnType("boolean");
 0693
 0694                    b.Property<bool>("IsParking")
 0695                        .HasColumnType("boolean");
 0696
 0697                    b.Property<bool>("IsReserved")
 0698                        .HasColumnType("boolean");
 0699
 0700                    b.Property<string>("Name")
 0701                        .IsRequired()
 0702                        .HasMaxLength(100)
 0703                        .HasColumnType("character varying(100)");
 0704
 0705                    b.Property<int>("RealmId")
 0706                        .HasColumnType("integer");
 0707
 0708                    b.Property<double>("Rotation")
 0709                        .HasColumnType("double precision");
 0710
 0711                    b.Property<double>("X")
 0712                        .HasColumnType("double precision");
 0713
 0714                    b.Property<double>("Y")
 0715                        .HasColumnType("double precision");
 0716
 0717                    b.HasKey("Id");
 0718
 0719                    b.HasIndex("RealmId");
 0720
 0721                    b.ToTable("Navigation.Waypoints");
 0722                });
 723
 0724            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
 0725                {
 0726                    b.Property<int>("Id")
 0727                        .ValueGeneratedOnAdd()
 0728                        .HasColumnType("integer");
 0729
 0730                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0731
 0732                    b.Property<string>("ClaimType")
 0733                        .HasColumnType("text");
 0734
 0735                    b.Property<string>("ClaimValue")
 0736                        .HasColumnType("text");
 0737
 0738                    b.Property<string>("RoleId")
 0739                        .IsRequired()
 0740                        .HasColumnType("text");
 0741
 0742                    b.HasKey("Id");
 0743
 0744                    b.HasIndex("RoleId");
 0745
 0746                    b.ToTable("AspNetRoleClaims", (string)null);
 0747                });
 748
 0749            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
 0750                {
 0751                    b.Property<int>("Id")
 0752                        .ValueGeneratedOnAdd()
 0753                        .HasColumnType("integer");
 0754
 0755                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0756
 0757                    b.Property<string>("ClaimType")
 0758                        .HasColumnType("text");
 0759
 0760                    b.Property<string>("ClaimValue")
 0761                        .HasColumnType("text");
 0762
 0763                    b.Property<string>("UserId")
 0764                        .IsRequired()
 0765                        .HasColumnType("text");
 0766
 0767                    b.HasKey("Id");
 0768
 0769                    b.HasIndex("UserId");
 0770
 0771                    b.ToTable("AspNetUserClaims", (string)null);
 0772                });
 773
 0774            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
 0775                {
 0776                    b.Property<string>("LoginProvider")
 0777                        .HasColumnType("text");
 0778
 0779                    b.Property<string>("ProviderKey")
 0780                        .HasColumnType("text");
 0781
 0782                    b.Property<string>("ProviderDisplayName")
 0783                        .HasColumnType("text");
 0784
 0785                    b.Property<string>("UserId")
 0786                        .IsRequired()
 0787                        .HasColumnType("text");
 0788
 0789                    b.HasKey("LoginProvider", "ProviderKey");
 0790
 0791                    b.HasIndex("UserId");
 0792
 0793                    b.ToTable("AspNetUserLogins", (string)null);
 0794                });
 795
 0796            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
 0797                {
 0798                    b.Property<string>("UserId")
 0799                        .HasColumnType("text");
 0800
 0801                    b.Property<string>("RoleId")
 0802                        .HasColumnType("text");
 0803
 0804                    b.HasKey("UserId", "RoleId");
 0805
 0806                    b.HasIndex("RoleId");
 0807
 0808                    b.ToTable("AspNetUserRoles", (string)null);
 0809                });
 810
 0811            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
 0812                {
 0813                    b.Property<string>("UserId")
 0814                        .HasColumnType("text");
 0815
 0816                    b.Property<string>("LoginProvider")
 0817                        .HasColumnType("text");
 0818
 0819                    b.Property<string>("Name")
 0820                        .HasColumnType("text");
 0821
 0822                    b.Property<string>("Value")
 0823                        .HasColumnType("text");
 0824
 0825                    b.HasKey("UserId", "LoginProvider", "Name");
 0826
 0827                    b.ToTable("AspNetUserTokens", (string)null);
 0828                });
 829
 0830            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTask", b =>
 0831                {
 0832                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "AssignedRobot")
 0833                        .WithMany("AssignedTasks")
 0834                        .HasForeignKey("AssignedRobotId")
 0835                        .OnDelete(DeleteBehavior.SetNull);
 0836
 0837                    b.HasOne("LGDXRobotCloud.Data.Entities.Progress", "CurrentProgress")
 0838                        .WithMany()
 0839                        .HasForeignKey("CurrentProgressId")
 0840                        .OnDelete(DeleteBehavior.Restrict)
 0841                        .IsRequired();
 0842
 0843                    b.HasOne("LGDXRobotCloud.Data.Entities.Flow", "Flow")
 0844                        .WithMany()
 0845                        .HasForeignKey("FlowId")
 0846                        .OnDelete(DeleteBehavior.SetNull);
 0847
 0848                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 0849                        .WithMany()
 0850                        .HasForeignKey("RealmId")
 0851                        .OnDelete(DeleteBehavior.Cascade)
 0852                        .IsRequired();
 0853
 0854                    b.Navigation("AssignedRobot");
 0855
 0856                    b.Navigation("CurrentProgress");
 0857
 0858                    b.Navigation("Flow");
 0859
 0860                    b.Navigation("Realm");
 0861                });
 862
 0863            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTaskDetail", b =>
 0864                {
 0865                    b.HasOne("LGDXRobotCloud.Data.Entities.AutoTask", "AutoTask")
 0866                        .WithMany("AutoTaskDetails")
 0867                        .HasForeignKey("AutoTaskId")
 0868                        .OnDelete(DeleteBehavior.Cascade)
 0869                        .IsRequired();
 0870
 0871                    b.HasOne("LGDXRobotCloud.Data.Entities.Waypoint", "Waypoint")
 0872                        .WithMany()
 0873                        .HasForeignKey("WaypointId")
 0874                        .OnDelete(DeleteBehavior.SetNull);
 0875
 0876                    b.Navigation("AutoTask");
 0877
 0878                    b.Navigation("Waypoint");
 0879                });
 880
 0881            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.FlowDetail", b =>
 0882                {
 0883                    b.HasOne("LGDXRobotCloud.Data.Entities.Flow", "Flow")
 0884                        .WithMany("FlowDetails")
 0885                        .HasForeignKey("FlowId")
 0886                        .OnDelete(DeleteBehavior.Cascade)
 0887                        .IsRequired();
 0888
 0889                    b.HasOne("LGDXRobotCloud.Data.Entities.Progress", "Progress")
 0890                        .WithMany()
 0891                        .HasForeignKey("ProgressId")
 0892                        .OnDelete(DeleteBehavior.Restrict)
 0893                        .IsRequired();
 0894
 0895                    b.HasOne("LGDXRobotCloud.Data.Entities.Trigger", "Trigger")
 0896                        .WithMany()
 0897                        .HasForeignKey("TriggerId")
 0898                        .OnDelete(DeleteBehavior.Restrict);
 0899
 0900                    b.Navigation("Flow");
 0901
 0902                    b.Navigation("Progress");
 0903
 0904                    b.Navigation("Trigger");
 0905                });
 906
 0907            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 0908                {
 0909                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 0910                        .WithMany()
 0911                        .HasForeignKey("RealmId")
 0912                        .OnDelete(DeleteBehavior.Restrict)
 0913                        .IsRequired();
 0914
 0915                    b.Navigation("Realm");
 0916                });
 917
 0918            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotCertificate", b =>
 0919                {
 0920                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0921                        .WithOne("RobotCertificate")
 0922                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotCertificate", "RobotId")
 0923                        .OnDelete(DeleteBehavior.Cascade)
 0924                        .IsRequired();
 0925
 0926                    b.Navigation("Robot");
 0927                });
 928
 0929            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotChassisInfo", b =>
 0930                {
 0931                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0932                        .WithOne("RobotChassisInfo")
 0933                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotChassisInfo", "RobotId")
 0934                        .OnDelete(DeleteBehavior.Cascade);
 0935
 0936                    b.Navigation("Robot");
 0937                });
 938
 0939            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotSystemInfo", b =>
 0940                {
 0941                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0942                        .WithOne("RobotSystemInfo")
 0943                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotSystemInfo", "RobotId")
 0944                        .OnDelete(DeleteBehavior.Cascade);
 0945
 0946                    b.Navigation("Robot");
 0947                });
 948
 0949            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Trigger", b =>
 0950                {
 0951                    b.HasOne("LGDXRobotCloud.Data.Entities.ApiKey", "ApiKey")
 0952                        .WithMany()
 0953                        .HasForeignKey("ApiKeyId")
 0954                        .OnDelete(DeleteBehavior.SetNull);
 0955
 0956                    b.Navigation("ApiKey");
 0957                });
 958
 0959            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.TriggerRetry", b =>
 0960                {
 0961                    b.HasOne("LGDXRobotCloud.Data.Entities.AutoTask", "AutoTask")
 0962                        .WithMany()
 0963                        .HasForeignKey("AutoTaskId")
 0964                        .OnDelete(DeleteBehavior.Cascade)
 0965                        .IsRequired();
 0966
 0967                    b.HasOne("LGDXRobotCloud.Data.Entities.Trigger", "Trigger")
 0968                        .WithMany()
 0969                        .HasForeignKey("TriggerId")
 0970                        .OnDelete(DeleteBehavior.Cascade)
 0971                        .IsRequired();
 0972
 0973                    b.Navigation("AutoTask");
 0974
 0975                    b.Navigation("Trigger");
 0976                });
 977
 0978            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Waypoint", b =>
 0979                {
 0980                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 0981                        .WithMany()
 0982                        .HasForeignKey("RealmId")
 0983                        .OnDelete(DeleteBehavior.Restrict)
 0984                        .IsRequired();
 0985
 0986                    b.Navigation("Realm");
 0987                });
 988
 0989            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
 0990                {
 0991                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxRole", null)
 0992                        .WithMany()
 0993                        .HasForeignKey("RoleId")
 0994                        .OnDelete(DeleteBehavior.Cascade)
 0995                        .IsRequired();
 0996                });
 997
 0998            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
 0999                {
 01000                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01001                        .WithMany()
 01002                        .HasForeignKey("UserId")
 01003                        .OnDelete(DeleteBehavior.Cascade)
 01004                        .IsRequired();
 01005                });
 1006
 01007            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
 01008                {
 01009                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01010                        .WithMany()
 01011                        .HasForeignKey("UserId")
 01012                        .OnDelete(DeleteBehavior.Cascade)
 01013                        .IsRequired();
 01014                });
 1015
 01016            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
 01017                {
 01018                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxRole", null)
 01019                        .WithMany()
 01020                        .HasForeignKey("RoleId")
 01021                        .OnDelete(DeleteBehavior.Cascade)
 01022                        .IsRequired();
 01023
 01024                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01025                        .WithMany()
 01026                        .HasForeignKey("UserId")
 01027                        .OnDelete(DeleteBehavior.Cascade)
 01028                        .IsRequired();
 01029                });
 1030
 01031            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
 01032                {
 01033                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01034                        .WithMany()
 01035                        .HasForeignKey("UserId")
 01036                        .OnDelete(DeleteBehavior.Cascade)
 01037                        .IsRequired();
 01038                });
 1039
 01040            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTask", b =>
 01041                {
 01042                    b.Navigation("AutoTaskDetails");
 01043                });
 1044
 01045            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Flow", b =>
 01046                {
 01047                    b.Navigation("FlowDetails");
 01048                });
 1049
 01050            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 01051                {
 01052                    b.Navigation("AssignedTasks");
 01053
 01054                    b.Navigation("RobotCertificate")
 01055                        .IsRequired();
 01056
 01057                    b.Navigation("RobotChassisInfo");
 01058
 01059                    b.Navigation("RobotSystemInfo");
 01060                });
 1061#pragma warning restore 612, 618
 01062        }
 1063    }
 1064}