< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 1081
Coverable lines: 1081
Total lines: 1166
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/20250518102000_AutoTaskJourney.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Migrations;
 3using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 4
 5#nullable disable
 6
 7namespace LGDXRobotCloud.Data.Migrations
 8{
 9    /// <inheritdoc />
 10    public partial class AutoTaskJourney : Migration
 11    {
 12        /// <inheritdoc />
 13        protected override void Up(MigrationBuilder migrationBuilder)
 014        {
 015            migrationBuilder.CreateTable(
 016                name: "Automation.AutoTaskJourney",
 017                columns: table => new
 018                {
 019                    Id = table.Column<int>(type: "integer", nullable: false)
 020                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultCol
 021                    CurrentProgressId = table.Column<int>(type: "integer", nullable: true),
 022                    AutoTaskId = table.Column<int>(type: "integer", nullable: false),
 023                    CreatedTime = table.Column<DateTime>(type: "timestamp(0) with time zone", precision: 0, nullable: fa
 024                },
 025                constraints: table =>
 026                {
 027                    table.PrimaryKey("PK_Automation.AutoTaskJourney", x => x.Id);
 028                    table.ForeignKey(
 029                        name: "FK_Automation.AutoTaskJourney_Automation.AutoTasks_AutoTaskId",
 030                        column: x => x.AutoTaskId,
 031                        principalTable: "Automation.AutoTasks",
 032                        principalColumn: "Id",
 033                        onDelete: ReferentialAction.Restrict);
 034                    table.ForeignKey(
 035                        name: "FK_Automation.AutoTaskJourney_Automation.Progresses_CurrentPro~",
 036                        column: x => x.CurrentProgressId,
 037                        principalTable: "Automation.Progresses",
 038                        principalColumn: "Id",
 039                        onDelete: ReferentialAction.SetNull);
 040                });
 41
 042            migrationBuilder.CreateIndex(
 043                name: "IX_Automation.AutoTaskJourney_AutoTaskId",
 044                table: "Automation.AutoTaskJourney",
 045                column: "AutoTaskId");
 46
 047            migrationBuilder.CreateIndex(
 048                name: "IX_Automation.AutoTaskJourney_CurrentProgressId",
 049                table: "Automation.AutoTaskJourney",
 050                column: "CurrentProgressId");
 051        }
 52
 53        /// <inheritdoc />
 54        protected override void Down(MigrationBuilder migrationBuilder)
 055        {
 056            migrationBuilder.DropTable(
 057                name: "Automation.AutoTaskJourney");
 058        }
 59    }
 60}

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Migrations/20250518102000_AutoTaskJourney.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("20250518102000_AutoTaskJourney")]
 16    partial class AutoTaskJourney
 17    {
 18        /// <inheritdoc />
 19        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 020        {
 21#pragma warning disable 612, 618
 022            modelBuilder
 023                .HasAnnotation("ProductVersion", "9.0.4")
 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.AutoTaskJourney", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("integer");
 0143
 0144                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0145
 0146                    b.Property<int>("AutoTaskId")
 0147                        .HasColumnType("integer");
 0148
 0149                    b.Property<DateTime>("CreatedTime")
 0150                        .HasPrecision(0)
 0151                        .HasColumnType("timestamp(0) with time zone");
 0152
 0153                    b.Property<int?>("CurrentProgressId")
 0154                        .HasColumnType("integer");
 0155
 0156                    b.HasKey("Id");
 0157
 0158                    b.HasIndex("AutoTaskId");
 0159
 0160                    b.HasIndex("CurrentProgressId");
 0161
 0162                    b.ToTable("Automation.AutoTaskJourney");
 0163                });
 164
 0165            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Flow", b =>
 0166                {
 0167                    b.Property<int>("Id")
 0168                        .ValueGeneratedOnAdd()
 0169                        .HasColumnType("integer");
 0170
 0171                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0172
 0173                    b.Property<string>("Name")
 0174                        .IsRequired()
 0175                        .HasMaxLength(50)
 0176                        .HasColumnType("character varying(50)");
 0177
 0178                    b.HasKey("Id");
 0179
 0180                    b.ToTable("Automation.Flows");
 0181                });
 182
 0183            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.FlowDetail", b =>
 0184                {
 0185                    b.Property<int>("Id")
 0186                        .ValueGeneratedOnAdd()
 0187                        .HasColumnType("integer");
 0188
 0189                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0190
 0191                    b.Property<int>("AutoTaskNextControllerId")
 0192                        .HasColumnType("integer");
 0193
 0194                    b.Property<int>("FlowId")
 0195                        .HasColumnType("integer");
 0196
 0197                    b.Property<int>("Order")
 0198                        .HasColumnType("integer");
 0199
 0200                    b.Property<int>("ProgressId")
 0201                        .HasColumnType("integer");
 0202
 0203                    b.Property<int?>("TriggerId")
 0204                        .HasColumnType("integer");
 0205
 0206                    b.HasKey("Id");
 0207
 0208                    b.HasIndex("FlowId");
 0209
 0210                    b.HasIndex("Order");
 0211
 0212                    b.HasIndex("ProgressId");
 0213
 0214                    b.HasIndex("TriggerId");
 0215
 0216                    b.ToTable("Automation.FlowDetails");
 0217                });
 218
 0219            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.LgdxRole", b =>
 0220                {
 0221                    b.Property<string>("Id")
 0222                        .HasColumnType("text");
 0223
 0224                    b.Property<string>("ConcurrencyStamp")
 0225                        .IsConcurrencyToken()
 0226                        .HasColumnType("text");
 0227
 0228                    b.Property<string>("Description")
 0229                        .HasColumnType("text");
 0230
 0231                    b.Property<string>("Name")
 0232                        .HasMaxLength(256)
 0233                        .HasColumnType("character varying(256)");
 0234
 0235                    b.Property<string>("NormalizedName")
 0236                        .HasMaxLength(256)
 0237                        .HasColumnType("character varying(256)");
 0238
 0239                    b.HasKey("Id");
 0240
 0241                    b.HasIndex("NormalizedName")
 0242                        .IsUnique()
 0243                        .HasDatabaseName("RoleNameIndex");
 0244
 0245                    b.ToTable("AspNetRoles", (string)null);
 0246                });
 247
 0248            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.LgdxUser", b =>
 0249                {
 0250                    b.Property<string>("Id")
 0251                        .HasColumnType("text");
 0252
 0253                    b.Property<int>("AccessFailedCount")
 0254                        .HasColumnType("integer");
 0255
 0256                    b.Property<string>("ConcurrencyStamp")
 0257                        .IsConcurrencyToken()
 0258                        .HasColumnType("text");
 0259
 0260                    b.Property<string>("Email")
 0261                        .HasMaxLength(256)
 0262                        .HasColumnType("character varying(256)");
 0263
 0264                    b.Property<bool>("EmailConfirmed")
 0265                        .HasColumnType("boolean");
 0266
 0267                    b.Property<bool>("LockoutEnabled")
 0268                        .HasColumnType("boolean");
 0269
 0270                    b.Property<DateTimeOffset?>("LockoutEnd")
 0271                        .HasColumnType("timestamp with time zone");
 0272
 0273                    b.Property<string>("Name")
 0274                        .HasColumnType("text");
 0275
 0276                    b.Property<string>("NormalizedEmail")
 0277                        .HasMaxLength(256)
 0278                        .HasColumnType("character varying(256)");
 0279
 0280                    b.Property<string>("NormalizedUserName")
 0281                        .HasMaxLength(256)
 0282                        .HasColumnType("character varying(256)");
 0283
 0284                    b.Property<string>("PasswordHash")
 0285                        .HasColumnType("text");
 0286
 0287                    b.Property<string>("PhoneNumber")
 0288                        .HasColumnType("text");
 0289
 0290                    b.Property<bool>("PhoneNumberConfirmed")
 0291                        .HasColumnType("boolean");
 0292
 0293                    b.Property<string>("RefreshTokenHash")
 0294                        .HasMaxLength(64)
 0295                        .HasColumnType("character varying(64)");
 0296
 0297                    b.Property<string>("SecurityStamp")
 0298                        .HasColumnType("text");
 0299
 0300                    b.Property<bool>("TwoFactorEnabled")
 0301                        .HasColumnType("boolean");
 0302
 0303                    b.Property<string>("UserName")
 0304                        .HasMaxLength(256)
 0305                        .HasColumnType("character varying(256)");
 0306
 0307                    b.HasKey("Id");
 0308
 0309                    b.HasIndex("NormalizedEmail")
 0310                        .HasDatabaseName("EmailIndex");
 0311
 0312                    b.HasIndex("NormalizedUserName")
 0313                        .IsUnique()
 0314                        .HasDatabaseName("UserNameIndex");
 0315
 0316                    b.ToTable("AspNetUsers", (string)null);
 0317                });
 318
 0319            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Progress", b =>
 0320                {
 0321                    b.Property<int>("Id")
 0322                        .ValueGeneratedOnAdd()
 0323                        .HasColumnType("integer");
 0324
 0325                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0326
 0327                    b.Property<string>("Name")
 0328                        .IsRequired()
 0329                        .HasMaxLength(50)
 0330                        .HasColumnType("character varying(50)");
 0331
 0332                    b.Property<bool>("Reserved")
 0333                        .HasColumnType("boolean");
 0334
 0335                    b.Property<bool>("System")
 0336                        .HasColumnType("boolean");
 0337
 0338                    b.HasKey("Id");
 0339
 0340                    b.ToTable("Automation.Progresses");
 0341
 0342                    b.HasData(
 0343                        new
 0344                        {
 0345                            Id = 1,
 0346                            Name = "Template",
 0347                            Reserved = true,
 0348                            System = true
 0349                        },
 0350                        new
 0351                        {
 0352                            Id = 2,
 0353                            Name = "Waiting",
 0354                            Reserved = true,
 0355                            System = true
 0356                        },
 0357                        new
 0358                        {
 0359                            Id = 3,
 0360                            Name = "Completed",
 0361                            Reserved = true,
 0362                            System = true
 0363                        },
 0364                        new
 0365                        {
 0366                            Id = 4,
 0367                            Name = "Aborted",
 0368                            Reserved = true,
 0369                            System = true
 0370                        },
 0371                        new
 0372                        {
 0373                            Id = 5,
 0374                            Name = "Starting",
 0375                            Reserved = false,
 0376                            System = true
 0377                        },
 0378                        new
 0379                        {
 0380                            Id = 6,
 0381                            Name = "Loading",
 0382                            Reserved = false,
 0383                            System = true
 0384                        },
 0385                        new
 0386                        {
 0387                            Id = 7,
 0388                            Name = "PreMoving",
 0389                            Reserved = false,
 0390                            System = true
 0391                        },
 0392                        new
 0393                        {
 0394                            Id = 8,
 0395                            Name = "Moving",
 0396                            Reserved = false,
 0397                            System = true
 0398                        },
 0399                        new
 0400                        {
 0401                            Id = 9,
 0402                            Name = "Unloading",
 0403                            Reserved = false,
 0404                            System = true
 0405                        },
 0406                        new
 0407                        {
 0408                            Id = 10,
 0409                            Name = "Completing",
 0410                            Reserved = false,
 0411                            System = true
 0412                        },
 0413                        new
 0414                        {
 0415                            Id = 99,
 0416                            Name = "Reserved",
 0417                            Reserved = true,
 0418                            System = true
 0419                        });
 0420                });
 421
 0422            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Realm", b =>
 0423                {
 0424                    b.Property<int>("Id")
 0425                        .ValueGeneratedOnAdd()
 0426                        .HasColumnType("integer");
 0427
 0428                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0429
 0430                    b.Property<string>("Description")
 0431                        .HasMaxLength(200)
 0432                        .HasColumnType("character varying(200)");
 0433
 0434                    b.Property<byte[]>("Image")
 0435                        .IsRequired()
 0436                        .HasColumnType("bytea");
 0437
 0438                    b.Property<string>("Name")
 0439                        .IsRequired()
 0440                        .HasMaxLength(50)
 0441                        .HasColumnType("character varying(50)");
 0442
 0443                    b.Property<double>("OriginRotation")
 0444                        .HasColumnType("double precision");
 0445
 0446                    b.Property<double>("OriginX")
 0447                        .HasColumnType("double precision");
 0448
 0449                    b.Property<double>("OriginY")
 0450                        .HasColumnType("double precision");
 0451
 0452                    b.Property<double>("Resolution")
 0453                        .HasColumnType("double precision");
 0454
 0455                    b.HasKey("Id");
 0456
 0457                    b.ToTable("Navigation.Realms");
 0458
 0459                    b.HasData(
 0460                        new
 0461                        {
 0462                            Id = 1,
 0463                            Description = "Please update this realm",
 0464                            Image = new byte[0],
 0465                            Name = "First Realm",
 0466                            OriginRotation = 0.0,
 0467                            OriginX = 0.0,
 0468                            OriginY = 0.0,
 0469                            Resolution = 0.0
 0470                        });
 0471                });
 472
 0473            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 0474                {
 0475                    b.Property<Guid>("Id")
 0476                        .ValueGeneratedOnAdd()
 0477                        .HasColumnType("uuid");
 0478
 0479                    b.Property<bool>("IsProtectingHardwareSerialNumber")
 0480                        .HasColumnType("boolean");
 0481
 0482                    b.Property<bool>("IsRealtimeExchange")
 0483                        .HasColumnType("boolean");
 0484
 0485                    b.Property<string>("Name")
 0486                        .IsRequired()
 0487                        .HasMaxLength(50)
 0488                        .HasColumnType("character varying(50)");
 0489
 0490                    b.Property<int>("RealmId")
 0491                        .HasColumnType("integer");
 0492
 0493                    b.HasKey("Id");
 0494
 0495                    b.HasIndex("RealmId");
 0496
 0497                    b.ToTable("Navigation.Robots");
 0498                });
 499
 0500            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotCertificate", b =>
 0501                {
 0502                    b.Property<Guid>("Id")
 0503                        .ValueGeneratedOnAdd()
 0504                        .HasColumnType("uuid");
 0505
 0506                    b.Property<DateTime>("NotAfter")
 0507                        .HasPrecision(0)
 0508                        .HasColumnType("timestamp(0) with time zone");
 0509
 0510                    b.Property<DateTime>("NotBefore")
 0511                        .HasPrecision(0)
 0512                        .HasColumnType("timestamp(0) with time zone");
 0513
 0514                    b.Property<Guid>("RobotId")
 0515                        .HasColumnType("uuid");
 0516
 0517                    b.Property<string>("Thumbprint")
 0518                        .IsRequired()
 0519                        .HasMaxLength(40)
 0520                        .HasColumnType("character varying(40)");
 0521
 0522                    b.Property<string>("ThumbprintBackup")
 0523                        .HasMaxLength(40)
 0524                        .HasColumnType("character varying(40)");
 0525
 0526                    b.HasKey("Id");
 0527
 0528                    b.HasIndex("RobotId")
 0529                        .IsUnique();
 0530
 0531                    b.ToTable("Navigation.RobotCertificates");
 0532                });
 533
 0534            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotChassisInfo", b =>
 0535                {
 0536                    b.Property<int>("Id")
 0537                        .ValueGeneratedOnAdd()
 0538                        .HasColumnType("integer");
 0539
 0540                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0541
 0542                    b.Property<int>("BatteryCount")
 0543                        .HasColumnType("integer");
 0544
 0545                    b.Property<double>("BatteryMaxVoltage")
 0546                        .HasColumnType("double precision");
 0547
 0548                    b.Property<double>("BatteryMinVoltage")
 0549                        .HasColumnType("double precision");
 0550
 0551                    b.Property<double>("ChassisLengthX")
 0552                        .HasColumnType("double precision");
 0553
 0554                    b.Property<double>("ChassisLengthY")
 0555                        .HasColumnType("double precision");
 0556
 0557                    b.Property<int>("ChassisWheelCount")
 0558                        .HasColumnType("integer");
 0559
 0560                    b.Property<double>("ChassisWheelRadius")
 0561                        .HasColumnType("double precision");
 0562
 0563                    b.Property<Guid>("RobotId")
 0564                        .HasColumnType("uuid");
 0565
 0566                    b.Property<int>("RobotTypeId")
 0567                        .HasColumnType("integer");
 0568
 0569                    b.HasKey("Id");
 0570
 0571                    b.HasIndex("RobotId")
 0572                        .IsUnique();
 0573
 0574                    b.ToTable("Navigation.RobotChassisInfos");
 0575                });
 576
 0577            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotSystemInfo", b =>
 0578                {
 0579                    b.Property<int>("Id")
 0580                        .ValueGeneratedOnAdd()
 0581                        .HasColumnType("integer");
 0582
 0583                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0584
 0585                    b.Property<string>("Cpu")
 0586                        .IsRequired()
 0587                        .HasMaxLength(100)
 0588                        .HasColumnType("character varying(100)");
 0589
 0590                    b.Property<string>("Gpu")
 0591                        .HasMaxLength(100)
 0592                        .HasColumnType("character varying(100)");
 0593
 0594                    b.Property<bool>("Is32Bit")
 0595                        .HasColumnType("boolean");
 0596
 0597                    b.Property<bool>("IsLittleEndian")
 0598                        .HasColumnType("boolean");
 0599
 0600                    b.Property<string>("McuSerialNumber")
 0601                        .HasMaxLength(100)
 0602                        .HasColumnType("character varying(100)");
 0603
 0604                    b.Property<string>("Motherboard")
 0605                        .IsRequired()
 0606                        .HasMaxLength(100)
 0607                        .HasColumnType("character varying(100)");
 0608
 0609                    b.Property<string>("MotherboardSerialNumber")
 0610                        .IsRequired()
 0611                        .HasMaxLength(100)
 0612                        .HasColumnType("character varying(100)");
 0613
 0614                    b.Property<string>("Os")
 0615                        .IsRequired()
 0616                        .HasMaxLength(100)
 0617                        .HasColumnType("character varying(100)");
 0618
 0619                    b.Property<int>("RamMiB")
 0620                        .HasColumnType("integer");
 0621
 0622                    b.Property<Guid>("RobotId")
 0623                        .HasColumnType("uuid");
 0624
 0625                    b.HasKey("Id");
 0626
 0627                    b.HasIndex("RobotId")
 0628                        .IsUnique();
 0629
 0630                    b.ToTable("Navigation.RobotSystemInfos");
 0631                });
 632
 0633            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Trigger", b =>
 0634                {
 0635                    b.Property<int>("Id")
 0636                        .ValueGeneratedOnAdd()
 0637                        .HasColumnType("integer");
 0638
 0639                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0640
 0641                    b.Property<string>("ApiKeyFieldName")
 0642                        .HasMaxLength(50)
 0643                        .HasColumnType("character varying(50)");
 0644
 0645                    b.Property<int?>("ApiKeyId")
 0646                        .HasColumnType("integer");
 0647
 0648                    b.Property<int?>("ApiKeyInsertLocationId")
 0649                        .HasColumnType("integer");
 0650
 0651                    b.Property<string>("Body")
 0652                        .HasColumnType("text");
 0653
 0654                    b.Property<int>("HttpMethodId")
 0655                        .HasColumnType("integer");
 0656
 0657                    b.Property<string>("Name")
 0658                        .IsRequired()
 0659                        .HasMaxLength(50)
 0660                        .HasColumnType("character varying(50)");
 0661
 0662                    b.Property<string>("Url")
 0663                        .IsRequired()
 0664                        .HasMaxLength(200)
 0665                        .HasColumnType("character varying(200)");
 0666
 0667                    b.HasKey("Id");
 0668
 0669                    b.HasIndex("ApiKeyId");
 0670
 0671                    b.HasIndex("ApiKeyInsertLocationId");
 0672
 0673                    b.ToTable("Automation.Triggers");
 0674                });
 675
 0676            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.TriggerRetry", b =>
 0677                {
 0678                    b.Property<int>("Id")
 0679                        .ValueGeneratedOnAdd()
 0680                        .HasColumnType("integer");
 0681
 0682                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0683
 0684                    b.Property<int>("AutoTaskId")
 0685                        .HasColumnType("integer");
 0686
 0687                    b.Property<string>("Body")
 0688                        .IsRequired()
 0689                        .HasColumnType("TEXT");
 0690
 0691                    b.Property<DateTime>("CreatedAt")
 0692                        .HasPrecision(3)
 0693                        .HasColumnType("timestamp(3) with time zone");
 0694
 0695                    b.Property<int>("TriggerId")
 0696                        .HasColumnType("integer");
 0697
 0698                    b.HasKey("Id");
 0699
 0700                    b.HasIndex("AutoTaskId");
 0701
 0702                    b.HasIndex("TriggerId");
 0703
 0704                    b.ToTable("Automation.TriggerRetries");
 0705                });
 706
 0707            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Waypoint", b =>
 0708                {
 0709                    b.Property<int>("Id")
 0710                        .ValueGeneratedOnAdd()
 0711                        .HasColumnType("integer");
 0712
 0713                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0714
 0715                    b.Property<bool>("HasCharger")
 0716                        .HasColumnType("boolean");
 0717
 0718                    b.Property<bool>("IsParking")
 0719                        .HasColumnType("boolean");
 0720
 0721                    b.Property<bool>("IsReserved")
 0722                        .HasColumnType("boolean");
 0723
 0724                    b.Property<string>("Name")
 0725                        .IsRequired()
 0726                        .HasMaxLength(100)
 0727                        .HasColumnType("character varying(100)");
 0728
 0729                    b.Property<int>("RealmId")
 0730                        .HasColumnType("integer");
 0731
 0732                    b.Property<double>("Rotation")
 0733                        .HasColumnType("double precision");
 0734
 0735                    b.Property<double>("X")
 0736                        .HasColumnType("double precision");
 0737
 0738                    b.Property<double>("Y")
 0739                        .HasColumnType("double precision");
 0740
 0741                    b.HasKey("Id");
 0742
 0743                    b.HasIndex("RealmId");
 0744
 0745                    b.ToTable("Navigation.Waypoints");
 0746                });
 747
 0748            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
 0749                {
 0750                    b.Property<int>("Id")
 0751                        .ValueGeneratedOnAdd()
 0752                        .HasColumnType("integer");
 0753
 0754                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0755
 0756                    b.Property<string>("ClaimType")
 0757                        .HasColumnType("text");
 0758
 0759                    b.Property<string>("ClaimValue")
 0760                        .HasColumnType("text");
 0761
 0762                    b.Property<string>("RoleId")
 0763                        .IsRequired()
 0764                        .HasColumnType("text");
 0765
 0766                    b.HasKey("Id");
 0767
 0768                    b.HasIndex("RoleId");
 0769
 0770                    b.ToTable("AspNetRoleClaims", (string)null);
 0771                });
 772
 0773            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
 0774                {
 0775                    b.Property<int>("Id")
 0776                        .ValueGeneratedOnAdd()
 0777                        .HasColumnType("integer");
 0778
 0779                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
 0780
 0781                    b.Property<string>("ClaimType")
 0782                        .HasColumnType("text");
 0783
 0784                    b.Property<string>("ClaimValue")
 0785                        .HasColumnType("text");
 0786
 0787                    b.Property<string>("UserId")
 0788                        .IsRequired()
 0789                        .HasColumnType("text");
 0790
 0791                    b.HasKey("Id");
 0792
 0793                    b.HasIndex("UserId");
 0794
 0795                    b.ToTable("AspNetUserClaims", (string)null);
 0796                });
 797
 0798            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
 0799                {
 0800                    b.Property<string>("LoginProvider")
 0801                        .HasColumnType("text");
 0802
 0803                    b.Property<string>("ProviderKey")
 0804                        .HasColumnType("text");
 0805
 0806                    b.Property<string>("ProviderDisplayName")
 0807                        .HasColumnType("text");
 0808
 0809                    b.Property<string>("UserId")
 0810                        .IsRequired()
 0811                        .HasColumnType("text");
 0812
 0813                    b.HasKey("LoginProvider", "ProviderKey");
 0814
 0815                    b.HasIndex("UserId");
 0816
 0817                    b.ToTable("AspNetUserLogins", (string)null);
 0818                });
 819
 0820            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
 0821                {
 0822                    b.Property<string>("UserId")
 0823                        .HasColumnType("text");
 0824
 0825                    b.Property<string>("RoleId")
 0826                        .HasColumnType("text");
 0827
 0828                    b.HasKey("UserId", "RoleId");
 0829
 0830                    b.HasIndex("RoleId");
 0831
 0832                    b.ToTable("AspNetUserRoles", (string)null);
 0833                });
 834
 0835            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
 0836                {
 0837                    b.Property<string>("UserId")
 0838                        .HasColumnType("text");
 0839
 0840                    b.Property<string>("LoginProvider")
 0841                        .HasColumnType("text");
 0842
 0843                    b.Property<string>("Name")
 0844                        .HasColumnType("text");
 0845
 0846                    b.Property<string>("Value")
 0847                        .HasColumnType("text");
 0848
 0849                    b.HasKey("UserId", "LoginProvider", "Name");
 0850
 0851                    b.ToTable("AspNetUserTokens", (string)null);
 0852                });
 853
 0854            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTask", b =>
 0855                {
 0856                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "AssignedRobot")
 0857                        .WithMany("AssignedTasks")
 0858                        .HasForeignKey("AssignedRobotId")
 0859                        .OnDelete(DeleteBehavior.SetNull);
 0860
 0861                    b.HasOne("LGDXRobotCloud.Data.Entities.Progress", "CurrentProgress")
 0862                        .WithMany()
 0863                        .HasForeignKey("CurrentProgressId")
 0864                        .OnDelete(DeleteBehavior.Restrict)
 0865                        .IsRequired();
 0866
 0867                    b.HasOne("LGDXRobotCloud.Data.Entities.Flow", "Flow")
 0868                        .WithMany()
 0869                        .HasForeignKey("FlowId")
 0870                        .OnDelete(DeleteBehavior.SetNull);
 0871
 0872                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 0873                        .WithMany()
 0874                        .HasForeignKey("RealmId")
 0875                        .OnDelete(DeleteBehavior.Cascade)
 0876                        .IsRequired();
 0877
 0878                    b.Navigation("AssignedRobot");
 0879
 0880                    b.Navigation("CurrentProgress");
 0881
 0882                    b.Navigation("Flow");
 0883
 0884                    b.Navigation("Realm");
 0885                });
 886
 0887            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTaskDetail", b =>
 0888                {
 0889                    b.HasOne("LGDXRobotCloud.Data.Entities.AutoTask", "AutoTask")
 0890                        .WithMany("AutoTaskDetails")
 0891                        .HasForeignKey("AutoTaskId")
 0892                        .OnDelete(DeleteBehavior.Cascade)
 0893                        .IsRequired();
 0894
 0895                    b.HasOne("LGDXRobotCloud.Data.Entities.Waypoint", "Waypoint")
 0896                        .WithMany()
 0897                        .HasForeignKey("WaypointId")
 0898                        .OnDelete(DeleteBehavior.SetNull);
 0899
 0900                    b.Navigation("AutoTask");
 0901
 0902                    b.Navigation("Waypoint");
 0903                });
 904
 0905            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTaskJourney", b =>
 0906                {
 0907                    b.HasOne("LGDXRobotCloud.Data.Entities.AutoTask", "AutoTask")
 0908                        .WithMany()
 0909                        .HasForeignKey("AutoTaskId")
 0910                        .OnDelete(DeleteBehavior.Restrict)
 0911                        .IsRequired();
 0912
 0913                    b.HasOne("LGDXRobotCloud.Data.Entities.Progress", "CurrentProgress")
 0914                        .WithMany()
 0915                        .HasForeignKey("CurrentProgressId")
 0916                        .OnDelete(DeleteBehavior.SetNull);
 0917
 0918                    b.Navigation("AutoTask");
 0919
 0920                    b.Navigation("CurrentProgress");
 0921                });
 922
 0923            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.FlowDetail", b =>
 0924                {
 0925                    b.HasOne("LGDXRobotCloud.Data.Entities.Flow", "Flow")
 0926                        .WithMany("FlowDetails")
 0927                        .HasForeignKey("FlowId")
 0928                        .OnDelete(DeleteBehavior.Cascade)
 0929                        .IsRequired();
 0930
 0931                    b.HasOne("LGDXRobotCloud.Data.Entities.Progress", "Progress")
 0932                        .WithMany()
 0933                        .HasForeignKey("ProgressId")
 0934                        .OnDelete(DeleteBehavior.Restrict)
 0935                        .IsRequired();
 0936
 0937                    b.HasOne("LGDXRobotCloud.Data.Entities.Trigger", "Trigger")
 0938                        .WithMany()
 0939                        .HasForeignKey("TriggerId")
 0940                        .OnDelete(DeleteBehavior.Restrict);
 0941
 0942                    b.Navigation("Flow");
 0943
 0944                    b.Navigation("Progress");
 0945
 0946                    b.Navigation("Trigger");
 0947                });
 948
 0949            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 0950                {
 0951                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 0952                        .WithMany()
 0953                        .HasForeignKey("RealmId")
 0954                        .OnDelete(DeleteBehavior.Restrict)
 0955                        .IsRequired();
 0956
 0957                    b.Navigation("Realm");
 0958                });
 959
 0960            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotCertificate", b =>
 0961                {
 0962                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0963                        .WithOne("RobotCertificate")
 0964                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotCertificate", "RobotId")
 0965                        .OnDelete(DeleteBehavior.Cascade)
 0966                        .IsRequired();
 0967
 0968                    b.Navigation("Robot");
 0969                });
 970
 0971            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotChassisInfo", b =>
 0972                {
 0973                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0974                        .WithOne("RobotChassisInfo")
 0975                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotChassisInfo", "RobotId")
 0976                        .OnDelete(DeleteBehavior.Cascade);
 0977
 0978                    b.Navigation("Robot");
 0979                });
 980
 0981            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.RobotSystemInfo", b =>
 0982                {
 0983                    b.HasOne("LGDXRobotCloud.Data.Entities.Robot", "Robot")
 0984                        .WithOne("RobotSystemInfo")
 0985                        .HasForeignKey("LGDXRobotCloud.Data.Entities.RobotSystemInfo", "RobotId")
 0986                        .OnDelete(DeleteBehavior.Cascade);
 0987
 0988                    b.Navigation("Robot");
 0989                });
 990
 0991            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Trigger", b =>
 0992                {
 0993                    b.HasOne("LGDXRobotCloud.Data.Entities.ApiKey", "ApiKey")
 0994                        .WithMany()
 0995                        .HasForeignKey("ApiKeyId")
 0996                        .OnDelete(DeleteBehavior.SetNull);
 0997
 0998                    b.Navigation("ApiKey");
 0999                });
 1000
 01001            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.TriggerRetry", b =>
 01002                {
 01003                    b.HasOne("LGDXRobotCloud.Data.Entities.AutoTask", "AutoTask")
 01004                        .WithMany()
 01005                        .HasForeignKey("AutoTaskId")
 01006                        .OnDelete(DeleteBehavior.Cascade)
 01007                        .IsRequired();
 01008
 01009                    b.HasOne("LGDXRobotCloud.Data.Entities.Trigger", "Trigger")
 01010                        .WithMany()
 01011                        .HasForeignKey("TriggerId")
 01012                        .OnDelete(DeleteBehavior.Cascade)
 01013                        .IsRequired();
 01014
 01015                    b.Navigation("AutoTask");
 01016
 01017                    b.Navigation("Trigger");
 01018                });
 1019
 01020            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Waypoint", b =>
 01021                {
 01022                    b.HasOne("LGDXRobotCloud.Data.Entities.Realm", "Realm")
 01023                        .WithMany()
 01024                        .HasForeignKey("RealmId")
 01025                        .OnDelete(DeleteBehavior.Restrict)
 01026                        .IsRequired();
 01027
 01028                    b.Navigation("Realm");
 01029                });
 1030
 01031            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
 01032                {
 01033                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxRole", null)
 01034                        .WithMany()
 01035                        .HasForeignKey("RoleId")
 01036                        .OnDelete(DeleteBehavior.Cascade)
 01037                        .IsRequired();
 01038                });
 1039
 01040            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
 01041                {
 01042                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01043                        .WithMany()
 01044                        .HasForeignKey("UserId")
 01045                        .OnDelete(DeleteBehavior.Cascade)
 01046                        .IsRequired();
 01047                });
 1048
 01049            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
 01050                {
 01051                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01052                        .WithMany()
 01053                        .HasForeignKey("UserId")
 01054                        .OnDelete(DeleteBehavior.Cascade)
 01055                        .IsRequired();
 01056                });
 1057
 01058            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
 01059                {
 01060                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxRole", null)
 01061                        .WithMany()
 01062                        .HasForeignKey("RoleId")
 01063                        .OnDelete(DeleteBehavior.Cascade)
 01064                        .IsRequired();
 01065
 01066                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01067                        .WithMany()
 01068                        .HasForeignKey("UserId")
 01069                        .OnDelete(DeleteBehavior.Cascade)
 01070                        .IsRequired();
 01071                });
 1072
 01073            modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
 01074                {
 01075                    b.HasOne("LGDXRobotCloud.Data.Entities.LgdxUser", null)
 01076                        .WithMany()
 01077                        .HasForeignKey("UserId")
 01078                        .OnDelete(DeleteBehavior.Cascade)
 01079                        .IsRequired();
 01080                });
 1081
 01082            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.AutoTask", b =>
 01083                {
 01084                    b.Navigation("AutoTaskDetails");
 01085                });
 1086
 01087            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Flow", b =>
 01088                {
 01089                    b.Navigation("FlowDetails");
 01090                });
 1091
 01092            modelBuilder.Entity("LGDXRobotCloud.Data.Entities.Robot", b =>
 01093                {
 01094                    b.Navigation("AssignedTasks");
 01095
 01096                    b.Navigation("RobotCertificate")
 01097                        .IsRequired();
 01098
 01099                    b.Navigation("RobotChassisInfo");
 01100
 01101                    b.Navigation("RobotSystemInfo");
 01102                });
 1103#pragma warning restore 612, 618
 01104        }
 1105    }
 1106}