< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 11350
Coverable lines: 11350
Total lines: 11729
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)

/home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/20261013091637_AddPartnerEmailLogin.cs

#LineLine coverage
 1using System;
 2using Microsoft.EntityFrameworkCore.Metadata;
 3using Microsoft.EntityFrameworkCore.Migrations;
 4
 5#nullable disable
 6
 7namespace OzonRepositories.Migrations
 8{
 9    /// <inheritdoc />
 10    public partial class AddPartnerEmailLogin : Migration
 11    {
 12        /// <inheritdoc />
 13        protected override void Up(MigrationBuilder migrationBuilder)
 14        {
 015            migrationBuilder.AddColumn<string>(
 016                name: "Email",
 017                table: "Partners",
 018                type: "varchar(320)",
 019                maxLength: 320,
 020                nullable: true)
 021                .Annotation("MySql:CharSet", "utf8mb4");
 22
 023            migrationBuilder.CreateTable(
 024                name: "PartnerLoginCodes",
 025                columns: table => new
 026                {
 027                    Id = table.Column<long>(type: "bigint", nullable: false)
 028                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
 029                    PartnerId = table.Column<long>(type: "bigint", nullable: false),
 030                    CodeHash = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
 031                        .Annotation("MySql:CharSet", "utf8mb4"),
 032                    Kind = table.Column<int>(type: "int", nullable: false),
 033                    CreatedAtUtc = table.Column<DateTime>(type: "datetime(6)", nullable: false),
 034                    ExpiresAtUtc = table.Column<DateTime>(type: "datetime(6)", nullable: false),
 035                    Attempts = table.Column<int>(type: "int", nullable: false),
 036                    ConsumedAtUtc = table.Column<DateTime>(type: "datetime(6)", nullable: true),
 037                    RequestIp = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
 038                        .Annotation("MySql:CharSet", "utf8mb4")
 039                },
 040                constraints: table =>
 041                {
 042                    table.PrimaryKey("PK_PartnerLoginCodes", x => x.Id);
 043                    table.ForeignKey(
 044                        name: "FK_PartnerLoginCodes_Partners_PartnerId",
 045                        column: x => x.PartnerId,
 046                        principalTable: "Partners",
 047                        principalColumn: "Id",
 048                        onDelete: ReferentialAction.Cascade);
 049                })
 050                .Annotation("MySql:CharSet", "utf8mb4");
 51
 052            migrationBuilder.CreateIndex(
 053                name: "IX_Partners_Email",
 054                table: "Partners",
 055                column: "Email",
 056                unique: true);
 57
 058            migrationBuilder.CreateIndex(
 059                name: "IX_PartnerLoginCodes_PartnerId_CreatedAtUtc",
 060                table: "PartnerLoginCodes",
 061                columns: new[] { "PartnerId", "CreatedAtUtc" });
 062        }
 63
 64        /// <inheritdoc />
 65        protected override void Down(MigrationBuilder migrationBuilder)
 66        {
 067            migrationBuilder.DropTable(
 068                name: "PartnerLoginCodes");
 69
 070            migrationBuilder.DropIndex(
 071                name: "IX_Partners_Email",
 072                table: "Partners");
 73
 074            migrationBuilder.DropColumn(
 075                name: "Email",
 076                table: "Partners");
 077        }
 78    }
 79}

/home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/20261013091637_AddPartnerEmailLogin.Designer.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Microsoft.EntityFrameworkCore;
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5using Microsoft.EntityFrameworkCore.Metadata;
 6using Microsoft.EntityFrameworkCore.Migrations;
 7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 8using OzonRepositories.Context;
 9
 10#nullable disable
 11
 12namespace OzonRepositories.Migrations
 13{
 14    [DbContext(typeof(ApplicationDbContext))]
 15    [Migration("20261013091637_AddPartnerEmailLogin")]
 16    partial class AddPartnerEmailLogin
 17    {
 18        /// <inheritdoc />
 19        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 20        {
 21#pragma warning disable 612, 618
 022            modelBuilder
 023                .HasAnnotation("ProductVersion", "8.0.10")
 024                .HasAnnotation("Relational:MaxIdentifierLength", 64);
 25
 026            MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
 27
 028            modelBuilder.Entity("AccessProfileDataScopeSet", b =>
 029                {
 030                    b.Property<int>("AccessProfilesId")
 031                        .HasColumnType("int");
 032
 033                    b.Property<int>("DataScopeSetsId")
 034                        .HasColumnType("int");
 035
 036                    b.HasKey("AccessProfilesId", "DataScopeSetsId");
 037
 038                    b.HasIndex("DataScopeSetsId");
 039
 040                    b.ToTable("AccessProfileDataScopeSets", (string)null);
 041                });
 42
 043            modelBuilder.Entity("OzonDomains.Delivery", b =>
 044                {
 045                    b.Property<int>("Id")
 046                        .ValueGeneratedOnAdd()
 047                        .HasColumnType("int");
 048
 049                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 050
 051                    b.Property<string>("Name")
 052                        .IsRequired()
 053                        .HasMaxLength(255)
 054                        .HasColumnType("varchar(255)");
 055
 056                    b.Property<int>("ProviderId")
 057                        .HasColumnType("int");
 058
 059                    b.HasKey("Id");
 060
 061                    b.HasIndex("ProviderId")
 062                        .HasDatabaseName("ProviderId");
 063
 064                    b.ToTable("Deliveries");
 065                });
 66
 067            modelBuilder.Entity("OzonDomains.ExcelMapping", b =>
 068                {
 069                    b.Property<int>("Id")
 070                        .ValueGeneratedOnAdd()
 071                        .HasColumnType("int");
 072
 073                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 074
 075                    b.Property<string>("ColumnMappingsJson")
 076                        .IsRequired()
 077                        .HasColumnType("text");
 078
 079                    b.Property<string>("CreatedBy")
 080                        .IsRequired()
 081                        .HasColumnType("varchar(255)");
 082
 083                    b.Property<DateTime>("CreatedDate")
 084                        .HasColumnType("datetime");
 085
 086                    b.Property<int>("DestinationDataStartRow")
 087                        .HasColumnType("int");
 088
 089                    b.Property<string>("DestinationFileName")
 090                        .IsRequired()
 091                        .HasMaxLength(500)
 092                        .HasColumnType("varchar(500)");
 093
 094                    b.Property<int>("DestinationHeaderRow")
 095                        .HasColumnType("int");
 096
 097                    b.Property<string>("DestinationSheet")
 098                        .IsRequired()
 099                        .HasMaxLength(100)
 0100                        .HasColumnType("varchar(100)");
 0101
 0102                    b.Property<DateTime?>("ModifiedDate")
 0103                        .HasColumnType("datetime");
 0104
 0105                    b.Property<string>("Name")
 0106                        .IsRequired()
 0107                        .HasMaxLength(255)
 0108                        .HasColumnType("varchar(255)");
 0109
 0110                    b.Property<int>("SourceDataStartRow")
 0111                        .HasColumnType("int");
 0112
 0113                    b.Property<string>("SourceFileName")
 0114                        .IsRequired()
 0115                        .HasMaxLength(500)
 0116                        .HasColumnType("varchar(500)");
 0117
 0118                    b.Property<int>("SourceHeaderRow")
 0119                        .HasColumnType("int");
 0120
 0121                    b.Property<string>("SourceSheet")
 0122                        .IsRequired()
 0123                        .HasMaxLength(100)
 0124                        .HasColumnType("varchar(100)");
 0125
 0126                    b.HasKey("Id");
 0127
 0128                    b.HasIndex("CreatedBy")
 0129                        .HasDatabaseName("IX_ExcelMappings_CreatedBy");
 0130
 0131                    b.HasIndex("CreatedDate")
 0132                        .HasDatabaseName("IX_ExcelMappings_CreatedDate");
 0133
 0134                    b.HasIndex("Name")
 0135                        .HasDatabaseName("IX_ExcelMappings_Name");
 0136
 0137                    b.ToTable("ExcelMappings");
 0138                });
 139
 0140            modelBuilder.Entity("OzonDomains.Models.AccessControl.AccessProfile", b =>
 0141                {
 0142                    b.Property<int>("Id")
 0143                        .ValueGeneratedOnAdd()
 0144                        .HasColumnType("int");
 0145
 0146                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0147
 0148                    b.Property<string>("AvailableOrderColumns")
 0149                        .HasColumnType("longtext");
 0150
 0151                    b.Property<string>("Name")
 0152                        .HasColumnType("longtext");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.ToTable("AccessProfiles");
 0157                });
 158
 0159            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSet", b =>
 0160                {
 0161                    b.Property<int>("Id")
 0162                        .ValueGeneratedOnAdd()
 0163                        .HasColumnType("int");
 0164
 0165                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0166
 0167                    b.Property<DateTime>("CreatedAt")
 0168                        .HasColumnType("datetime(6)");
 0169
 0170                    b.Property<string>("Description")
 0171                        .HasMaxLength(500)
 0172                        .HasColumnType("varchar(500)");
 0173
 0174                    b.Property<string>("Name")
 0175                        .IsRequired()
 0176                        .HasMaxLength(200)
 0177                        .HasColumnType("varchar(200)");
 0178
 0179                    b.HasKey("Id");
 0180
 0181                    b.ToTable("DataScopeSets");
 0182                });
 183
 0184            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSetItem", b =>
 0185                {
 0186                    b.Property<int>("Id")
 0187                        .ValueGeneratedOnAdd()
 0188                        .HasColumnType("int");
 0189
 0190                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0191
 0192                    b.Property<int>("DataScopeSetId")
 0193                        .HasColumnType("int");
 0194
 0195                    b.Property<int>("ReferenceId")
 0196                        .HasColumnType("int");
 0197
 0198                    b.Property<int>("ScopeType")
 0199                        .HasColumnType("int");
 0200
 0201                    b.HasKey("Id");
 0202
 0203                    b.HasIndex("DataScopeSetId");
 0204
 0205                    b.ToTable("DataScopeSetItems");
 0206                });
 207
 0208            modelBuilder.Entity("OzonDomains.Models.ApiSupplierRequestAuditEntry", b =>
 0209                {
 0210                    b.Property<long>("Id")
 0211                        .ValueGeneratedOnAdd()
 0212                        .HasColumnType("bigint");
 0213
 0214                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0215
 0216                    b.Property<string>("Actor")
 0217                        .HasMaxLength(450)
 0218                        .HasColumnType("varchar(450)");
 0219
 0220                    b.Property<long>("DurationMs")
 0221                        .HasColumnType("bigint");
 0222
 0223                    b.Property<string>("Endpoint")
 0224                        .IsRequired()
 0225                        .HasMaxLength(2048)
 0226                        .HasColumnType("varchar(2048)");
 0227
 0228                    b.Property<bool>("IsSuccess")
 0229                        .HasColumnType("tinyint(1)");
 0230
 0231                    b.Property<string>("Method")
 0232                        .IsRequired()
 0233                        .HasMaxLength(12)
 0234                        .HasColumnType("varchar(12)");
 0235
 0236                    b.Property<DateTime>("OccurredAtUtc")
 0237                        .HasColumnType("datetime(6)");
 0238
 0239                    b.Property<string>("ProviderKey")
 0240                        .IsRequired()
 0241                        .HasMaxLength(64)
 0242                        .HasColumnType("varchar(64)");
 0243
 0244                    b.Property<string>("Request")
 0245                        .HasColumnType("longtext");
 0246
 0247                    b.Property<string>("Response")
 0248                        .HasColumnType("longtext");
 0249
 0250                    b.Property<string>("Source")
 0251                        .IsRequired()
 0252                        .HasMaxLength(500)
 0253                        .HasColumnType("varchar(500)");
 0254
 0255                    b.Property<int?>("StatusCode")
 0256                        .HasColumnType("int");
 0257
 0258                    b.HasKey("Id");
 0259
 0260                    b.HasIndex("IsSuccess", "OccurredAtUtc");
 0261
 0262                    b.HasIndex("ProviderKey", "OccurredAtUtc");
 0263
 0264                    b.ToTable("ApiSupplierRequestAudit", (string)null);
 0265                });
 266
 0267            modelBuilder.Entity("OzonDomains.Models.ApiSupplierSettings", b =>
 0268                {
 0269                    b.Property<int>("Id")
 0270                        .ValueGeneratedOnAdd()
 0271                        .HasColumnType("int");
 0272
 0273                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0274
 0275                    b.Property<int>("CurrencyCode")
 0276                        .HasColumnType("int");
 0277
 0278                    b.Property<string>("DeliveryAddress")
 0279                        .HasMaxLength(300)
 0280                        .HasColumnType("varchar(300)");
 0281
 0282                    b.Property<string>("DisplayName")
 0283                        .HasMaxLength(120)
 0284                        .HasColumnType("varchar(120)");
 0285
 0286                    b.Property<int>("ExtraDeliveryHours")
 0287                        .HasColumnType("int");
 0288
 0289                    b.Property<bool>("IsQuotationEnabled")
 0290                        .HasColumnType("tinyint(1)");
 0291
 0292                    b.Property<decimal>("PriceMultiplier")
 0293                        .HasPrecision(10, 4)
 0294                        .HasColumnType("decimal(10,4)");
 0295
 0296                    b.Property<string>("ProviderKey")
 0297                        .IsRequired()
 0298                        .HasMaxLength(64)
 0299                        .HasColumnType("varchar(64)");
 0300
 0301                    b.Property<int?>("SupplierId")
 0302                        .HasColumnType("int");
 0303
 0304                    b.HasKey("Id");
 0305
 0306                    b.HasIndex("ProviderKey")
 0307                        .IsUnique()
 0308                        .HasDatabaseName("UX_ApiSupplierSettings_ProviderKey");
 0309
 0310                    b.HasIndex("SupplierId");
 0311
 0312                    b.ToTable("ApiSupplierSettings");
 0313                });
 314
 0315            modelBuilder.Entity("OzonDomains.Models.ApiSupplierWarehouse", b =>
 0316                {
 0317                    b.Property<long>("Id")
 0318                        .ValueGeneratedOnAdd()
 0319                        .HasColumnType("bigint");
 0320
 0321                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0322
 0323                    b.Property<string>("ProviderKey")
 0324                        .IsRequired()
 0325                        .HasMaxLength(64)
 0326                        .HasColumnType("varchar(64)");
 0327
 0328                    b.Property<int>("WarehouseId")
 0329                        .HasColumnType("int");
 0330
 0331                    b.HasKey("Id");
 0332
 0333                    b.HasIndex("WarehouseId");
 0334
 0335                    b.HasIndex("ProviderKey", "WarehouseId")
 0336                        .IsUnique();
 0337
 0338                    b.ToTable("ApiSupplierWarehouses");
 0339                });
 340
 0341            modelBuilder.Entity("OzonDomains.Models.AppStatus", b =>
 0342                {
 0343                    b.Property<int>("Id")
 0344                        .ValueGeneratedOnAdd()
 0345                        .HasColumnType("int");
 0346
 0347                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0348
 0349                    b.Property<bool>("IsFinal")
 0350                        .HasColumnType("tinyint(1)");
 0351
 0352                    b.Property<string>("Name")
 0353                        .HasMaxLength(50)
 0354                        .HasColumnType("varchar(50)");
 0355
 0356                    b.Property<int?>("StatusColorId")
 0357                        .HasColumnType("int");
 0358
 0359                    b.HasKey("Id");
 0360
 0361                    b.HasIndex("StatusColorId")
 0362                        .HasDatabaseName("FK_AppStatuses_StatusColors");
 0363
 0364                    b.ToTable("AppStatuses");
 0365                });
 366
 0367            modelBuilder.Entity("OzonDomains.Models.ArmtekCartItem", b =>
 0368                {
 0369                    b.Property<long>("Id")
 0370                        .ValueGeneratedOnAdd()
 0371                        .HasColumnType("bigint");
 0372
 0373                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0374
 0375                    b.Property<int?>("ActiveStudioOrderId")
 0376                        .HasColumnType("int");
 0377
 0378                    b.Property<string>("ArtId")
 0379                        .IsRequired()
 0380                        .HasMaxLength(40)
 0381                        .HasColumnType("varchar(40)");
 0382
 0383                    b.Property<string>("Brand")
 0384                        .IsRequired()
 0385                        .HasMaxLength(80)
 0386                        .HasColumnType("varchar(80)");
 0387
 0388                    b.Property<string>("BuyerKunnr")
 0389                        .HasMaxLength(10)
 0390                        .HasColumnType("varchar(10)");
 0391
 0392                    b.Property<DateTime>("CreatedAtUtc")
 0393                        .HasColumnType("datetime(6)");
 0394
 0395                    b.Property<string>("CreatedBy")
 0396                        .HasMaxLength(450)
 0397                        .HasColumnType("varchar(450)");
 0398
 0399                    b.Property<string>("CurrencyCode")
 0400                        .IsRequired()
 0401                        .HasMaxLength(8)
 0402                        .HasColumnType("varchar(8)");
 0403
 0404                    b.Property<string>("DeliveryAddressKunnr")
 0405                        .HasMaxLength(10)
 0406                        .HasColumnType("varchar(10)");
 0407
 0408                    b.Property<string>("DeliveryAddressName")
 0409                        .HasMaxLength(200)
 0410                        .HasColumnType("varchar(200)");
 0411
 0412                    b.Property<DateTime?>("DeliveryAtUtc")
 0413                        .HasColumnType("datetime(6)");
 0414
 0415                    b.Property<string>("Keyzak")
 0416                        .HasMaxLength(40)
 0417                        .HasColumnType("varchar(40)");
 0418
 0419                    b.Property<string>("LastError")
 0420                        .HasMaxLength(1000)
 0421                        .HasColumnType("varchar(1000)");
 0422
 0423                    b.Property<string>("PartnerWarehouseCode")
 0424                        .HasMaxLength(40)
 0425                        .HasColumnType("varchar(40)");
 0426
 0427                    b.Property<string>("Pin")
 0428                        .IsRequired()
 0429                        .HasMaxLength(40)
 0430                        .HasColumnType("varchar(40)");
 0431
 0432                    b.Property<string>("ProductName")
 0433                        .HasMaxLength(120)
 0434                        .HasColumnType("varchar(120)");
 0435
 0436                    b.Property<string>("ProviderKey")
 0437                        .IsRequired()
 0438                        .HasMaxLength(20)
 0439                        .HasColumnType("varchar(20)");
 0440
 0441                    b.Property<decimal>("Quantity")
 0442                        .HasPrecision(18, 3)
 0443                        .HasColumnType("decimal(18,3)");
 0444
 0445                    b.Property<decimal?>("SourcePrice")
 0446                        .HasPrecision(18, 4)
 0447                        .HasColumnType("decimal(18,4)");
 0448
 0449                    b.Property<string>("Status")
 0450                        .IsRequired()
 0451                        .HasMaxLength(30)
 0452                        .HasColumnType("varchar(30)");
 0453
 0454                    b.Property<int>("StudioOrderId")
 0455                        .HasColumnType("int");
 0456
 0457                    b.Property<string>("TestResultJson")
 0458                        .HasColumnType("longtext");
 0459
 0460                    b.Property<DateTime?>("TestedAtUtc")
 0461                        .HasColumnType("datetime(6)");
 0462
 0463                    b.Property<DateTime>("UpdatedAtUtc")
 0464                        .HasColumnType("datetime(6)");
 0465
 0466                    b.Property<string>("WarehouseName")
 0467                        .HasMaxLength(80)
 0468                        .HasColumnType("varchar(80)");
 0469
 0470                    b.HasKey("Id");
 0471
 0472                    b.HasIndex("StudioOrderId")
 0473                        .HasDatabaseName("FK_ArmtekCartItems_Orders_StudioOrderId");
 0474
 0475                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 0476                        .IsUnique()
 0477                        .HasDatabaseName("UX_ArmtekCartItems_Provider_ActiveOrder");
 0478
 0479                    b.HasIndex("ProviderKey", "CreatedAtUtc")
 0480                        .HasDatabaseName("IX_ArmtekCartItems_Provider_Created");
 0481
 0482                    b.HasIndex("ProviderKey", "StudioOrderId", "Status")
 0483                        .HasDatabaseName("IX_ArmtekCartItems_Provider_Order_Status");
 0484
 0485                    b.ToTable("ArmtekCartItems");
 0486                });
 487
 0488            modelBuilder.Entity("OzonDomains.Models.ArmtekDeliveryAddressMapping", b =>
 0489                {
 0490                    b.Property<long>("Id")
 0491                        .ValueGeneratedOnAdd()
 0492                        .HasColumnType("bigint");
 0493
 0494                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0495
 0496                    b.Property<string>("BuyerKunnr")
 0497                        .IsRequired()
 0498                        .HasMaxLength(10)
 0499                        .HasColumnType("varchar(10)");
 0500
 0501                    b.Property<string>("DeliveryAddressKunnr")
 0502                        .IsRequired()
 0503                        .HasMaxLength(10)
 0504                        .HasColumnType("varchar(10)");
 0505
 0506                    b.Property<string>("ProviderKey")
 0507                        .IsRequired()
 0508                        .HasMaxLength(20)
 0509                        .HasColumnType("varchar(20)");
 0510
 0511                    b.Property<int>("ShipmentWarehouseId")
 0512                        .HasColumnType("int");
 0513
 0514                    b.HasKey("Id");
 0515
 0516                    b.HasIndex("ShipmentWarehouseId")
 0517                        .HasDatabaseName("FK_ArmtekDeliveryAddressMappings_Warehouses_ShipmentWarehouseId");
 0518
 0519                    b.HasIndex("ProviderKey", "ShipmentWarehouseId")
 0520                        .IsUnique()
 0521                        .HasDatabaseName("UX_ArmtekDeliveryAddressMappings_Provider_Warehouse");
 0522
 0523                    b.ToTable("ArmtekDeliveryAddressMappings");
 0524                });
 525
 0526            modelBuilder.Entity("OzonDomains.Models.ArmtekOrder", b =>
 0527                {
 0528                    b.Property<long>("Id")
 0529                        .ValueGeneratedOnAdd()
 0530                        .HasColumnType("bigint");
 0531
 0532                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0533
 0534                    b.Property<DateTime>("CreatedAtUtc")
 0535                        .HasColumnType("datetime(6)");
 0536
 0537                    b.Property<string>("CreatedBy")
 0538                        .HasMaxLength(450)
 0539                        .HasColumnType("varchar(450)");
 0540
 0541                    b.Property<string>("Kunrg")
 0542                        .IsRequired()
 0543                        .HasMaxLength(10)
 0544                        .HasColumnType("varchar(10)");
 0545
 0546                    b.Property<string>("Kunza")
 0547                        .HasMaxLength(10)
 0548                        .HasColumnType("varchar(10)");
 0549
 0550                    b.Property<string>("ProviderKey")
 0551                        .IsRequired()
 0552                        .HasMaxLength(20)
 0553                        .HasColumnType("varchar(20)");
 0554
 0555                    b.Property<string>("RequestJson")
 0556                        .HasColumnType("longtext");
 0557
 0558                    b.Property<string>("ResponseJson")
 0559                        .HasColumnType("longtext");
 0560
 0561                    b.Property<string>("Status")
 0562                        .IsRequired()
 0563                        .HasMaxLength(30)
 0564                        .HasColumnType("varchar(30)");
 0565
 0566                    b.Property<string>("Vbeln")
 0567                        .IsRequired()
 0568                        .HasMaxLength(20)
 0569                        .HasColumnType("varchar(20)");
 0570
 0571                    b.Property<string>("Vkorg")
 0572                        .IsRequired()
 0573                        .HasMaxLength(10)
 0574                        .HasColumnType("varchar(10)");
 0575
 0576                    b.HasKey("Id");
 0577
 0578                    b.HasIndex("ProviderKey", "Vbeln")
 0579                        .IsUnique()
 0580                        .HasDatabaseName("UX_ArmtekOrders_Provider_Vbeln");
 0581
 0582                    b.ToTable("ArmtekOrders");
 0583                });
 584
 0585            modelBuilder.Entity("OzonDomains.Models.ArmtekOrderItem", b =>
 0586                {
 0587                    b.Property<long>("Id")
 0588                        .ValueGeneratedOnAdd()
 0589                        .HasColumnType("bigint");
 0590
 0591                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0592
 0593                    b.Property<long?>("ArmtekCartItemId")
 0594                        .HasColumnType("bigint");
 0595
 0596                    b.Property<long>("ArmtekOrderId")
 0597                        .HasColumnType("bigint");
 0598
 0599                    b.Property<string>("Brand")
 0600                        .IsRequired()
 0601                        .HasMaxLength(80)
 0602                        .HasColumnType("varchar(80)");
 0603
 0604                    b.Property<string>("CurrencyCode")
 0605                        .HasMaxLength(8)
 0606                        .HasColumnType("varchar(8)");
 0607
 0608                    b.Property<DateTime?>("DeliveryAtUtc")
 0609                        .HasColumnType("datetime(6)");
 0610
 0611                    b.Property<string>("Error")
 0612                        .HasMaxLength(1000)
 0613                        .HasColumnType("varchar(1000)");
 0614
 0615                    b.Property<string>("Pin")
 0616                        .IsRequired()
 0617                        .HasMaxLength(40)
 0618                        .HasColumnType("varchar(40)");
 0619
 0620                    b.Property<string>("Posnr")
 0621                        .HasMaxLength(20)
 0622                        .HasColumnType("varchar(20)");
 0623
 0624                    b.Property<decimal?>("Price")
 0625                        .HasPrecision(18, 4)
 0626                        .HasColumnType("decimal(18,4)");
 0627
 0628                    b.Property<decimal>("Quantity")
 0629                        .HasPrecision(18, 3)
 0630                        .HasColumnType("decimal(18,3)");
 0631
 0632                    b.Property<int>("StudioOrderId")
 0633                        .HasColumnType("int");
 0634
 0635                    b.HasKey("Id");
 0636
 0637                    b.HasIndex("ArmtekCartItemId")
 0638                        .HasDatabaseName("FK_ArmtekOrderItems_ArmtekCartItems");
 0639
 0640                    b.HasIndex("ArmtekOrderId")
 0641                        .HasDatabaseName("IX_ArmtekOrderItems_Order");
 0642
 0643                    b.HasIndex("StudioOrderId")
 0644                        .HasDatabaseName("FK_ArmtekOrderItems_Orders_StudioOrderId");
 0645
 0646                    b.ToTable("ArmtekOrderItems");
 0647                });
 648
 0649            modelBuilder.Entity("OzonDomains.Models.AssemblyListAccessKey", b =>
 0650                {
 0651                    b.Property<long>("Id")
 0652                        .ValueGeneratedOnAdd()
 0653                        .HasColumnType("bigint");
 0654
 0655                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0656
 0657                    b.Property<string>("AccessKey")
 0658                        .IsRequired()
 0659                        .HasMaxLength(64)
 0660                        .HasColumnType("varchar(64)");
 0661
 0662                    b.Property<string>("AllowedOzonClientIds")
 0663                        .IsRequired()
 0664                        .HasColumnType("varchar(1000)");
 0665
 0666                    b.Property<string>("AllowedStatuses")
 0667                        .IsRequired()
 0668                        .HasColumnType("varchar(1000)");
 0669
 0670                    b.Property<string>("AllowedWarehouses")
 0671                        .IsRequired()
 0672                        .HasColumnType("varchar(500)");
 0673
 0674                    b.Property<DateTime>("CreatedAt")
 0675                        .HasColumnType("datetime(6)");
 0676
 0677                    b.Property<string>("Description")
 0678                        .HasMaxLength(500)
 0679                        .HasColumnType("varchar(500)");
 0680
 0681                    b.Property<DateTime?>("ExpiresAt")
 0682                        .HasColumnType("datetime(6)");
 0683
 0684                    b.Property<bool>("IsActive")
 0685                        .HasColumnType("tinyint(1)");
 0686
 0687                    b.Property<int>("PeriodFromOffsetDays")
 0688                        .HasColumnType("int");
 0689
 0690                    b.Property<int>("PeriodToOffsetDays")
 0691                        .HasColumnType("int");
 0692
 0693                    b.HasKey("Id");
 0694
 0695                    b.HasIndex("AccessKey")
 0696                        .IsUnique()
 0697                        .HasDatabaseName("idx_alak_key");
 0698
 0699                    b.HasIndex("IsActive")
 0700                        .HasDatabaseName("idx_alak_active");
 0701
 0702                    b.ToTable("AssemblyListAccessKeys");
 0703                });
 704
 0705            modelBuilder.Entity("OzonDomains.Models.AssemblyListRun", b =>
 0706                {
 0707                    b.Property<long>("Id")
 0708                        .ValueGeneratedOnAdd()
 0709                        .HasColumnType("bigint");
 0710
 0711                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0712
 0713                    b.Property<DateTime?>("CompletedAtUtc")
 0714                        .HasColumnType("datetime(6)");
 0715
 0716                    b.Property<DateOnly>("CutoffFrom")
 0717                        .HasColumnType("date");
 0718
 0719                    b.Property<DateOnly>("CutoffTo")
 0720                        .HasColumnType("date");
 0721
 0722                    b.Property<string>("ErrorMessage")
 0723                        .HasColumnType("text");
 0724
 0725                    b.Property<string>("FilterStatus")
 0726                        .IsRequired()
 0727                        .HasMaxLength(64)
 0728                        .HasColumnType("varchar(64)");
 0729
 0730                    b.Property<int>("OzonClientId")
 0731                        .HasColumnType("int");
 0732
 0733                    b.Property<string>("OzonClientName")
 0734                        .IsRequired()
 0735                        .HasMaxLength(255)
 0736                        .HasColumnType("varchar(255)");
 0737
 0738                    b.Property<string>("RunStatus")
 0739                        .IsRequired()
 0740                        .HasMaxLength(32)
 0741                        .HasColumnType("varchar(32)");
 0742
 0743                    b.Property<DateTime>("StartedAtUtc")
 0744                        .HasColumnType("datetime(6)");
 0745
 0746                    b.Property<int>("TotalItems")
 0747                        .HasColumnType("int");
 0748
 0749                    b.Property<int>("TotalPostings")
 0750                        .HasColumnType("int");
 0751
 0752                    b.HasKey("Id");
 0753
 0754                    b.HasIndex("OzonClientId")
 0755                        .HasDatabaseName("idx_alr_client");
 0756
 0757                    b.HasIndex("StartedAtUtc")
 0758                        .HasDatabaseName("idx_alr_started");
 0759
 0760                    b.ToTable("AssemblyListRuns");
 0761                });
 762
 0763            modelBuilder.Entity("OzonDomains.Models.AssemblyListRunItem", b =>
 0764                {
 0765                    b.Property<long>("Id")
 0766                        .ValueGeneratedOnAdd()
 0767                        .HasColumnType("bigint");
 0768
 0769                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 0770
 0771                    b.Property<DateTime?>("CutoffDate")
 0772                        .HasColumnType("datetime(6)");
 0773
 0774                    b.Property<string>("ImageUrl")
 0775                        .HasColumnType("text");
 0776
 0777                    b.Property<int>("ItemIndex")
 0778                        .HasColumnType("int");
 0779
 0780                    b.Property<string>("LabelError")
 0781                        .HasColumnType("text");
 0782
 0783                    b.Property<string>("LabelUrl")
 0784                        .HasColumnType("text");
 0785
 0786                    b.Property<string>("OfferId")
 0787                        .IsRequired()
 0788                        .HasMaxLength(128)
 0789                        .HasColumnType("varchar(128)");
 0790
 0791                    b.Property<decimal?>("OneCBalance")
 0792                        .HasColumnType("decimal(18,3)");
 0793
 0794                    b.Property<string>("OneCOtherStock")
 0795                        .HasColumnType("text");
 0796
 0797                    b.Property<string>("OneCReceiptDoc")
 0798                        .HasColumnType("varchar(64)");
 0799
 0800                    b.Property<Guid?>("OneCReceiptDocKey")
 0801                        .HasColumnType("char(36)");
 0802
 0803                    b.Property<DateTime?>("OrderedToSupplierDate")
 0804                        .HasColumnType("datetime(6)");
 0805
 0806                    b.Property<string>("PostingNumber")
 0807                        .IsRequired()
 0808                        .HasMaxLength(64)
 0809                        .HasColumnType("varchar(64)");
 0810
 0811                    b.Property<string>("ProductName")
 0812                        .IsRequired()
 0813                        .HasColumnType("text");
 0814
 0815                    b.Property<int>("Quantity")
 0816                        .HasColumnType("int");
 0817
 0818                    b.Property<long>("RunId")
 0819                        .HasColumnType("bigint");
 0820
 0821                    b.Property<string>("Status")
 0822                        .IsRequired()
 0823                        .HasMaxLength(64)
 0824                        .HasColumnType("varchar(64)");
 0825
 0826                    b.Property<string>("StatusLabel")
 0827                        .IsRequired()
 0828                        .HasMaxLength(128)
 0829                        .HasColumnType("varchar(128)");
 0830
 0831                    b.Property<string>("SupplierName")
 0832                        .HasColumnType("varchar(255)");
 0833
 0834                    b.Property<long>("WarehouseId")
 0835                        .HasColumnType("bigint");
 0836
 0837                    b.Property<string>("WarehouseName")
 0838                        .IsRequired()
 0839                        .HasMaxLength(255)
 0840                        .HasColumnType("varchar(255)");
 0841
 0842                    b.HasKey("Id");
 0843
 0844                    b.HasIndex("RunId")
 0845                        .HasDatabaseName("idx_alri_run");
 0846
 0847                    b.ToTable("AssemblyListRunItems");
 0848                });
 849
 0850            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 0851                {
 0852                    b.Property<int>("Id")
 0853                        .ValueGeneratedOnAdd()
 0854                        .HasColumnType("int");
 0855
 0856                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0857
 0858                    b.Property<DateTime>("CreatedAt")
 0859                        .HasColumnType("datetime(6)");
 0860
 0861                    b.Property<string>("DisplayName")
 0862                        .IsRequired()
 0863                        .HasMaxLength(300)
 0864                        .HasColumnType("varchar(300)");
 0865
 0866                    b.Property<string>("EntityName")
 0867                        .IsRequired()
 0868                        .HasMaxLength(150)
 0869                        .HasColumnType("varchar(150)");
 0870
 0871                    b.Property<string>("FieldName")
 0872                        .IsRequired()
 0873                        .HasMaxLength(150)
 0874                        .HasColumnType("varchar(150)");
 0875
 0876                    b.Property<int>("FieldType")
 0877                        .HasColumnType("int");
 0878
 0879                    b.Property<bool>("IsActive")
 0880                        .HasColumnType("tinyint(1)");
 0881
 0882                    b.Property<int?>("PageId")
 0883                        .HasColumnType("int");
 0884
 0885                    b.Property<int>("SortOrder")
 0886                        .HasColumnType("int");
 0887
 0888                    b.Property<DateTime>("UpdatedAt")
 0889                        .HasColumnType("datetime(6)");
 0890
 0891                    b.HasKey("Id");
 0892
 0893                    b.HasIndex("PageId");
 0894
 0895                    b.HasIndex("EntityName", "FieldName", "FieldType")
 0896                        .IsUnique();
 0897
 0898                    b.ToTable("AppFields", (string)null);
 0899                });
 900
 0901            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 0902                {
 0903                    b.Property<int>("Id")
 0904                        .ValueGeneratedOnAdd()
 0905                        .HasColumnType("int");
 0906
 0907                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0908
 0909                    b.Property<string>("AccentClass")
 0910                        .HasMaxLength(50)
 0911                        .HasColumnType("varchar(50)");
 0912
 0913                    b.Property<string>("Action")
 0914                        .IsRequired()
 0915                        .HasMaxLength(100)
 0916                        .HasColumnType("varchar(100)");
 0917
 0918                    b.Property<string>("Area")
 0919                        .HasMaxLength(100)
 0920                        .HasColumnType("varchar(100)");
 0921
 0922                    b.Property<string>("Code")
 0923                        .IsRequired()
 0924                        .HasMaxLength(200)
 0925                        .HasColumnType("varchar(200)");
 0926
 0927                    b.Property<string>("Controller")
 0928                        .IsRequired()
 0929                        .HasMaxLength(100)
 0930                        .HasColumnType("varchar(100)");
 0931
 0932                    b.Property<DateTime>("CreatedAt")
 0933                        .HasColumnType("datetime(6)");
 0934
 0935                    b.Property<string>("DisplayName")
 0936                        .IsRequired()
 0937                        .HasMaxLength(300)
 0938                        .HasColumnType("varchar(300)");
 0939
 0940                    b.Property<string>("Icon")
 0941                        .HasMaxLength(100)
 0942                        .HasColumnType("varchar(100)");
 0943
 0944                    b.Property<bool>("IsActive")
 0945                        .HasColumnType("tinyint(1)");
 0946
 0947                    b.Property<bool>("IsMenuItem")
 0948                        .HasColumnType("tinyint(1)");
 0949
 0950                    b.Property<bool>("IsSectionHeader")
 0951                        .HasColumnType("tinyint(1)");
 0952
 0953                    b.Property<int?>("ParentId")
 0954                        .HasColumnType("int");
 0955
 0956                    b.Property<int>("SortOrder")
 0957                        .HasColumnType("int");
 0958
 0959                    b.Property<DateTime>("UpdatedAt")
 0960                        .HasColumnType("datetime(6)");
 0961
 0962                    b.HasKey("Id");
 0963
 0964                    b.HasIndex("Code")
 0965                        .IsUnique();
 0966
 0967                    b.HasIndex("ParentId");
 0968
 0969                    b.HasIndex("Area", "Controller", "Action");
 0970
 0971                    b.ToTable("AppPages", (string)null);
 0972                });
 973
 0974            modelBuilder.Entity("OzonDomains.Models.Authorization.AppRole", b =>
 0975                {
 0976                    b.Property<int>("Id")
 0977                        .ValueGeneratedOnAdd()
 0978                        .HasColumnType("int");
 0979
 0980                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 0981
 0982                    b.Property<DateTime>("CreatedAt")
 0983                        .HasColumnType("datetime(6)");
 0984
 0985                    b.Property<string>("Description")
 0986                        .HasMaxLength(1000)
 0987                        .HasColumnType("varchar(1000)");
 0988
 0989                    b.Property<string>("DisplayName")
 0990                        .IsRequired()
 0991                        .HasMaxLength(300)
 0992                        .HasColumnType("varchar(300)");
 0993
 0994                    b.Property<bool>("IsActive")
 0995                        .HasColumnType("tinyint(1)");
 0996
 0997                    b.Property<bool>("IsSystem")
 0998                        .HasColumnType("tinyint(1)");
 0999
 01000                    b.Property<string>("Name")
 01001                        .IsRequired()
 01002                        .HasMaxLength(150)
 01003                        .HasColumnType("varchar(150)");
 01004
 01005                    b.Property<DateTime>("UpdatedAt")
 01006                        .HasColumnType("datetime(6)");
 01007
 01008                    b.HasKey("Id");
 01009
 01010                    b.HasIndex("Name")
 01011                        .IsUnique();
 01012
 01013                    b.ToTable("AppRoles", (string)null);
 01014                });
 1015
 01016            modelBuilder.Entity("OzonDomains.Models.Authorization.AuditLogEntry", b =>
 01017                {
 01018                    b.Property<long>("Id")
 01019                        .ValueGeneratedOnAdd()
 01020                        .HasColumnType("bigint");
 01021
 01022                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01023
 01024                    b.Property<string>("Action")
 01025                        .IsRequired()
 01026                        .HasMaxLength(100)
 01027                        .HasColumnType("varchar(100)");
 01028
 01029                    b.Property<string>("ActorUserId")
 01030                        .HasMaxLength(450)
 01031                        .HasColumnType("varchar(450)");
 01032
 01033                    b.Property<string>("ActorUserName")
 01034                        .HasMaxLength(300)
 01035                        .HasColumnType("varchar(300)");
 01036
 01037                    b.Property<string>("Comment")
 01038                        .HasMaxLength(4000)
 01039                        .HasColumnType("varchar(4000)");
 01040
 01041                    b.Property<string>("EntityId")
 01042                        .HasMaxLength(450)
 01043                        .HasColumnType("varchar(450)");
 01044
 01045                    b.Property<string>("EntityType")
 01046                        .IsRequired()
 01047                        .HasMaxLength(150)
 01048                        .HasColumnType("varchar(150)");
 01049
 01050                    b.Property<string>("IpAddress")
 01051                        .HasMaxLength(100)
 01052                        .HasColumnType("varchar(100)");
 01053
 01054                    b.Property<string>("NewValue")
 01055                        .HasColumnType("text");
 01056
 01057                    b.Property<string>("OldValue")
 01058                        .HasColumnType("text");
 01059
 01060                    b.Property<DateTime>("Timestamp")
 01061                        .HasColumnType("datetime(6)");
 01062
 01063                    b.HasKey("Id");
 01064
 01065                    b.HasIndex("ActorUserId");
 01066
 01067                    b.HasIndex("Timestamp");
 01068
 01069                    b.HasIndex("EntityType", "EntityId");
 01070
 01071                    b.ToTable("AuthAuditLog", (string)null);
 01072                });
 1073
 01074            modelBuilder.Entity("OzonDomains.Models.Authorization.DataScope", b =>
 01075                {
 01076                    b.Property<int>("Id")
 01077                        .ValueGeneratedOnAdd()
 01078                        .HasColumnType("int");
 01079
 01080                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01081
 01082                    b.Property<string>("Code")
 01083                        .IsRequired()
 01084                        .HasMaxLength(150)
 01085                        .HasColumnType("varchar(150)");
 01086
 01087                    b.Property<DateTime>("CreatedAt")
 01088                        .HasColumnType("datetime(6)");
 01089
 01090                    b.Property<string>("Description")
 01091                        .HasMaxLength(2000)
 01092                        .HasColumnType("varchar(2000)");
 01093
 01094                    b.Property<string>("DisplayName")
 01095                        .IsRequired()
 01096                        .HasMaxLength(300)
 01097                        .HasColumnType("varchar(300)");
 01098
 01099                    b.Property<string>("EntityName")
 01100                        .IsRequired()
 01101                        .HasMaxLength(150)
 01102                        .HasColumnType("varchar(150)");
 01103
 01104                    b.Property<string>("FilterExpression")
 01105                        .IsRequired()
 01106                        .HasColumnType("text");
 01107
 01108                    b.Property<bool>("IsActive")
 01109                        .HasColumnType("tinyint(1)");
 01110
 01111                    b.Property<DateTime>("UpdatedAt")
 01112                        .HasColumnType("datetime(6)");
 01113
 01114                    b.HasKey("Id");
 01115
 01116                    b.HasIndex("Code")
 01117                        .IsUnique();
 01118
 01119                    b.HasIndex("EntityName");
 01120
 01121                    b.ToTable("DataScopes", (string)null);
 01122                });
 1123
 01124            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleDataScope", b =>
 01125                {
 01126                    b.Property<int>("Id")
 01127                        .ValueGeneratedOnAdd()
 01128                        .HasColumnType("int");
 01129
 01130                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01131
 01132                    b.Property<int>("AppRoleId")
 01133                        .HasColumnType("int");
 01134
 01135                    b.Property<int>("DataScopeId")
 01136                        .HasColumnType("int");
 01137
 01138                    b.HasKey("Id");
 01139
 01140                    b.HasIndex("DataScopeId");
 01141
 01142                    b.HasIndex("AppRoleId", "DataScopeId")
 01143                        .IsUnique();
 01144
 01145                    b.ToTable("RoleDataScopes", (string)null);
 01146                });
 1147
 01148            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleFieldPermission", b =>
 01149                {
 01150                    b.Property<int>("Id")
 01151                        .ValueGeneratedOnAdd()
 01152                        .HasColumnType("int");
 01153
 01154                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01155
 01156                    b.Property<int>("AppFieldId")
 01157                        .HasColumnType("int");
 01158
 01159                    b.Property<int>("AppRoleId")
 01160                        .HasColumnType("int");
 01161
 01162                    b.Property<bool>("CanRead")
 01163                        .HasColumnType("tinyint(1)");
 01164
 01165                    b.Property<bool>("CanWrite")
 01166                        .HasColumnType("tinyint(1)");
 01167
 01168                    b.HasKey("Id");
 01169
 01170                    b.HasIndex("AppFieldId");
 01171
 01172                    b.HasIndex("AppRoleId", "AppFieldId")
 01173                        .IsUnique();
 01174
 01175                    b.ToTable("RoleFieldPermissions", (string)null);
 01176                });
 1177
 01178            modelBuilder.Entity("OzonDomains.Models.Authorization.RolePagePermission", b =>
 01179                {
 01180                    b.Property<int>("Id")
 01181                        .ValueGeneratedOnAdd()
 01182                        .HasColumnType("int");
 01183
 01184                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01185
 01186                    b.Property<int>("AppPageId")
 01187                        .HasColumnType("int");
 01188
 01189                    b.Property<int>("AppRoleId")
 01190                        .HasColumnType("int");
 01191
 01192                    b.Property<bool>("CanCreate")
 01193                        .HasColumnType("tinyint(1)");
 01194
 01195                    b.Property<bool>("CanDelete")
 01196                        .HasColumnType("tinyint(1)");
 01197
 01198                    b.Property<bool>("CanEdit")
 01199                        .HasColumnType("tinyint(1)");
 01200
 01201                    b.Property<bool>("CanExport")
 01202                        .HasColumnType("tinyint(1)");
 01203
 01204                    b.Property<bool>("CanView")
 01205                        .HasColumnType("tinyint(1)");
 01206
 01207                    b.HasKey("Id");
 01208
 01209                    b.HasIndex("AppPageId");
 01210
 01211                    b.HasIndex("AppRoleId", "AppPageId")
 01212                        .IsUnique();
 01213
 01214                    b.ToTable("RolePagePermissions", (string)null);
 01215                });
 1216
 01217            modelBuilder.Entity("OzonDomains.Models.Authorization.UserAppRole", b =>
 01218                {
 01219                    b.Property<int>("Id")
 01220                        .ValueGeneratedOnAdd()
 01221                        .HasColumnType("int");
 01222
 01223                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01224
 01225                    b.Property<int>("AppRoleId")
 01226                        .HasColumnType("int");
 01227
 01228                    b.Property<DateTime>("AssignedAt")
 01229                        .HasColumnType("datetime(6)");
 01230
 01231                    b.Property<string>("AssignedBy")
 01232                        .HasMaxLength(450)
 01233                        .HasColumnType("varchar(450)");
 01234
 01235                    b.Property<string>("UserId")
 01236                        .IsRequired()
 01237                        .HasMaxLength(450)
 01238                        .HasColumnType("varchar(450)");
 01239
 01240                    b.HasKey("Id");
 01241
 01242                    b.HasIndex("AppRoleId");
 01243
 01244                    b.HasIndex("UserId", "AppRoleId")
 01245                        .IsUnique();
 01246
 01247                    b.ToTable("UserAppRoles", (string)null);
 01248                });
 1249
 01250            modelBuilder.Entity("OzonDomains.Models.Authorization.UserDataScope", b =>
 01251                {
 01252                    b.Property<int>("Id")
 01253                        .ValueGeneratedOnAdd()
 01254                        .HasColumnType("int");
 01255
 01256                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01257
 01258                    b.Property<DateTime>("AssignedAt")
 01259                        .HasColumnType("datetime(6)");
 01260
 01261                    b.Property<string>("AssignedBy")
 01262                        .HasMaxLength(150)
 01263                        .HasColumnType("varchar(150)");
 01264
 01265                    b.Property<int>("DataScopeId")
 01266                        .HasColumnType("int");
 01267
 01268                    b.Property<string>("UserId")
 01269                        .IsRequired()
 01270                        .HasMaxLength(450)
 01271                        .HasColumnType("varchar(450)");
 01272
 01273                    b.HasKey("Id");
 01274
 01275                    b.HasIndex("DataScopeId")
 01276                        .HasDatabaseName("FK_UserDataScopes_DataScopes_DataScopeId");
 01277
 01278                    b.HasIndex("UserId", "DataScopeId")
 01279                        .IsUnique();
 01280
 01281                    b.ToTable("UserDataScopes", (string)null);
 01282                });
 1283
 01284            modelBuilder.Entity("OzonDomains.Models.Authorization.UserFieldOverride", b =>
 01285                {
 01286                    b.Property<int>("Id")
 01287                        .ValueGeneratedOnAdd()
 01288                        .HasColumnType("int");
 01289
 01290                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01291
 01292                    b.Property<int>("AppFieldId")
 01293                        .HasColumnType("int");
 01294
 01295                    b.Property<bool?>("CanRead")
 01296                        .HasColumnType("tinyint(1)");
 01297
 01298                    b.Property<bool?>("CanWrite")
 01299                        .HasColumnType("tinyint(1)");
 01300
 01301                    b.Property<DateTime>("UpdatedAt")
 01302                        .HasColumnType("datetime(6)");
 01303
 01304                    b.Property<string>("UserId")
 01305                        .IsRequired()
 01306                        .HasMaxLength(450)
 01307                        .HasColumnType("varchar(450)");
 01308
 01309                    b.HasKey("Id");
 01310
 01311                    b.HasIndex("AppFieldId");
 01312
 01313                    b.HasIndex("UserId", "AppFieldId")
 01314                        .IsUnique();
 01315
 01316                    b.ToTable("UserFieldOverrides", (string)null);
 01317                });
 1318
 01319            modelBuilder.Entity("OzonDomains.Models.Authorization.UserPageOverride", b =>
 01320                {
 01321                    b.Property<int>("Id")
 01322                        .ValueGeneratedOnAdd()
 01323                        .HasColumnType("int");
 01324
 01325                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01326
 01327                    b.Property<int>("AppPageId")
 01328                        .HasColumnType("int");
 01329
 01330                    b.Property<bool?>("CanCreate")
 01331                        .HasColumnType("tinyint(1)");
 01332
 01333                    b.Property<bool?>("CanDelete")
 01334                        .HasColumnType("tinyint(1)");
 01335
 01336                    b.Property<bool?>("CanEdit")
 01337                        .HasColumnType("tinyint(1)");
 01338
 01339                    b.Property<bool?>("CanExport")
 01340                        .HasColumnType("tinyint(1)");
 01341
 01342                    b.Property<bool?>("CanView")
 01343                        .HasColumnType("tinyint(1)");
 01344
 01345                    b.Property<DateTime>("UpdatedAt")
 01346                        .HasColumnType("datetime(6)");
 01347
 01348                    b.Property<string>("UserId")
 01349                        .IsRequired()
 01350                        .HasMaxLength(450)
 01351                        .HasColumnType("varchar(450)");
 01352
 01353                    b.HasKey("Id");
 01354
 01355                    b.HasIndex("AppPageId");
 01356
 01357                    b.HasIndex("UserId", "AppPageId")
 01358                        .IsUnique();
 01359
 01360                    b.ToTable("UserPageOverrides", (string)null);
 01361                });
 1362
 01363            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 01364                {
 01365                    b.Property<long>("Id")
 01366                        .ValueGeneratedOnAdd()
 01367                        .HasColumnType("bigint");
 01368
 01369                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01370
 01371                    b.Property<DateTime?>("CompletedAt")
 01372                        .HasColumnType("datetime");
 01373
 01374                    b.Property<int>("CompletedSteps")
 01375                        .HasColumnType("int");
 01376
 01377                    b.Property<long?>("DurationMs")
 01378                        .HasColumnType("bigint");
 01379
 01380                    b.Property<string>("ErrorMessage")
 01381                        .HasColumnType("text");
 01382
 01383                    b.Property<string>("ErrorStackTrace")
 01384                        .HasColumnType("text");
 01385
 01386                    b.Property<int>("FailedOrders")
 01387                        .HasColumnType("int");
 01388
 01389                    b.Property<string>("JobType")
 01390                        .IsRequired()
 01391                        .HasMaxLength(100)
 01392                        .HasColumnType("varchar(100)");
 01393
 01394                    b.Property<int>("MatchedOrders")
 01395                        .HasColumnType("int");
 01396
 01397                    b.Property<int>("ProcessedOrders")
 01398                        .HasColumnType("int");
 01399
 01400                    b.Property<int?>("ScheduleId")
 01401                        .HasColumnType("int");
 01402
 01403                    b.Property<DateTime>("StartedAt")
 01404                        .HasColumnType("datetime");
 01405
 01406                    b.Property<string>("Status")
 01407                        .IsRequired()
 01408                        .HasMaxLength(50)
 01409                        .HasColumnType("varchar(50)");
 01410
 01411                    b.Property<int>("SuccessfulOrders")
 01412                        .HasColumnType("int");
 01413
 01414                    b.Property<int>("TotalOrders")
 01415                        .HasColumnType("int");
 01416
 01417                    b.Property<int>("TotalSteps")
 01418                        .HasColumnType("int");
 01419
 01420                    b.Property<string>("TriggerType")
 01421                        .IsRequired()
 01422                        .HasMaxLength(50)
 01423                        .HasColumnType("varchar(50)");
 01424
 01425                    b.HasKey("Id");
 01426
 01427                    b.HasIndex("JobType", "StartedAt")
 01428                        .HasDatabaseName("idx_job_type_started");
 01429
 01430                    b.HasIndex("ScheduleId", "StartedAt")
 01431                        .HasDatabaseName("idx_schedule_started");
 01432
 01433                    b.HasIndex("Status", "StartedAt")
 01434                        .HasDatabaseName("idx_status_started");
 01435
 01436                    b.ToTable("BackgroundJobExecutions");
 01437                });
 1438
 01439            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 01440                {
 01441                    b.Property<int>("Id")
 01442                        .ValueGeneratedOnAdd()
 01443                        .HasColumnType("int");
 01444
 01445                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 01446
 01447                    b.Property<DateTime>("CreatedAt")
 01448                        .HasColumnType("datetime");
 01449
 01450                    b.Property<string>("CronExpression")
 01451                        .IsRequired()
 01452                        .HasMaxLength(100)
 01453                        .HasColumnType("varchar(100)");
 01454
 01455                    b.Property<int>("DaysBack")
 01456                        .HasColumnType("int");
 01457
 01458                    b.Property<bool>("IsActive")
 01459                        .HasColumnType("tinyint(1)");
 01460
 01461                    b.Property<string>("JobType")
 01462                        .IsRequired()
 01463                        .HasMaxLength(100)
 01464                        .HasColumnType("varchar(100)");
 01465
 01466                    b.Property<DateTime?>("LastRunTime")
 01467                        .HasColumnType("datetime");
 01468
 01469                    b.Property<string>("Name")
 01470                        .IsRequired()
 01471                        .HasMaxLength(200)
 01472                        .HasColumnType("varchar(200)");
 01473
 01474                    b.Property<DateTime?>("NextRunTime")
 01475                        .HasColumnType("datetime");
 01476
 01477                    b.Property<int?>("OzonClientId")
 01478                        .HasColumnType("int");
 01479
 01480                    b.Property<DateTime>("UpdatedAt")
 01481                        .HasColumnType("datetime");
 01482
 01483                    b.HasKey("Id");
 01484
 01485                    b.HasIndex("OzonClientId")
 01486                        .HasDatabaseName("fk_schedule_ozon_client");
 01487
 01488                    b.HasIndex("JobType", "IsActive")
 01489                        .HasDatabaseName("idx_job_type_active");
 01490
 01491                    b.HasIndex("NextRunTime", "IsActive")
 01492                        .HasDatabaseName("idx_next_run");
 01493
 01494                    b.ToTable("BackgroundJobSchedules");
 01495                });
 1496
 01497            modelBuilder.Entity("OzonDomains.Models.BackgroundJobStep", b =>
 01498                {
 01499                    b.Property<long>("Id")
 01500                        .ValueGeneratedOnAdd()
 01501                        .HasColumnType("bigint");
 01502
 01503                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01504
 01505                    b.Property<DateTime?>("CompletedAt")
 01506                        .HasColumnType("datetime");
 01507
 01508                    b.Property<long?>("DurationMs")
 01509                        .HasColumnType("bigint");
 01510
 01511                    b.Property<string>("ErrorMessage")
 01512                        .HasColumnType("text");
 01513
 01514                    b.Property<long>("ExecutionId")
 01515                        .HasColumnType("bigint");
 01516
 01517                    b.Property<string>("InputData")
 01518                        .HasColumnType("json");
 01519
 01520                    b.Property<string>("OutputData")
 01521                        .HasColumnType("json");
 01522
 01523                    b.Property<DateTime>("StartedAt")
 01524                        .HasColumnType("datetime");
 01525
 01526                    b.Property<string>("Status")
 01527                        .IsRequired()
 01528                        .HasMaxLength(50)
 01529                        .HasColumnType("varchar(50)");
 01530
 01531                    b.Property<string>("StepName")
 01532                        .IsRequired()
 01533                        .HasMaxLength(200)
 01534                        .HasColumnType("varchar(200)");
 01535
 01536                    b.Property<int>("StepNumber")
 01537                        .HasColumnType("int");
 01538
 01539                    b.HasKey("Id");
 01540
 01541                    b.HasIndex("Status")
 01542                        .HasDatabaseName("idx_status");
 01543
 01544                    b.HasIndex("ExecutionId", "StepNumber")
 01545                        .HasDatabaseName("idx_execution_step");
 01546
 01547                    b.ToTable("BackgroundJobSteps");
 01548                });
 1549
 01550            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 01551                {
 01552                    b.Property<long>("Id")
 01553                        .ValueGeneratedOnAdd()
 01554                        .HasColumnType("bigint");
 01555
 01556                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01557
 01558                    b.Property<string>("Article")
 01559                        .IsRequired()
 01560                        .HasMaxLength(100)
 01561                        .HasColumnType("varchar(100)");
 01562
 01563                    b.Property<DateTime>("CreatedAt")
 01564                        .HasColumnType("datetime");
 01565
 01566                    b.Property<long>("ExecutionId")
 01567                        .HasColumnType("bigint");
 01568
 01569                    b.Property<bool>("IsEligibleForProcessing")
 01570                        .HasColumnType("tinyint(1)");
 01571
 01572                    b.Property<bool>("IsMatchedInDb")
 01573                        .HasColumnType("tinyint(1)");
 01574
 01575                    b.Property<int?>("OrderId")
 01576                        .HasColumnType("int");
 01577
 01578                    b.Property<string>("OrderNumber")
 01579                        .IsRequired()
 01580                        .HasMaxLength(100)
 01581                        .HasColumnType("varchar(100)");
 01582
 01583                    b.Property<string>("OrderStatus")
 01584                        .HasMaxLength(100)
 01585                        .HasColumnType("varchar(100)");
 01586
 01587                    b.Property<string>("RejectionReason")
 01588                        .HasMaxLength(500)
 01589                        .HasColumnType("varchar(500)");
 01590
 01591                    b.Property<long?>("ReportLoadId")
 01592                        .HasColumnType("bigint");
 01593
 01594                    b.Property<long?>("StepId")
 01595                        .HasColumnType("bigint");
 01596
 01597                    b.HasKey("Id");
 01598
 01599                    b.HasIndex("ExecutionId")
 01600                        .HasDatabaseName("idx_execution");
 01601
 01602                    b.HasIndex("OrderId")
 01603                        .HasDatabaseName("idx_order");
 01604
 01605                    b.HasIndex("ReportLoadId")
 01606                        .HasDatabaseName("idx_report_load");
 01607
 01608                    b.HasIndex("StepId")
 01609                        .HasDatabaseName("fk_match_step");
 01610
 01611                    b.HasIndex("IsMatchedInDb", "IsEligibleForProcessing")
 01612                        .HasDatabaseName("idx_eligibility");
 01613
 01614                    b.HasIndex("OrderNumber", "Article")
 01615                        .HasDatabaseName("idx_order_number_article");
 01616
 01617                    b.ToTable("BackgroundOrderMatches");
 01618                });
 1619
 01620            modelBuilder.Entity("OzonDomains.Models.BackgroundReportLoad", b =>
 01621                {
 01622                    b.Property<long>("Id")
 01623                        .ValueGeneratedOnAdd()
 01624                        .HasColumnType("bigint");
 01625
 01626                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01627
 01628                    b.Property<DateTime>("CreatedAt")
 01629                        .HasColumnType("datetime");
 01630
 01631                    b.Property<string>("ErrorMessage")
 01632                        .HasColumnType("text");
 01633
 01634                    b.Property<long>("ExecutionId")
 01635                        .HasColumnType("bigint");
 01636
 01637                    b.Property<string>("FileName")
 01638                        .HasMaxLength(500)
 01639                        .HasColumnType("varchar(500)");
 01640
 01641                    b.Property<long?>("FileSizeBytes")
 01642                        .HasColumnType("bigint");
 01643
 01644                    b.Property<string>("FileUrl")
 01645                        .HasColumnType("text");
 01646
 01647                    b.Property<int>("OzonClientId")
 01648                        .HasColumnType("int");
 01649
 01650                    b.Property<string>("ReportCode")
 01651                        .HasMaxLength(100)
 01652                        .HasColumnType("varchar(100)");
 01653
 01654                    b.Property<DateTime>("ReportPeriodFrom")
 01655                        .HasColumnType("datetime");
 01656
 01657                    b.Property<DateTime>("ReportPeriodTo")
 01658                        .HasColumnType("datetime");
 01659
 01660                    b.Property<int?>("RowsWithRequiredData")
 01661                        .HasColumnType("int");
 01662
 01663                    b.Property<string>("Status")
 01664                        .IsRequired()
 01665                        .HasMaxLength(50)
 01666                        .HasColumnType("varchar(50)");
 01667
 01668                    b.Property<long?>("StepId")
 01669                        .HasColumnType("bigint");
 01670
 01671                    b.Property<int?>("TotalRows")
 01672                        .HasColumnType("int");
 01673
 01674                    b.Property<int?>("UniqueOrderNumbers")
 01675                        .HasColumnType("int");
 01676
 01677                    b.HasKey("Id");
 01678
 01679                    b.HasIndex("ExecutionId")
 01680                        .HasDatabaseName("idx_execution");
 01681
 01682                    b.HasIndex("OzonClientId")
 01683                        .HasDatabaseName("idx_ozon_client");
 01684
 01685                    b.HasIndex("ReportCode")
 01686                        .HasDatabaseName("idx_report_code");
 01687
 01688                    b.HasIndex("StepId")
 01689                        .HasDatabaseName("fk_report_step");
 01690
 01691                    b.ToTable("BackgroundReportLoads");
 01692                });
 1693
 01694            modelBuilder.Entity("OzonDomains.Models.BackgroundTransactionResult", b =>
 01695                {
 01696                    b.Property<long>("Id")
 01697                        .ValueGeneratedOnAdd()
 01698                        .HasColumnType("bigint");
 01699
 01700                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01701
 01702                    b.Property<string>("Comment")
 01703                        .HasMaxLength(1000)
 01704                        .HasColumnType("varchar(1000)");
 01705
 01706                    b.Property<DateTime>("CreatedAt")
 01707                        .HasColumnType("datetime");
 01708
 01709                    b.Property<string>("ErrorMessage")
 01710                        .HasColumnType("text");
 01711
 01712                    b.Property<long>("ExecutionId")
 01713                        .HasColumnType("bigint");
 01714
 01715                    b.Property<bool>("IsAutomated")
 01716                        .HasColumnType("tinyint(1)");
 01717
 01718                    b.Property<bool>("IsPosted")
 01719                        .HasColumnType("tinyint(1)");
 01720
 01721                    b.Property<string>("OneCDocumentId")
 01722                        .HasMaxLength(100)
 01723                        .HasColumnType("varchar(100)");
 01724
 01725                    b.Property<string>("OneCDocumentNumber")
 01726                        .HasMaxLength(100)
 01727                        .HasColumnType("varchar(100)");
 01728
 01729                    b.Property<int>("OrderId")
 01730                        .HasColumnType("int");
 01731
 01732                    b.Property<long?>("OrderMatchId")
 01733                        .HasColumnType("bigint");
 01734
 01735                    b.Property<string>("Status")
 01736                        .IsRequired()
 01737                        .HasMaxLength(50)
 01738                        .HasColumnType("varchar(50)");
 01739
 01740                    b.Property<long?>("StepId")
 01741                        .HasColumnType("bigint");
 01742
 01743                    b.Property<int?>("TransactionId")
 01744                        .HasColumnType("int");
 01745
 01746                    b.Property<string>("WarehouseName")
 01747                        .HasMaxLength(200)
 01748                        .HasColumnType("varchar(200)");
 01749
 01750                    b.HasKey("Id");
 01751
 01752                    b.HasIndex("ExecutionId")
 01753                        .HasDatabaseName("idx_execution");
 01754
 01755                    b.HasIndex("OrderId")
 01756                        .HasDatabaseName("idx_order");
 01757
 01758                    b.HasIndex("OrderMatchId")
 01759                        .HasDatabaseName("idx_order_match");
 01760
 01761                    b.HasIndex("Status")
 01762                        .HasDatabaseName("idx_status");
 01763
 01764                    b.HasIndex("StepId")
 01765                        .HasDatabaseName("fk_result_step");
 01766
 01767                    b.HasIndex("TransactionId")
 01768                        .HasDatabaseName("idx_transaction");
 01769
 01770                    b.ToTable("BackgroundTransactionResults");
 01771                });
 1772
 01773            modelBuilder.Entity("OzonDomains.Models.BergCartItem", b =>
 01774                {
 01775                    b.Property<long>("Id")
 01776                        .ValueGeneratedOnAdd()
 01777                        .HasColumnType("bigint");
 01778
 01779                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01780
 01781                    b.Property<int?>("ActiveStudioOrderId")
 01782                        .HasColumnType("int");
 01783
 01784                    b.Property<string>("Article")
 01785                        .IsRequired()
 01786                        .HasMaxLength(60)
 01787                        .HasColumnType("varchar(60)");
 01788
 01789                    b.Property<string>("Brand")
 01790                        .IsRequired()
 01791                        .HasMaxLength(100)
 01792                        .HasColumnType("varchar(100)");
 01793
 01794                    b.Property<DateTime>("CreatedAtUtc")
 01795                        .HasColumnType("datetime(6)");
 01796
 01797                    b.Property<string>("CreatedBy")
 01798                        .HasMaxLength(450)
 01799                        .HasColumnType("varchar(450)");
 01800
 01801                    b.Property<string>("CurrencyCode")
 01802                        .IsRequired()
 01803                        .HasMaxLength(8)
 01804                        .HasColumnType("varchar(8)");
 01805
 01806                    b.Property<DateTime?>("DeliveryAtUtc")
 01807                        .HasColumnType("datetime(6)");
 01808
 01809                    b.Property<string>("LastError")
 01810                        .HasMaxLength(1000)
 01811                        .HasColumnType("varchar(1000)");
 01812
 01813                    b.Property<decimal?>("MaxPrice")
 01814                        .HasPrecision(18, 4)
 01815                        .HasColumnType("decimal(18,4)");
 01816
 01817                    b.Property<int>("Multi")
 01818                        .HasColumnType("int");
 01819
 01820                    b.Property<string>("ProductName")
 01821                        .HasMaxLength(200)
 01822                        .HasColumnType("varchar(200)");
 01823
 01824                    b.Property<decimal>("Quantity")
 01825                        .HasPrecision(18, 3)
 01826                        .HasColumnType("decimal(18,3)");
 01827
 01828                    b.Property<long>("ResourceId")
 01829                        .HasColumnType("bigint");
 01830
 01831                    b.Property<decimal?>("SourcePrice")
 01832                        .HasPrecision(18, 4)
 01833                        .HasColumnType("decimal(18,4)");
 01834
 01835                    b.Property<string>("Status")
 01836                        .IsRequired()
 01837                        .HasMaxLength(30)
 01838                        .HasColumnType("varchar(30)");
 01839
 01840                    b.Property<int>("StudioOrderId")
 01841                        .HasColumnType("int");
 01842
 01843                    b.Property<DateTime>("UpdatedAtUtc")
 01844                        .HasColumnType("datetime(6)");
 01845
 01846                    b.Property<long>("WarehouseId")
 01847                        .HasColumnType("bigint");
 01848
 01849                    b.Property<string>("WarehouseName")
 01850                        .HasMaxLength(160)
 01851                        .HasColumnType("varchar(160)");
 01852
 01853                    b.HasKey("Id");
 01854
 01855                    b.HasIndex("ActiveStudioOrderId")
 01856                        .IsUnique()
 01857                        .HasDatabaseName("UX_BergCartItems_ActiveStudioOrderId");
 01858
 01859                    b.HasIndex("CreatedAtUtc")
 01860                        .HasDatabaseName("IX_BergCartItems_Created");
 01861
 01862                    b.HasIndex("StudioOrderId", "Status")
 01863                        .HasDatabaseName("IX_BergCartItems_Order_Status");
 01864
 01865                    b.ToTable("BergCartItems");
 01866                });
 1867
 01868            modelBuilder.Entity("OzonDomains.Models.BergDeliveryAddressMapping", b =>
 01869                {
 01870                    b.Property<long>("Id")
 01871                        .ValueGeneratedOnAdd()
 01872                        .HasColumnType("bigint");
 01873
 01874                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01875
 01876                    b.Property<string>("AddressName")
 01877                        .HasMaxLength(300)
 01878                        .HasColumnType("varchar(300)");
 01879
 01880                    b.Property<long>("BergShipmentAddressId")
 01881                        .HasColumnType("bigint");
 01882
 01883                    b.Property<int>("DispatchType")
 01884                        .HasColumnType("int");
 01885
 01886                    b.Property<int>("ShipmentWarehouseId")
 01887                        .HasColumnType("int");
 01888
 01889                    b.HasKey("Id");
 01890
 01891                    b.HasIndex("ShipmentWarehouseId")
 01892                        .IsUnique()
 01893                        .HasDatabaseName("UX_BergDeliveryAddressMappings_Warehouse");
 01894
 01895                    b.ToTable("BergDeliveryAddressMappings");
 01896                });
 1897
 01898            modelBuilder.Entity("OzonDomains.Models.BergOrder", b =>
 01899                {
 01900                    b.Property<long>("Id")
 01901                        .ValueGeneratedOnAdd()
 01902                        .HasColumnType("bigint");
 01903
 01904                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01905
 01906                    b.Property<DateTime>("CreatedAtUtc")
 01907                        .HasColumnType("datetime(6)");
 01908
 01909                    b.Property<string>("CreatedBy")
 01910                        .HasMaxLength(450)
 01911                        .HasColumnType("varchar(450)");
 01912
 01913                    b.Property<DateTime>("DispatchAt")
 01914                        .HasColumnType("datetime(6)");
 01915
 01916                    b.Property<int>("DispatchTime")
 01917                        .HasColumnType("int");
 01918
 01919                    b.Property<int>("DispatchType")
 01920                        .HasColumnType("int");
 01921
 01922                    b.Property<long>("ExternalOrderId")
 01923                        .HasColumnType("bigint");
 01924
 01925                    b.Property<bool>("IsTest")
 01926                        .HasColumnType("tinyint(1)");
 01927
 01928                    b.Property<int?>("PaymentType")
 01929                        .HasColumnType("int");
 01930
 01931                    b.Property<long?>("Reference")
 01932                        .HasColumnType("bigint");
 01933
 01934                    b.Property<string>("RequestJson")
 01935                        .HasColumnType("longtext");
 01936
 01937                    b.Property<string>("ResponseJson")
 01938                        .HasColumnType("longtext");
 01939
 01940                    b.Property<string>("ShipmentAddress")
 01941                        .HasMaxLength(300)
 01942                        .HasColumnType("varchar(300)");
 01943
 01944                    b.Property<long?>("ShipmentAddressId")
 01945                        .HasColumnType("bigint");
 01946
 01947                    b.Property<string>("Status")
 01948                        .IsRequired()
 01949                        .HasMaxLength(50)
 01950                        .HasColumnType("varchar(50)");
 01951
 01952                    b.HasKey("Id");
 01953
 01954                    b.HasIndex("ExternalOrderId")
 01955                        .IsUnique()
 01956                        .HasDatabaseName("UX_BergOrders_ExternalOrderId");
 01957
 01958                    b.HasIndex("Reference")
 01959                        .IsUnique()
 01960                        .HasDatabaseName("UX_BergOrders_Reference");
 01961
 01962                    b.ToTable("BergOrders");
 01963                });
 1964
 01965            modelBuilder.Entity("OzonDomains.Models.BergOrderItem", b =>
 01966                {
 01967                    b.Property<long>("Id")
 01968                        .ValueGeneratedOnAdd()
 01969                        .HasColumnType("bigint");
 01970
 01971                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 01972
 01973                    b.Property<string>("Article")
 01974                        .IsRequired()
 01975                        .HasMaxLength(60)
 01976                        .HasColumnType("varchar(60)");
 01977
 01978                    b.Property<long?>("BergCartItemId")
 01979                        .HasColumnType("bigint");
 01980
 01981                    b.Property<long>("BergOrderId")
 01982                        .HasColumnType("bigint");
 01983
 01984                    b.Property<string>("Brand")
 01985                        .IsRequired()
 01986                        .HasMaxLength(100)
 01987                        .HasColumnType("varchar(100)");
 01988
 01989                    b.Property<string>("Error")
 01990                        .HasMaxLength(1000)
 01991                        .HasColumnType("varchar(1000)");
 01992
 01993                    b.Property<decimal?>("Price")
 01994                        .HasPrecision(18, 4)
 01995                        .HasColumnType("decimal(18,4)");
 01996
 01997                    b.Property<decimal>("Quantity")
 01998                        .HasPrecision(18, 3)
 01999                        .HasColumnType("decimal(18,3)");
 02000
 02001                    b.Property<long>("ResourceId")
 02002                        .HasColumnType("bigint");
 02003
 02004                    b.Property<int>("Sequence")
 02005                        .HasColumnType("int");
 02006
 02007                    b.Property<int?>("StateId")
 02008                        .HasColumnType("int");
 02009
 02010                    b.Property<string>("StateName")
 02011                        .HasMaxLength(200)
 02012                        .HasColumnType("varchar(200)");
 02013
 02014                    b.Property<int>("StudioOrderId")
 02015                        .HasColumnType("int");
 02016
 02017                    b.Property<long>("WarehouseId")
 02018                        .HasColumnType("bigint");
 02019
 02020                    b.HasKey("Id");
 02021
 02022                    b.HasIndex("BergCartItemId")
 02023                        .HasDatabaseName("IX_BergOrderItems_CartItem");
 02024
 02025                    b.HasIndex("BergOrderId")
 02026                        .HasDatabaseName("IX_BergOrderItems_Order");
 02027
 02028                    b.HasIndex("StudioOrderId")
 02029                        .HasDatabaseName("IX_BergOrderItems_StudioOrder");
 02030
 02031                    b.ToTable("BergOrderItems");
 02032                });
 2033
 02034            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveExecution", b =>
 02035                {
 02036                    b.Property<long>("Id")
 02037                        .ValueGeneratedOnAdd()
 02038                        .HasColumnType("bigint");
 02039
 02040                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02041
 02042                    b.Property<DateTime?>("CompletedAt")
 02043                        .HasColumnType("datetime");
 02044
 02045                    b.Property<long?>("DurationMs")
 02046                        .HasColumnType("bigint");
 02047
 02048                    b.Property<string>("ErrorMessage")
 02049                        .HasColumnType("text");
 02050
 02051                    b.Property<int>("FailedCount")
 02052                        .HasColumnType("int");
 02053
 02054                    b.Property<string>("HangfireJobId")
 02055                        .HasMaxLength(100)
 02056                        .HasColumnType("varchar(100)");
 02057
 02058                    b.Property<string>("JobId")
 02059                        .IsRequired()
 02060                        .HasMaxLength(64)
 02061                        .HasColumnType("varchar(64)");
 02062
 02063                    b.Property<DateTime>("StartedAt")
 02064                        .HasColumnType("datetime");
 02065
 02066                    b.Property<string>("Status")
 02067                        .IsRequired()
 02068                        .HasMaxLength(50)
 02069                        .HasColumnType("varchar(50)");
 02070
 02071                    b.Property<int>("SuccessCount")
 02072                        .HasColumnType("int");
 02073
 02074                    b.Property<int>("TotalItems")
 02075                        .HasColumnType("int");
 02076
 02077                    b.Property<string>("TriggerType")
 02078                        .IsRequired()
 02079                        .HasMaxLength(50)
 02080                        .HasColumnType("varchar(50)");
 02081
 02082                    b.Property<string>("TriggeredByUserId")
 02083                        .HasMaxLength(450)
 02084                        .HasColumnType("varchar(450)");
 02085
 02086                    b.Property<string>("TriggeredByUserName")
 02087                        .HasMaxLength(256)
 02088                        .HasColumnType("varchar(256)");
 02089
 02090                    b.HasKey("Id");
 02091
 02092                    b.HasIndex("JobId")
 02093                        .IsUnique()
 02094                        .HasDatabaseName("uk_archive_job_id");
 02095
 02096                    b.HasIndex("StartedAt")
 02097                        .HasDatabaseName("idx_archive_started_at");
 02098
 02099                    b.HasIndex("Status", "StartedAt")
 02100                        .HasDatabaseName("idx_archive_status_started");
 02101
 02102                    b.ToTable("BitrixStockArchiveExecutions");
 02103                });
 2104
 02105            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveItem", b =>
 02106                {
 02107                    b.Property<long>("Id")
 02108                        .ValueGeneratedOnAdd()
 02109                        .HasColumnType("bigint");
 02110
 02111                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02112
 02113                    b.Property<string>("Article")
 02114                        .HasMaxLength(200)
 02115                        .HasColumnType("varchar(200)");
 02116
 02117                    b.Property<string>("ErrorMessage")
 02118                        .HasColumnType("text");
 02119
 02120                    b.Property<long>("ExecutionId")
 02121                        .HasColumnType("bigint");
 02122
 02123                    b.Property<string>("OfferId")
 02124                        .IsRequired()
 02125                        .HasMaxLength(200)
 02126                        .HasColumnType("varchar(200)");
 02127
 02128                    b.Property<string>("OzonClient")
 02129                        .IsRequired()
 02130                        .HasMaxLength(200)
 02131                        .HasColumnType("varchar(200)");
 02132
 02133                    b.Property<long>("OzonProductId")
 02134                        .HasColumnType("bigint");
 02135
 02136                    b.Property<DateTime?>("ProcessedAt")
 02137                        .HasColumnType("datetime");
 02138
 02139                    b.Property<int>("SortOrder")
 02140                        .HasColumnType("int");
 02141
 02142                    b.Property<string>("Status")
 02143                        .IsRequired()
 02144                        .HasMaxLength(50)
 02145                        .HasColumnType("varchar(50)");
 02146
 02147                    b.Property<bool>("WasArchived")
 02148                        .HasColumnType("tinyint(1)");
 02149
 02150                    b.HasKey("Id");
 02151
 02152                    b.HasIndex("ExecutionId", "SortOrder")
 02153                        .HasDatabaseName("idx_archive_execution_sort");
 02154
 02155                    b.HasIndex("ExecutionId", "Status")
 02156                        .HasDatabaseName("idx_archive_execution_status");
 02157
 02158                    b.ToTable("BitrixStockArchiveItems");
 02159                });
 2160
 02161            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 02162                {
 02163                    b.Property<int>("Id")
 02164                        .ValueGeneratedOnAdd()
 02165                        .HasColumnType("int");
 02166
 02167                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02168
 02169                    b.Property<string>("ActionType")
 02170                        .IsRequired()
 02171                        .HasMaxLength(50)
 02172                        .HasColumnType("varchar(50)");
 02173
 02174                    b.Property<DateTime>("CreatedAt")
 02175                        .HasColumnType("datetime");
 02176
 02177                    b.Property<string>("CronExpression")
 02178                        .IsRequired()
 02179                        .HasMaxLength(100)
 02180                        .HasColumnType("varchar(100)");
 02181
 02182                    b.Property<string>("FilterJson")
 02183                        .IsRequired()
 02184                        .HasColumnType("longtext");
 02185
 02186                    b.Property<bool>("IsActive")
 02187                        .HasColumnType("tinyint(1)");
 02188
 02189                    b.Property<DateTime?>("LastRunAt")
 02190                        .HasColumnType("datetime");
 02191
 02192                    b.Property<int>("MaxItemsPerRun")
 02193                        .HasColumnType("int");
 02194
 02195                    b.Property<string>("Name")
 02196                        .IsRequired()
 02197                        .HasMaxLength(256)
 02198                        .HasColumnType("varchar(256)");
 02199
 02200                    b.Property<DateTime?>("NextRunAt")
 02201                        .HasColumnType("datetime");
 02202
 02203                    b.Property<int>("OzonClientId")
 02204                        .HasColumnType("int");
 02205
 02206                    b.Property<DateTime>("UpdatedAt")
 02207                        .HasColumnType("datetime");
 02208
 02209                    b.HasKey("Id");
 02210
 02211                    b.HasIndex("IsActive")
 02212                        .HasDatabaseName("idx_auto_active");
 02213
 02214                    b.HasIndex("NextRunAt")
 02215                        .HasDatabaseName("idx_auto_next_run");
 02216
 02217                    b.HasIndex("OzonClientId");
 02218
 02219                    b.ToTable("BitrixStockAutoSchedules");
 02220                });
 2221
 02222            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoScheduleRun", b =>
 02223                {
 02224                    b.Property<long>("Id")
 02225                        .ValueGeneratedOnAdd()
 02226                        .HasColumnType("bigint");
 02227
 02228                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02229
 02230                    b.Property<int>("CandidatesFound")
 02231                        .HasColumnType("int");
 02232
 02233                    b.Property<long?>("ClearExecutionId")
 02234                        .HasColumnType("bigint");
 02235
 02236                    b.Property<DateTime?>("CompletedAt")
 02237                        .HasColumnType("datetime");
 02238
 02239                    b.Property<string>("ErrorMessage")
 02240                        .HasColumnType("text");
 02241
 02242                    b.Property<int>("ItemsQueued")
 02243                        .HasColumnType("int");
 02244
 02245                    b.Property<long?>("PushExecutionId")
 02246                        .HasColumnType("bigint");
 02247
 02248                    b.Property<string>("RunLog")
 02249                        .HasColumnType("text");
 02250
 02251                    b.Property<int>("ScheduleId")
 02252                        .HasColumnType("int");
 02253
 02254                    b.Property<DateTime>("StartedAt")
 02255                        .HasColumnType("datetime");
 02256
 02257                    b.Property<string>("Status")
 02258                        .IsRequired()
 02259                        .HasMaxLength(50)
 02260                        .HasColumnType("varchar(50)");
 02261
 02262                    b.HasKey("Id");
 02263
 02264                    b.HasIndex("ScheduleId", "StartedAt")
 02265                        .HasDatabaseName("idx_run_schedule_started");
 02266
 02267                    b.ToTable("BitrixStockAutoScheduleRuns");
 02268                });
 2269
 02270            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearExecution", b =>
 02271                {
 02272                    b.Property<long>("Id")
 02273                        .ValueGeneratedOnAdd()
 02274                        .HasColumnType("bigint");
 02275
 02276                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02277
 02278                    b.Property<DateTime?>("CompletedAt")
 02279                        .HasColumnType("datetime");
 02280
 02281                    b.Property<long?>("DurationMs")
 02282                        .HasColumnType("bigint");
 02283
 02284                    b.Property<string>("ErrorMessage")
 02285                        .HasColumnType("text");
 02286
 02287                    b.Property<int>("FailedCount")
 02288                        .HasColumnType("int");
 02289
 02290                    b.Property<string>("HangfireJobId")
 02291                        .HasMaxLength(100)
 02292                        .HasColumnType("varchar(100)");
 02293
 02294                    b.Property<string>("JobId")
 02295                        .IsRequired()
 02296                        .HasMaxLength(64)
 02297                        .HasColumnType("varchar(64)");
 02298
 02299                    b.Property<DateTime>("StartedAt")
 02300                        .HasColumnType("datetime");
 02301
 02302                    b.Property<string>("Status")
 02303                        .IsRequired()
 02304                        .HasMaxLength(50)
 02305                        .HasColumnType("varchar(50)");
 02306
 02307                    b.Property<int>("SuccessCount")
 02308                        .HasColumnType("int");
 02309
 02310                    b.Property<int>("TotalItems")
 02311                        .HasColumnType("int");
 02312
 02313                    b.Property<string>("TriggerType")
 02314                        .IsRequired()
 02315                        .HasMaxLength(50)
 02316                        .HasColumnType("varchar(50)");
 02317
 02318                    b.Property<string>("TriggeredByUserId")
 02319                        .HasMaxLength(450)
 02320                        .HasColumnType("varchar(450)");
 02321
 02322                    b.Property<string>("TriggeredByUserName")
 02323                        .HasMaxLength(256)
 02324                        .HasColumnType("varchar(256)");
 02325
 02326                    b.HasKey("Id");
 02327
 02328                    b.HasIndex("JobId")
 02329                        .IsUnique()
 02330                        .HasDatabaseName("uk_job_id");
 02331
 02332                    b.HasIndex("StartedAt")
 02333                        .HasDatabaseName("idx_started_at");
 02334
 02335                    b.HasIndex("Status", "StartedAt")
 02336                        .HasDatabaseName("idx_status_started");
 02337
 02338                    b.ToTable("BitrixStockClearExecutions");
 02339                });
 2340
 02341            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearItem", b =>
 02342                {
 02343                    b.Property<long>("Id")
 02344                        .ValueGeneratedOnAdd()
 02345                        .HasColumnType("bigint");
 02346
 02347                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02348
 02349                    b.Property<string>("Article")
 02350                        .HasMaxLength(200)
 02351                        .HasColumnType("varchar(200)");
 02352
 02353                    b.Property<string>("ErrorMessage")
 02354                        .HasColumnType("text");
 02355
 02356                    b.Property<long>("ExecutionId")
 02357                        .HasColumnType("bigint");
 02358
 02359                    b.Property<string>("OfferId")
 02360                        .IsRequired()
 02361                        .HasMaxLength(200)
 02362                        .HasColumnType("varchar(200)");
 02363
 02364                    b.Property<string>("OzonClient")
 02365                        .IsRequired()
 02366                        .HasMaxLength(200)
 02367                        .HasColumnType("varchar(200)");
 02368
 02369                    b.Property<int>("PreviousStock")
 02370                        .HasColumnType("int");
 02371
 02372                    b.Property<DateTime?>("ProcessedAt")
 02373                        .HasColumnType("datetime");
 02374
 02375                    b.Property<long>("ProductId")
 02376                        .HasColumnType("bigint");
 02377
 02378                    b.Property<int>("SortOrder")
 02379                        .HasColumnType("int");
 02380
 02381                    b.Property<string>("Status")
 02382                        .IsRequired()
 02383                        .HasMaxLength(50)
 02384                        .HasColumnType("varchar(50)");
 02385
 02386                    b.Property<int>("TargetStock")
 02387                        .HasColumnType("int");
 02388
 02389                    b.Property<long>("WarehouseId")
 02390                        .HasColumnType("bigint");
 02391
 02392                    b.Property<string>("WarehouseName")
 02393                        .HasMaxLength(200)
 02394                        .HasColumnType("varchar(200)");
 02395
 02396                    b.HasKey("Id");
 02397
 02398                    b.HasIndex("ExecutionId", "SortOrder")
 02399                        .HasDatabaseName("idx_execution_sort");
 02400
 02401                    b.HasIndex("ExecutionId", "Status")
 02402                        .HasDatabaseName("idx_execution_status");
 02403
 02404                    b.ToTable("BitrixStockClearItems");
 02405                });
 2406
 02407            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushExecution", b =>
 02408                {
 02409                    b.Property<long>("Id")
 02410                        .ValueGeneratedOnAdd()
 02411                        .HasColumnType("bigint");
 02412
 02413                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02414
 02415                    b.Property<DateTime?>("CompletedAt")
 02416                        .HasColumnType("datetime");
 02417
 02418                    b.Property<long?>("DurationMs")
 02419                        .HasColumnType("bigint");
 02420
 02421                    b.Property<string>("ErrorMessage")
 02422                        .HasColumnType("text");
 02423
 02424                    b.Property<int>("FailedCount")
 02425                        .HasColumnType("int");
 02426
 02427                    b.Property<string>("HangfireJobId")
 02428                        .HasMaxLength(100)
 02429                        .HasColumnType("varchar(100)");
 02430
 02431                    b.Property<string>("JobId")
 02432                        .IsRequired()
 02433                        .HasMaxLength(64)
 02434                        .HasColumnType("varchar(64)");
 02435
 02436                    b.Property<DateTime>("StartedAt")
 02437                        .HasColumnType("datetime");
 02438
 02439                    b.Property<string>("Status")
 02440                        .IsRequired()
 02441                        .HasMaxLength(50)
 02442                        .HasColumnType("varchar(50)");
 02443
 02444                    b.Property<int>("SuccessCount")
 02445                        .HasColumnType("int");
 02446
 02447                    b.Property<int>("TotalItems")
 02448                        .HasColumnType("int");
 02449
 02450                    b.Property<string>("TriggerType")
 02451                        .IsRequired()
 02452                        .HasMaxLength(50)
 02453                        .HasColumnType("varchar(50)");
 02454
 02455                    b.Property<string>("TriggeredByUserId")
 02456                        .HasMaxLength(450)
 02457                        .HasColumnType("varchar(450)");
 02458
 02459                    b.Property<string>("TriggeredByUserName")
 02460                        .HasMaxLength(256)
 02461                        .HasColumnType("varchar(256)");
 02462
 02463                    b.HasKey("Id");
 02464
 02465                    b.HasIndex("JobId")
 02466                        .IsUnique()
 02467                        .HasDatabaseName("uk_push_job_id");
 02468
 02469                    b.HasIndex("StartedAt")
 02470                        .HasDatabaseName("idx_push_started_at");
 02471
 02472                    b.HasIndex("Status", "StartedAt")
 02473                        .HasDatabaseName("idx_push_status_started");
 02474
 02475                    b.ToTable("BitrixStockPushExecutions");
 02476                });
 2477
 02478            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushItem", b =>
 02479                {
 02480                    b.Property<long>("Id")
 02481                        .ValueGeneratedOnAdd()
 02482                        .HasColumnType("bigint");
 02483
 02484                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02485
 02486                    b.Property<string>("Article")
 02487                        .HasMaxLength(200)
 02488                        .HasColumnType("varchar(200)");
 02489
 02490                    b.Property<string>("ErrorMessage")
 02491                        .HasColumnType("text");
 02492
 02493                    b.Property<long>("ExecutionId")
 02494                        .HasColumnType("bigint");
 02495
 02496                    b.Property<string>("LinkedStoreName")
 02497                        .HasMaxLength(200)
 02498                        .HasColumnType("varchar(200)");
 02499
 02500                    b.Property<string>("OfferId")
 02501                        .IsRequired()
 02502                        .HasMaxLength(200)
 02503                        .HasColumnType("varchar(200)");
 02504
 02505                    b.Property<string>("OzonClient")
 02506                        .IsRequired()
 02507                        .HasMaxLength(200)
 02508                        .HasColumnType("varchar(200)");
 02509
 02510                    b.Property<int>("PreviousStock")
 02511                        .HasColumnType("int");
 02512
 02513                    b.Property<DateTime?>("ProcessedAt")
 02514                        .HasColumnType("datetime");
 02515
 02516                    b.Property<long>("ProductId")
 02517                        .HasColumnType("bigint");
 02518
 02519                    b.Property<int>("SortOrder")
 02520                        .HasColumnType("int");
 02521
 02522                    b.Property<string>("Status")
 02523                        .IsRequired()
 02524                        .HasMaxLength(50)
 02525                        .HasColumnType("varchar(50)");
 02526
 02527                    b.Property<int>("TargetStock")
 02528                        .HasColumnType("int");
 02529
 02530                    b.Property<long>("WarehouseId")
 02531                        .HasColumnType("bigint");
 02532
 02533                    b.Property<string>("WarehouseName")
 02534                        .HasMaxLength(200)
 02535                        .HasColumnType("varchar(200)");
 02536
 02537                    b.HasKey("Id");
 02538
 02539                    b.HasIndex("ExecutionId", "SortOrder")
 02540                        .HasDatabaseName("idx_push_execution_sort");
 02541
 02542                    b.HasIndex("ExecutionId", "Status")
 02543                        .HasDatabaseName("idx_push_execution_status");
 02544
 02545                    b.ToTable("BitrixStockPushItems");
 02546                });
 2547
 02548            modelBuilder.Entity("OzonDomains.Models.BitrixStockSavedFilter", b =>
 02549                {
 02550                    b.Property<int>("Id")
 02551                        .ValueGeneratedOnAdd()
 02552                        .HasColumnType("int");
 02553
 02554                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02555
 02556                    b.Property<DateTime>("CreatedAt")
 02557                        .HasColumnType("datetime");
 02558
 02559                    b.Property<string>("CreatedBy")
 02560                        .HasMaxLength(255)
 02561                        .HasColumnType("varchar(255)");
 02562
 02563                    b.Property<string>("FilterData")
 02564                        .IsRequired()
 02565                        .HasColumnType("longtext");
 02566
 02567                    b.Property<string>("Name")
 02568                        .IsRequired()
 02569                        .HasMaxLength(255)
 02570                        .HasColumnType("varchar(255)");
 02571
 02572                    b.Property<DateTime?>("UpdatedAt")
 02573                        .HasColumnType("datetime");
 02574
 02575                    b.HasKey("Id");
 02576
 02577                    b.HasIndex("CreatedBy")
 02578                        .HasDatabaseName("IX_BitrixStockSavedFilter_CreatedBy");
 02579
 02580                    b.HasIndex("Name")
 02581                        .HasDatabaseName("IX_BitrixStockSavedFilter_Name");
 02582
 02583                    b.ToTable("BitrixStockSavedFilter");
 02584                });
 2585
 02586            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveExecution", b =>
 02587                {
 02588                    b.Property<long>("Id")
 02589                        .ValueGeneratedOnAdd()
 02590                        .HasColumnType("bigint");
 02591
 02592                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02593
 02594                    b.Property<DateTime?>("CompletedAt")
 02595                        .HasColumnType("datetime");
 02596
 02597                    b.Property<long?>("DurationMs")
 02598                        .HasColumnType("bigint");
 02599
 02600                    b.Property<string>("ErrorMessage")
 02601                        .HasColumnType("text");
 02602
 02603                    b.Property<int>("FailedCount")
 02604                        .HasColumnType("int");
 02605
 02606                    b.Property<string>("HangfireJobId")
 02607                        .HasMaxLength(100)
 02608                        .HasColumnType("varchar(100)");
 02609
 02610                    b.Property<string>("JobId")
 02611                        .IsRequired()
 02612                        .HasMaxLength(64)
 02613                        .HasColumnType("varchar(64)");
 02614
 02615                    b.Property<DateTime>("StartedAt")
 02616                        .HasColumnType("datetime");
 02617
 02618                    b.Property<string>("Status")
 02619                        .IsRequired()
 02620                        .HasMaxLength(50)
 02621                        .HasColumnType("varchar(50)");
 02622
 02623                    b.Property<int>("SuccessCount")
 02624                        .HasColumnType("int");
 02625
 02626                    b.Property<int>("TotalItems")
 02627                        .HasColumnType("int");
 02628
 02629                    b.Property<string>("TriggerType")
 02630                        .IsRequired()
 02631                        .HasMaxLength(50)
 02632                        .HasColumnType("varchar(50)");
 02633
 02634                    b.Property<string>("TriggeredByUserId")
 02635                        .HasMaxLength(450)
 02636                        .HasColumnType("varchar(450)");
 02637
 02638                    b.Property<string>("TriggeredByUserName")
 02639                        .HasMaxLength(256)
 02640                        .HasColumnType("varchar(256)");
 02641
 02642                    b.HasKey("Id");
 02643
 02644                    b.HasIndex("JobId")
 02645                        .IsUnique()
 02646                        .HasDatabaseName("uk_unarchive_job_id");
 02647
 02648                    b.HasIndex("StartedAt")
 02649                        .HasDatabaseName("idx_unarchive_started_at");
 02650
 02651                    b.HasIndex("Status", "StartedAt")
 02652                        .HasDatabaseName("idx_unarchive_status_started");
 02653
 02654                    b.ToTable("BitrixStockUnarchiveExecutions");
 02655                });
 2656
 02657            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveItem", b =>
 02658                {
 02659                    b.Property<long>("Id")
 02660                        .ValueGeneratedOnAdd()
 02661                        .HasColumnType("bigint");
 02662
 02663                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02664
 02665                    b.Property<string>("Article")
 02666                        .HasMaxLength(200)
 02667                        .HasColumnType("varchar(200)");
 02668
 02669                    b.Property<string>("ErrorMessage")
 02670                        .HasColumnType("text");
 02671
 02672                    b.Property<long>("ExecutionId")
 02673                        .HasColumnType("bigint");
 02674
 02675                    b.Property<bool>("IsAutoArchived")
 02676                        .HasColumnType("tinyint(1)");
 02677
 02678                    b.Property<bool>("IsManualArchived")
 02679                        .HasColumnType("tinyint(1)");
 02680
 02681                    b.Property<string>("OfferId")
 02682                        .IsRequired()
 02683                        .HasMaxLength(200)
 02684                        .HasColumnType("varchar(200)");
 02685
 02686                    b.Property<string>("OzonClient")
 02687                        .IsRequired()
 02688                        .HasMaxLength(200)
 02689                        .HasColumnType("varchar(200)");
 02690
 02691                    b.Property<long>("OzonProductId")
 02692                        .HasColumnType("bigint");
 02693
 02694                    b.Property<DateTime?>("ProcessedAt")
 02695                        .HasColumnType("datetime");
 02696
 02697                    b.Property<int>("SortOrder")
 02698                        .HasColumnType("int");
 02699
 02700                    b.Property<string>("Status")
 02701                        .IsRequired()
 02702                        .HasMaxLength(50)
 02703                        .HasColumnType("varchar(50)");
 02704
 02705                    b.Property<bool>("WasInArchive")
 02706                        .HasColumnType("tinyint(1)");
 02707
 02708                    b.HasKey("Id");
 02709
 02710                    b.HasIndex("ExecutionId", "SortOrder")
 02711                        .HasDatabaseName("idx_unarchive_execution_sort");
 02712
 02713                    b.HasIndex("ExecutionId", "Status")
 02714                        .HasDatabaseName("idx_unarchive_execution_status");
 02715
 02716                    b.ToTable("BitrixStockUnarchiveItems");
 02717                });
 2718
 02719            modelBuilder.Entity("OzonDomains.Models.ClientStatus", b =>
 02720                {
 02721                    b.Property<int>("Id")
 02722                        .ValueGeneratedOnAdd()
 02723                        .HasColumnType("int");
 02724
 02725                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02726
 02727                    b.Property<int?>("ClientTypeId")
 02728                        .HasColumnType("int");
 02729
 02730                    b.Property<bool>("IsFinal")
 02731                        .HasColumnType("tinyint(1)");
 02732
 02733                    b.Property<string>("Name")
 02734                        .IsRequired()
 02735                        .HasMaxLength(200)
 02736                        .HasColumnType("varchar(200)");
 02737
 02738                    b.Property<int?>("StatusColorId")
 02739                        .HasColumnType("int");
 02740
 02741                    b.HasKey("Id");
 02742
 02743                    b.HasIndex("ClientTypeId")
 02744                        .HasDatabaseName("IX_ClientStatuses_ClientTypeId");
 02745
 02746                    b.HasIndex("Name")
 02747                        .IsUnique()
 02748                        .HasDatabaseName("IX_ClientStatuses_Name");
 02749
 02750                    b.HasIndex("StatusColorId")
 02751                        .HasDatabaseName("FK_clientstatuses_StatusColors_StatusColorId");
 02752
 02753                    b.ToTable("ClientStatuses");
 02754                });
 2755
 02756            modelBuilder.Entity("OzonDomains.Models.ColumnMapping", b =>
 02757                {
 02758                    b.Property<int>("Id")
 02759                        .ValueGeneratedOnAdd()
 02760                        .HasColumnType("int");
 02761
 02762                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02763
 02764                    b.Property<string>("ColumnMappingsSerialized")
 02765                        .IsRequired()
 02766                        .HasColumnType("longtext");
 02767
 02768                    b.Property<bool>("ManufacturerFromArticle")
 02769                        .HasColumnType("tinyint(1)");
 02770
 02771                    b.Property<string>("MappingName")
 02772                        .IsRequired()
 02773                        .HasMaxLength(50)
 02774                        .HasColumnType("varchar(50)");
 02775
 02776                    b.Property<int?>("SelectedClientId")
 02777                        .HasColumnType("int");
 02778
 02779                    b.Property<int?>("SelectedCurrencyCode")
 02780                        .HasColumnType("int");
 02781
 02782                    b.Property<int?>("SelectedManufacturerId")
 02783                        .HasColumnType("int");
 02784
 02785                    b.Property<string>("SelectedStatus")
 02786                        .HasColumnType("longtext");
 02787
 02788                    b.Property<int?>("SelectedSupplierId")
 02789                        .HasColumnType("int");
 02790
 02791                    b.Property<int?>("SelectedWarehouseId")
 02792                        .HasColumnType("int");
 02793
 02794                    b.HasKey("Id");
 02795
 02796                    b.HasIndex("SelectedClientId");
 02797
 02798                    b.HasIndex("SelectedManufacturerId");
 02799
 02800                    b.HasIndex("SelectedSupplierId");
 02801
 02802                    b.HasIndex("SelectedWarehouseId");
 02803
 02804                    b.ToTable("ColumnMappings");
 02805                });
 2806
 02807            modelBuilder.Entity("OzonDomains.Models.Currency", b =>
 02808                {
 02809                    b.Property<int>("Id")
 02810                        .ValueGeneratedOnAdd()
 02811                        .HasColumnType("int");
 02812
 02813                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02814
 02815                    b.Property<string>("Name")
 02816                        .HasMaxLength(50)
 02817                        .HasColumnType("varchar(50)");
 02818
 02819                    b.HasKey("Id");
 02820
 02821                    b.ToTable("Currencys");
 02822                });
 2823
 02824            modelBuilder.Entity("OzonDomains.Models.DeliveryProvider", b =>
 02825                {
 02826                    b.Property<int>("Id")
 02827                        .ValueGeneratedOnAdd()
 02828                        .HasColumnType("int");
 02829
 02830                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 02831
 02832                    b.Property<string>("Name")
 02833                        .IsRequired()
 02834                        .HasMaxLength(255)
 02835                        .HasColumnType("varchar(255)");
 02836
 02837                    b.HasKey("Id");
 02838
 02839                    b.HasIndex("Name")
 02840                        .IsUnique()
 02841                        .HasDatabaseName("Name");
 02842
 02843                    b.ToTable("DeliveryProviders");
 02844                });
 2845
 02846            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 02847                {
 02848                    b.Property<long>("Id")
 02849                        .ValueGeneratedOnAdd()
 02850                        .HasColumnType("bigint");
 02851
 02852                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02853
 02854                    b.Property<DateTime>("CreatedAt")
 02855                        .HasColumnType("datetime(6)");
 02856
 02857                    b.Property<long>("EmailMessageInboxId")
 02858                        .HasColumnType("bigint");
 02859
 02860                    b.Property<string>("Extension")
 02861                        .HasMaxLength(20)
 02862                        .HasColumnType("varchar(20)");
 02863
 02864                    b.Property<byte[]>("FileBytes")
 02865                        .IsRequired()
 02866                        .HasColumnType("longblob");
 02867
 02868                    b.Property<string>("FileName")
 02869                        .IsRequired()
 02870                        .HasMaxLength(500)
 02871                        .HasColumnType("varchar(500)");
 02872
 02873                    b.Property<long>("FileSizeBytes")
 02874                        .HasColumnType("bigint");
 02875
 02876                    b.Property<string>("Sha256Hash")
 02877                        .HasMaxLength(128)
 02878                        .HasColumnType("varchar(128)");
 02879
 02880                    b.HasKey("Id");
 02881
 02882                    b.HasIndex("EmailMessageInboxId");
 02883
 02884                    b.HasIndex("Sha256Hash", "FileSizeBytes", "FileName");
 02885
 02886                    b.ToTable("EmailAttachmentInboxes");
 02887                });
 2888
 02889            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentProcessingResult", b =>
 02890                {
 02891                    b.Property<long>("Id")
 02892                        .ValueGeneratedOnAdd()
 02893                        .HasColumnType("bigint");
 02894
 02895                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02896
 02897                    b.Property<DateTime>("CreatedAt")
 02898                        .HasColumnType("datetime(6)");
 02899
 02900                    b.Property<string>("DropboxDownloadLink")
 02901                        .HasMaxLength(1200)
 02902                        .HasColumnType("varchar(1200)");
 02903
 02904                    b.Property<string>("DropboxFileName")
 02905                        .HasMaxLength(700)
 02906                        .HasColumnType("varchar(700)");
 02907
 02908                    b.Property<string>("DropboxFilePath")
 02909                        .HasMaxLength(1200)
 02910                        .HasColumnType("varchar(1200)");
 02911
 02912                    b.Property<string>("DropboxFolderPath")
 02913                        .HasMaxLength(700)
 02914                        .HasColumnType("varchar(700)");
 02915
 02916                    b.Property<long>("EmailAttachmentInboxId")
 02917                        .HasColumnType("bigint");
 02918
 02919                    b.Property<long>("EmailMessageInboxId")
 02920                        .HasColumnType("bigint");
 02921
 02922                    b.Property<int?>("EmailRoutingRuleId")
 02923                        .HasColumnType("int");
 02924
 02925                    b.Property<string>("Error")
 02926                        .HasMaxLength(2000)
 02927                        .HasColumnType("varchar(2000)");
 02928
 02929                    b.Property<string>("Reason")
 02930                        .HasMaxLength(1000)
 02931                        .HasColumnType("varchar(1000)");
 02932
 02933                    b.Property<int>("Status")
 02934                        .HasColumnType("int");
 02935
 02936                    b.HasKey("Id");
 02937
 02938                    b.HasIndex("EmailAttachmentInboxId");
 02939
 02940                    b.HasIndex("EmailMessageInboxId");
 02941
 02942                    b.HasIndex("EmailRoutingRuleId");
 02943
 02944                    b.HasIndex("Status");
 02945
 02946                    b.ToTable("EmailAttachmentProcessingResults");
 02947                });
 2948
 02949            modelBuilder.Entity("OzonDomains.Models.EmailMessageInbox", b =>
 02950                {
 02951                    b.Property<long>("Id")
 02952                        .ValueGeneratedOnAdd()
 02953                        .HasColumnType("bigint");
 02954
 02955                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 02956
 02957                    b.Property<string>("BodyText")
 02958                        .HasColumnType("longtext");
 02959
 02960                    b.Property<DateTime>("CreatedAt")
 02961                        .HasColumnType("datetime(6)");
 02962
 02963                    b.Property<string>("MessageExternalId")
 02964                        .IsRequired()
 02965                        .HasMaxLength(255)
 02966                        .HasColumnType("varchar(255)");
 02967
 02968                    b.Property<DateTime?>("ProcessedAtUtc")
 02969                        .HasColumnType("datetime(6)");
 02970
 02971                    b.Property<string>("ProcessingError")
 02972                        .HasMaxLength(1000)
 02973                        .HasColumnType("varchar(1000)");
 02974
 02975                    b.Property<int>("ProcessingStatus")
 02976                        .HasColumnType("int");
 02977
 02978                    b.Property<DateTime?>("ReceivedAtUtc")
 02979                        .HasColumnType("datetime(6)");
 02980
 02981                    b.Property<string>("SenderEmail")
 02982                        .HasMaxLength(320)
 02983                        .HasColumnType("varchar(320)");
 02984
 02985                    b.Property<string>("Subject")
 02986                        .HasMaxLength(500)
 02987                        .HasColumnType("varchar(500)");
 02988
 02989                    b.Property<string>("Uid")
 02990                        .HasMaxLength(255)
 02991                        .HasColumnType("varchar(255)");
 02992
 02993                    b.HasKey("Id");
 02994
 02995                    b.HasIndex("CreatedAt");
 02996
 02997                    b.HasIndex("MessageExternalId")
 02998                        .IsUnique()
 02999                        .HasDatabaseName("UX_EmailMessageInboxes_MessageExternalId");
 03000
 03001                    b.HasIndex("ProcessingStatus");
 03002
 03003                    b.ToTable("EmailMessageInboxes");
 03004                });
 3005
 03006            modelBuilder.Entity("OzonDomains.Models.EmailRoutingJobExecution", b =>
 03007                {
 03008                    b.Property<long>("Id")
 03009                        .ValueGeneratedOnAdd()
 03010                        .HasColumnType("bigint");
 03011
 03012                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03013
 03014                    b.Property<int>("AttachmentsDuplicate")
 03015                        .HasColumnType("int");
 03016
 03017                    b.Property<int>("AttachmentsFailed")
 03018                        .HasColumnType("int");
 03019
 03020                    b.Property<int>("AttachmentsPending")
 03021                        .HasColumnType("int");
 03022
 03023                    b.Property<int>("AttachmentsRejected")
 03024                        .HasColumnType("int");
 03025
 03026                    b.Property<int>("AttachmentsUploaded")
 03027                        .HasColumnType("int");
 03028
 03029                    b.Property<int>("BatchesProcessed")
 03030                        .HasColumnType("int");
 03031
 03032                    b.Property<DateTime?>("CompletedAtUtc")
 03033                        .HasColumnType("datetime(6)");
 03034
 03035                    b.Property<string>("ErrorMessage")
 03036                        .HasMaxLength(2000)
 03037                        .HasColumnType("varchar(2000)");
 03038
 03039                    b.Property<string>("HangfireJobId")
 03040                        .HasMaxLength(64)
 03041                        .HasColumnType("varchar(64)");
 03042
 03043                    b.Property<int>("MessagesProcessed")
 03044                        .HasColumnType("int");
 03045
 03046                    b.Property<DateTime>("StartedAtUtc")
 03047                        .HasColumnType("datetime(6)");
 03048
 03049                    b.Property<string>("Status")
 03050                        .IsRequired()
 03051                        .HasMaxLength(32)
 03052                        .HasColumnType("varchar(32)");
 03053
 03054                    b.Property<string>("Summary")
 03055                        .HasMaxLength(2000)
 03056                        .HasColumnType("varchar(2000)");
 03057
 03058                    b.Property<string>("TriggerType")
 03059                        .IsRequired()
 03060                        .HasMaxLength(32)
 03061                        .HasColumnType("varchar(32)");
 03062
 03063                    b.HasKey("Id");
 03064
 03065                    b.HasIndex("StartedAtUtc");
 03066
 03067                    b.HasIndex("Status");
 03068
 03069                    b.ToTable("EmailRoutingJobExecutions");
 03070                });
 3071
 03072            modelBuilder.Entity("OzonDomains.Models.EmailRoutingRule", b =>
 03073                {
 03074                    b.Property<int>("Id")
 03075                        .ValueGeneratedOnAdd()
 03076                        .HasColumnType("int");
 03077
 03078                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03079
 03080                    b.Property<string>("AllowedExtensions")
 03081                        .HasMaxLength(500)
 03082                        .HasColumnType("varchar(500)");
 03083
 03084                    b.Property<string>("AllowedSenders")
 03085                        .HasMaxLength(1000)
 03086                        .HasColumnType("varchar(1000)");
 03087
 03088                    b.Property<string>("BodyPattern")
 03089                        .HasMaxLength(1000)
 03090                        .HasColumnType("varchar(1000)");
 03091
 03092                    b.Property<int>("ConflictPolicy")
 03093                        .HasColumnType("int");
 03094
 03095                    b.Property<DateTime>("CreatedAt")
 03096                        .HasColumnType("datetime(6)");
 03097
 03098                    b.Property<string>("DropboxFolderTemplate")
 03099                        .IsRequired()
 03100                        .HasMaxLength(500)
 03101                        .HasColumnType("varchar(500)");
 03102
 03103                    b.Property<string>("FileNamePattern")
 03104                        .HasMaxLength(1000)
 03105                        .HasColumnType("varchar(1000)");
 03106
 03107                    b.Property<bool>("IsActive")
 03108                        .HasColumnType("tinyint(1)");
 03109
 03110                    b.Property<long?>("MaxFileSizeBytes")
 03111                        .HasColumnType("bigint");
 03112
 03113                    b.Property<long?>("MinFileSizeBytes")
 03114                        .HasColumnType("bigint");
 03115
 03116                    b.Property<string>("Name")
 03117                        .IsRequired()
 03118                        .HasMaxLength(200)
 03119                        .HasColumnType("varchar(200)");
 03120
 03121                    b.Property<int>("Priority")
 03122                        .HasColumnType("int");
 03123
 03124                    b.Property<bool>("ProcessOnlyFirstMatchedAttachment")
 03125                        .HasColumnType("tinyint(1)");
 03126
 03127                    b.Property<string>("SubjectPattern")
 03128                        .HasMaxLength(1000)
 03129                        .HasColumnType("varchar(1000)");
 03130
 03131                    b.Property<DateTime>("UpdatedAt")
 03132                        .HasColumnType("datetime(6)");
 03133
 03134                    b.HasKey("Id");
 03135
 03136                    b.HasIndex("IsActive", "Priority");
 03137
 03138                    b.ToTable("EmailRoutingRules");
 03139                });
 3140
 03141            modelBuilder.Entity("OzonDomains.Models.EtProducer", b =>
 03142                {
 03143                    b.Property<int>("Id")
 03144                        .ValueGeneratedOnAdd()
 03145                        .HasColumnType("int")
 03146                        .HasColumnName("id");
 03147
 03148                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03149
 03150                    b.Property<string>("Address")
 03151                        .IsRequired()
 03152                        .HasMaxLength(100)
 03153                        .HasColumnType("varchar(100)")
 03154                        .HasColumnName("address");
 03155
 03156                    b.Property<string>("Domain")
 03157                        .IsRequired()
 03158                        .HasMaxLength(100)
 03159                        .HasColumnType("varchar(100)")
 03160                        .HasColumnName("domain");
 03161
 03162                    b.Property<int>("ExistId")
 03163                        .HasColumnType("int")
 03164                        .HasColumnName("existId");
 03165
 03166                    b.Property<string>("ExistName")
 03167                        .IsRequired()
 03168                        .HasMaxLength(100)
 03169                        .HasColumnType("varchar(100)")
 03170                        .HasColumnName("existName");
 03171
 03172                    b.Property<string>("MarketPrefix")
 03173                        .IsRequired()
 03174                        .HasMaxLength(3)
 03175                        .HasColumnType("varchar(3)")
 03176                        .HasColumnName("marketPrefix");
 03177
 03178                    b.Property<string>("Name")
 03179                        .IsRequired()
 03180                        .HasMaxLength(100)
 03181                        .HasColumnType("varchar(100)")
 03182                        .HasColumnName("name");
 03183
 03184                    b.Property<string>("Prefix")
 03185                        .IsRequired()
 03186                        .HasMaxLength(20)
 03187                        .HasColumnType("varchar(20)")
 03188                        .HasColumnName("prefix");
 03189
 03190                    b.Property<int>("Rating")
 03191                        .HasColumnType("int")
 03192                        .HasColumnName("rating");
 03193
 03194                    b.Property<int>("RealId")
 03195                        .HasColumnType("int")
 03196                        .HasColumnName("realid");
 03197
 03198                    b.Property<int>("TecdocSupplierId")
 03199                        .HasColumnType("int")
 03200                        .HasColumnName("tecdocSupplierId");
 03201
 03202                    b.Property<string>("Www")
 03203                        .IsRequired()
 03204                        .HasMaxLength(100)
 03205                        .HasColumnType("varchar(100)")
 03206                        .HasColumnName("www");
 03207
 03208                    b.HasKey("Id");
 03209
 03210                    b.ToTable("et_producers");
 03211                });
 3212
 03213            modelBuilder.Entity("OzonDomains.Models.ExcludedArticle", b =>
 03214                {
 03215                    b.Property<int>("Id")
 03216                        .ValueGeneratedOnAdd()
 03217                        .HasColumnType("int");
 03218
 03219                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03220
 03221                    b.Property<string>("Article")
 03222                        .IsRequired()
 03223                        .HasMaxLength(100)
 03224                        .HasColumnType("varchar(100)");
 03225
 03226                    b.Property<int>("OzonClientId")
 03227                        .HasColumnType("int");
 03228
 03229                    b.HasKey("Id");
 03230
 03231                    b.HasIndex("OzonClientId");
 03232
 03233                    b.ToTable("ExcludedArticles");
 03234                });
 3235
 03236            modelBuilder.Entity("OzonDomains.Models.ExcludedBitrixWarehouse", b =>
 03237                {
 03238                    b.Property<int>("Id")
 03239                        .ValueGeneratedOnAdd()
 03240                        .HasColumnType("int");
 03241
 03242                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03243
 03244                    b.Property<string>("Comment")
 03245                        .HasMaxLength(255)
 03246                        .HasColumnType("varchar(255)");
 03247
 03248                    b.Property<bool>("IsActive")
 03249                        .HasColumnType("tinyint(1)");
 03250
 03251                    b.Property<string>("Name")
 03252                        .IsRequired()
 03253                        .HasMaxLength(100)
 03254                        .HasColumnType("varchar(100)");
 03255
 03256                    b.HasKey("Id");
 03257
 03258                    b.ToTable("ExcludedWarehouses");
 03259                });
 3260
 03261            modelBuilder.Entity("OzonDomains.Models.ExpenseType", b =>
 03262                {
 03263                    b.Property<int>("Id")
 03264                        .ValueGeneratedOnAdd()
 03265                        .HasColumnType("int");
 03266
 03267                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03268
 03269                    b.Property<string>("Description")
 03270                        .HasMaxLength(255)
 03271                        .HasColumnType("varchar(255)");
 03272
 03273                    b.Property<bool>("IsActive")
 03274                        .HasColumnType("tinyint(1)");
 03275
 03276                    b.Property<string>("Name")
 03277                        .IsRequired()
 03278                        .HasMaxLength(100)
 03279                        .HasColumnType("varchar(100)");
 03280
 03281                    b.HasKey("Id");
 03282
 03283                    b.ToTable("ExpenseTypes");
 03284                });
 3285
 03286            modelBuilder.Entity("OzonDomains.Models.FavoritPartsCartItem", b =>
 03287                {
 03288                    b.Property<long>("Id")
 03289                        .ValueGeneratedOnAdd()
 03290                        .HasColumnType("bigint");
 03291
 03292                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03293
 03294                    b.Property<int?>("ActiveStudioOrderId")
 03295                        .HasColumnType("int");
 03296
 03297                    b.Property<string>("Article")
 03298                        .IsRequired()
 03299                        .HasMaxLength(40)
 03300                        .HasColumnType("varchar(40)");
 03301
 03302                    b.Property<string>("Brand")
 03303                        .IsRequired()
 03304                        .HasMaxLength(80)
 03305                        .HasColumnType("varchar(80)");
 03306
 03307                    b.Property<DateTime>("CreatedAtUtc")
 03308                        .HasColumnType("datetime(6)");
 03309
 03310                    b.Property<string>("CreatedBy")
 03311                        .HasMaxLength(450)
 03312                        .HasColumnType("varchar(450)");
 03313
 03314                    b.Property<string>("CurrencyCode")
 03315                        .IsRequired()
 03316                        .HasMaxLength(8)
 03317                        .HasColumnType("varchar(8)");
 03318
 03319                    b.Property<Guid>("GoodsId")
 03320                        .HasColumnType("char(36)");
 03321
 03322                    b.Property<string>("LastError")
 03323                        .HasMaxLength(1000)
 03324                        .HasColumnType("varchar(1000)");
 03325
 03326                    b.Property<string>("ProductName")
 03327                        .HasMaxLength(160)
 03328                        .HasColumnType("varchar(160)");
 03329
 03330                    b.Property<string>("ProviderKey")
 03331                        .IsRequired()
 03332                        .HasMaxLength(20)
 03333                        .HasColumnType("varchar(20)");
 03334
 03335                    b.Property<decimal>("Quantity")
 03336                        .HasPrecision(18, 3)
 03337                        .HasColumnType("decimal(18,3)");
 03338
 03339                    b.Property<DateTime?>("ShippingDate")
 03340                        .HasColumnType("datetime(6)");
 03341
 03342                    b.Property<decimal?>("SourcePrice")
 03343                        .HasPrecision(18, 4)
 03344                        .HasColumnType("decimal(18,4)");
 03345
 03346                    b.Property<string>("Status")
 03347                        .IsRequired()
 03348                        .HasMaxLength(30)
 03349                        .HasColumnType("varchar(30)");
 03350
 03351                    b.Property<int>("StudioOrderId")
 03352                        .HasColumnType("int");
 03353
 03354                    b.Property<string>("TestResultJson")
 03355                        .HasColumnType("longtext");
 03356
 03357                    b.Property<DateTime?>("TestedAtUtc")
 03358                        .HasColumnType("datetime(6)");
 03359
 03360                    b.Property<DateTime>("UpdatedAtUtc")
 03361                        .HasColumnType("datetime(6)");
 03362
 03363                    b.Property<Guid>("WarehouseGroupId")
 03364                        .HasColumnType("char(36)");
 03365
 03366                    b.Property<Guid?>("WarehouseShippingId")
 03367                        .HasColumnType("char(36)");
 03368
 03369                    b.HasKey("Id");
 03370
 03371                    b.HasIndex("StudioOrderId")
 03372                        .HasDatabaseName("FK_FavoritPartsCartItems_Orders_StudioOrderId");
 03373
 03374                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 03375                        .IsUnique()
 03376                        .HasDatabaseName("UX_FavoritPartsCartItems_Provider_ActiveOrder");
 03377
 03378                    b.HasIndex("ProviderKey", "CreatedAtUtc")
 03379                        .HasDatabaseName("IX_FavoritPartsCartItems_Provider_Created");
 03380
 03381                    b.HasIndex("ProviderKey", "StudioOrderId", "Status")
 03382                        .HasDatabaseName("IX_FavoritPartsCartItems_Provider_Order_Status");
 03383
 03384                    b.ToTable("FavoritPartsCartItems");
 03385                });
 3386
 03387            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrder", b =>
 03388                {
 03389                    b.Property<long>("Id")
 03390                        .ValueGeneratedOnAdd()
 03391                        .HasColumnType("bigint");
 03392
 03393                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03394
 03395                    b.Property<DateTime>("CreatedAtUtc")
 03396                        .HasColumnType("datetime(6)");
 03397
 03398                    b.Property<string>("CreatedBy")
 03399                        .HasMaxLength(450)
 03400                        .HasColumnType("varchar(450)");
 03401
 03402                    b.Property<Guid?>("ExternalOrderId")
 03403                        .HasColumnType("char(36)");
 03404
 03405                    b.Property<string>("Number")
 03406                        .HasMaxLength(40)
 03407                        .HasColumnType("varchar(40)");
 03408
 03409                    b.Property<string>("ProviderKey")
 03410                        .IsRequired()
 03411                        .HasMaxLength(20)
 03412                        .HasColumnType("varchar(20)");
 03413
 03414                    b.Property<string>("RequestJson")
 03415                        .HasColumnType("longtext");
 03416
 03417                    b.Property<string>("ResponseJson")
 03418                        .HasColumnType("longtext");
 03419
 03420                    b.Property<DateOnly>("ShippingDate")
 03421                        .HasColumnType("date");
 03422
 03423                    b.Property<string>("Status")
 03424                        .IsRequired()
 03425                        .HasMaxLength(30)
 03426                        .HasColumnType("varchar(30)");
 03427
 03428                    b.Property<Guid>("TradePointId")
 03429                        .HasColumnType("char(36)");
 03430
 03431                    b.Property<Guid>("WarehouseShippingId")
 03432                        .HasColumnType("char(36)");
 03433
 03434                    b.HasKey("Id");
 03435
 03436                    b.HasIndex("ProviderKey", "ExternalOrderId")
 03437                        .IsUnique()
 03438                        .HasDatabaseName("UX_FavoritPartsOrders_Provider_ExternalOrderId");
 03439
 03440                    b.ToTable("FavoritPartsOrders");
 03441                });
 3442
 03443            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrderItem", b =>
 03444                {
 03445                    b.Property<long>("Id")
 03446                        .ValueGeneratedOnAdd()
 03447                        .HasColumnType("bigint");
 03448
 03449                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03450
 03451                    b.Property<string>("Brand")
 03452                        .IsRequired()
 03453                        .HasMaxLength(80)
 03454                        .HasColumnType("varchar(80)");
 03455
 03456                    b.Property<string>("CurrencyCode")
 03457                        .HasMaxLength(8)
 03458                        .HasColumnType("varchar(8)");
 03459
 03460                    b.Property<string>("Error")
 03461                        .HasMaxLength(1000)
 03462                        .HasColumnType("varchar(1000)");
 03463
 03464                    b.Property<long?>("FavoritPartsCartItemId")
 03465                        .HasColumnType("bigint");
 03466
 03467                    b.Property<long>("FavoritPartsOrderId")
 03468                        .HasColumnType("bigint");
 03469
 03470                    b.Property<Guid>("GoodsId")
 03471                        .HasColumnType("char(36)");
 03472
 03473                    b.Property<decimal?>("Price")
 03474                        .HasPrecision(18, 4)
 03475                        .HasColumnType("decimal(18,4)");
 03476
 03477                    b.Property<decimal>("Quantity")
 03478                        .HasPrecision(18, 3)
 03479                        .HasColumnType("decimal(18,3)");
 03480
 03481                    b.Property<int>("StudioOrderId")
 03482                        .HasColumnType("int");
 03483
 03484                    b.Property<Guid>("WarehouseGroupId")
 03485                        .HasColumnType("char(36)");
 03486
 03487                    b.HasKey("Id");
 03488
 03489                    b.HasIndex("FavoritPartsCartItemId")
 03490                        .HasDatabaseName("FK_FavoritPartsOrderItems_FavoritPartsCartItems");
 03491
 03492                    b.HasIndex("FavoritPartsOrderId")
 03493                        .HasDatabaseName("IX_FavoritPartsOrderItems_Order");
 03494
 03495                    b.HasIndex("StudioOrderId")
 03496                        .HasDatabaseName("FK_FavoritPartsOrderItems_Orders_StudioOrderId");
 03497
 03498                    b.ToTable("FavoritPartsOrderItems");
 03499                });
 3500
 03501            modelBuilder.Entity("OzonDomains.Models.FidStatItem", b =>
 03502                {
 03503                    b.Property<int>("Id")
 03504                        .ValueGeneratedOnAdd()
 03505                        .HasColumnType("int");
 03506
 03507                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03508
 03509                    b.Property<int>("Count")
 03510                        .HasColumnType("int");
 03511
 03512                    b.Property<string>("Indices")
 03513                        .IsRequired()
 03514                        .HasMaxLength(200)
 03515                        .HasColumnType("varchar(200)");
 03516
 03517                    b.Property<decimal>("Percentage")
 03518                        .HasColumnType("decimal(10,4)");
 03519
 03520                    b.Property<decimal>("RangeFrom")
 03521                        .HasColumnType("decimal(10,4)");
 03522
 03523                    b.Property<decimal>("RangeTo")
 03524                        .HasColumnType("decimal(10,4)");
 03525
 03526                    b.Property<int>("RowNumber")
 03527                        .HasColumnType("int");
 03528
 03529                    b.Property<int>("SnapshotId")
 03530                        .HasColumnType("int");
 03531
 03532                    b.HasKey("Id");
 03533
 03534                    b.HasIndex("SnapshotId");
 03535
 03536                    b.ToTable("FidStatItems");
 03537                });
 3538
 03539            modelBuilder.Entity("OzonDomains.Models.FidStatSnapshot", b =>
 03540                {
 03541                    b.Property<int>("Id")
 03542                        .ValueGeneratedOnAdd()
 03543                        .HasColumnType("int");
 03544
 03545                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03546
 03547                    b.Property<string>("FidName")
 03548                        .IsRequired()
 03549                        .HasMaxLength(100)
 03550                        .HasColumnType("varchar(100)");
 03551
 03552                    b.Property<DateTimeOffset>("PostTime")
 03553                        .HasColumnType("datetime(6)");
 03554
 03555                    b.Property<DateTime>("ReceivedAt")
 03556                        .HasColumnType("datetime(6)");
 03557
 03558                    b.HasKey("Id");
 03559
 03560                    b.HasIndex("FidName");
 03561
 03562                    b.HasIndex("PostTime");
 03563
 03564                    b.ToTable("FidStatSnapshots");
 03565                });
 3566
 03567            modelBuilder.Entity("OzonDomains.Models.FidSupplierLink", b =>
 03568                {
 03569                    b.Property<long>("Id")
 03570                        .ValueGeneratedOnAdd()
 03571                        .HasColumnType("bigint");
 03572
 03573                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03574
 03575                    b.Property<long?>("FidRowsAtLink")
 03576                        .HasColumnType("bigint");
 03577
 03578                    b.Property<string>("FidSupplierName")
 03579                        .IsRequired()
 03580                        .HasMaxLength(200)
 03581                        .HasColumnType("varchar(200)");
 03582
 03583                    b.Property<DateTime>("FirstSeenAtUtc")
 03584                        .HasColumnType("datetime(6)");
 03585
 03586                    b.Property<bool>("IsAutoCartEnabled")
 03587                        .HasColumnType("tinyint(1)");
 03588
 03589                    b.Property<DateTime?>("LastSeenInFeedAtUtc")
 03590                        .HasColumnType("datetime(6)");
 03591
 03592                    b.Property<DateTime?>("LinkedAtUtc")
 03593                        .HasColumnType("datetime(6)");
 03594
 03595                    b.Property<string>("LinkedBy")
 03596                        .HasMaxLength(256)
 03597                        .HasColumnType("varchar(256)");
 03598
 03599                    b.Property<string>("Note")
 03600                        .HasMaxLength(500)
 03601                        .HasColumnType("varchar(500)");
 03602
 03603                    b.Property<DateTime?>("NotifiedAtUtc")
 03604                        .HasColumnType("datetime(6)");
 03605
 03606                    b.Property<string>("ProviderKey")
 03607                        .HasMaxLength(64)
 03608                        .HasColumnType("varchar(64)");
 03609
 03610                    b.Property<DateTime>("UpdatedAtUtc")
 03611                        .HasColumnType("datetime(6)");
 03612
 03613                    b.Property<string>("UpdatedBy")
 03614                        .HasMaxLength(256)
 03615                        .HasColumnType("varchar(256)");
 03616
 03617                    b.HasKey("Id");
 03618
 03619                    b.HasIndex("FidSupplierName")
 03620                        .IsUnique()
 03621                        .HasDatabaseName("UX_FidSupplierLinks_FidSupplierName");
 03622
 03623                    b.HasIndex("ProviderKey");
 03624
 03625                    b.ToTable("FidSupplierLinks");
 03626                });
 3627
 03628            modelBuilder.Entity("OzonDomains.Models.FidSupplierLinkSettings", b =>
 03629                {
 03630                    b.Property<int>("Id")
 03631                        .HasColumnType("int");
 03632
 03633                    b.Property<bool>("IsAutoCartEnabled")
 03634                        .HasColumnType("tinyint(1)");
 03635
 03636                    b.Property<DateTime>("UpdatedAtUtc")
 03637                        .HasColumnType("datetime(6)");
 03638
 03639                    b.Property<string>("UpdatedBy")
 03640                        .HasMaxLength(256)
 03641                        .HasColumnType("varchar(256)");
 03642
 03643                    b.HasKey("Id");
 03644
 03645                    b.ToTable("FidSupplierLinkSettings");
 03646                });
 3647
 03648            modelBuilder.Entity("OzonDomains.Models.FileUploadRecord", b =>
 03649                {
 03650                    b.Property<int>("Id")
 03651                        .ValueGeneratedOnAdd()
 03652                        .HasColumnType("int");
 03653
 03654                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03655
 03656                    b.Property<DateTime>("Date")
 03657                        .HasColumnType("datetime");
 03658
 03659                    b.Property<string>("FileName")
 03660                        .IsRequired()
 03661                        .HasMaxLength(255)
 03662                        .HasColumnType("varchar(255)");
 03663
 03664                    b.Property<string>("FolderName")
 03665                        .IsRequired()
 03666                        .HasMaxLength(255)
 03667                        .HasColumnType("varchar(255)");
 03668
 03669                    b.Property<string>("Result")
 03670                        .IsRequired()
 03671                        .HasColumnType("text");
 03672
 03673                    b.HasKey("Id");
 03674
 03675                    b.HasIndex("FileName")
 03676                        .IsUnique()
 03677                        .HasDatabaseName("IX_FileUploadRecords_FileName");
 03678
 03679                    b.ToTable("FileUploadRecords");
 03680                });
 3681
 03682            modelBuilder.Entity("OzonDomains.Models.ForumAutoCartItem", b =>
 03683                {
 03684                    b.Property<long>("Id")
 03685                        .ValueGeneratedOnAdd()
 03686                        .HasColumnType("bigint");
 03687
 03688                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03689
 03690                    b.Property<int?>("ActiveStudioOrderId")
 03691                        .HasColumnType("int");
 03692
 03693                    b.Property<string>("Article")
 03694                        .IsRequired()
 03695                        .HasMaxLength(40)
 03696                        .HasColumnType("varchar(40)");
 03697
 03698                    b.Property<string>("Brand")
 03699                        .IsRequired()
 03700                        .HasMaxLength(80)
 03701                        .HasColumnType("varchar(80)");
 03702
 03703                    b.Property<DateTime>("CreatedAtUtc")
 03704                        .HasColumnType("datetime(6)");
 03705
 03706                    b.Property<string>("CreatedBy")
 03707                        .HasMaxLength(450)
 03708                        .HasColumnType("varchar(450)");
 03709
 03710                    b.Property<string>("CurrencyCode")
 03711                        .IsRequired()
 03712                        .HasMaxLength(8)
 03713                        .HasColumnType("varchar(8)");
 03714
 03715                    b.Property<DateTime?>("DeliveryAtUtc")
 03716                        .HasColumnType("datetime(6)");
 03717
 03718                    b.Property<string>("LastError")
 03719                        .HasMaxLength(1000)
 03720                        .HasColumnType("varchar(1000)");
 03721
 03722                    b.Property<string>("ProductName")
 03723                        .HasMaxLength(160)
 03724                        .HasColumnType("varchar(160)");
 03725
 03726                    b.Property<string>("ProviderKey")
 03727                        .IsRequired()
 03728                        .HasMaxLength(20)
 03729                        .HasColumnType("varchar(20)");
 03730
 03731                    b.Property<decimal>("Quantity")
 03732                        .HasPrecision(18, 3)
 03733                        .HasColumnType("decimal(18,3)");
 03734
 03735                    b.Property<decimal?>("SourcePrice")
 03736                        .HasPrecision(18, 4)
 03737                        .HasColumnType("decimal(18,4)");
 03738
 03739                    b.Property<string>("Status")
 03740                        .IsRequired()
 03741                        .HasMaxLength(30)
 03742                        .HasColumnType("varchar(30)");
 03743
 03744                    b.Property<int>("StudioOrderId")
 03745                        .HasColumnType("int");
 03746
 03747                    b.Property<string>("TestResultJson")
 03748                        .HasColumnType("longtext");
 03749
 03750                    b.Property<DateTime?>("TestedAtUtc")
 03751                        .HasColumnType("datetime(6)");
 03752
 03753                    b.Property<string>("Tid")
 03754                        .IsRequired()
 03755                        .HasMaxLength(60)
 03756                        .HasColumnType("varchar(60)");
 03757
 03758                    b.Property<DateTime>("UpdatedAtUtc")
 03759                        .HasColumnType("datetime(6)");
 03760
 03761                    b.HasKey("Id");
 03762
 03763                    b.HasIndex("StudioOrderId")
 03764                        .HasDatabaseName("FK_ForumAutoCartItems_Orders_StudioOrderId");
 03765
 03766                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 03767                        .IsUnique()
 03768                        .HasDatabaseName("UX_ForumAutoCartItems_Provider_ActiveOrder");
 03769
 03770                    b.HasIndex("ProviderKey", "CreatedAtUtc")
 03771                        .HasDatabaseName("IX_ForumAutoCartItems_Provider_Created");
 03772
 03773                    b.HasIndex("ProviderKey", "StudioOrderId", "Status")
 03774                        .HasDatabaseName("IX_ForumAutoCartItems_Provider_Order_Status");
 03775
 03776                    b.ToTable("ForumAutoCartItems");
 03777                });
 3778
 03779            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrder", b =>
 03780                {
 03781                    b.Property<long>("Id")
 03782                        .ValueGeneratedOnAdd()
 03783                        .HasColumnType("bigint");
 03784
 03785                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03786
 03787                    b.Property<DateTime>("CreatedAtUtc")
 03788                        .HasColumnType("datetime(6)");
 03789
 03790                    b.Property<string>("CreatedBy")
 03791                        .HasMaxLength(450)
 03792                        .HasColumnType("varchar(450)");
 03793
 03794                    b.Property<int?>("Did")
 03795                        .HasColumnType("int");
 03796
 03797                    b.Property<long>("Eoid")
 03798                        .HasColumnType("bigint");
 03799
 03800                    b.Property<string>("ProviderKey")
 03801                        .IsRequired()
 03802                        .HasMaxLength(20)
 03803                        .HasColumnType("varchar(20)");
 03804
 03805                    b.Property<string>("RequestJson")
 03806                        .HasColumnType("longtext");
 03807
 03808                    b.Property<string>("ResponseJson")
 03809                        .HasColumnType("longtext");
 03810
 03811                    b.Property<string>("Status")
 03812                        .IsRequired()
 03813                        .HasMaxLength(30)
 03814                        .HasColumnType("varchar(30)");
 03815
 03816                    b.HasKey("Id");
 03817
 03818                    b.HasIndex("ProviderKey", "Did")
 03819                        .IsUnique()
 03820                        .HasDatabaseName("UX_ForumAutoOrders_Provider_Did");
 03821
 03822                    b.HasIndex("ProviderKey", "Eoid")
 03823                        .HasDatabaseName("IX_ForumAutoOrders_Provider_Eoid");
 03824
 03825                    b.ToTable("ForumAutoOrders");
 03826                });
 3827
 03828            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrderItem", b =>
 03829                {
 03830                    b.Property<long>("Id")
 03831                        .ValueGeneratedOnAdd()
 03832                        .HasColumnType("bigint");
 03833
 03834                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 03835
 03836                    b.Property<string>("Brand")
 03837                        .IsRequired()
 03838                        .HasMaxLength(80)
 03839                        .HasColumnType("varchar(80)");
 03840
 03841                    b.Property<string>("CurrencyCode")
 03842                        .HasMaxLength(8)
 03843                        .HasColumnType("varchar(8)");
 03844
 03845                    b.Property<int?>("Eid")
 03846                        .HasColumnType("int");
 03847
 03848                    b.Property<string>("Error")
 03849                        .HasMaxLength(1000)
 03850                        .HasColumnType("varchar(1000)");
 03851
 03852                    b.Property<long?>("ForumAutoCartItemId")
 03853                        .HasColumnType("bigint");
 03854
 03855                    b.Property<long>("ForumAutoOrderId")
 03856                        .HasColumnType("bigint");
 03857
 03858                    b.Property<decimal?>("Price")
 03859                        .HasPrecision(18, 4)
 03860                        .HasColumnType("decimal(18,4)");
 03861
 03862                    b.Property<decimal>("Quantity")
 03863                        .HasPrecision(18, 3)
 03864                        .HasColumnType("decimal(18,3)");
 03865
 03866                    b.Property<int>("StudioOrderId")
 03867                        .HasColumnType("int");
 03868
 03869                    b.Property<string>("Tid")
 03870                        .IsRequired()
 03871                        .HasMaxLength(60)
 03872                        .HasColumnType("varchar(60)");
 03873
 03874                    b.HasKey("Id");
 03875
 03876                    b.HasIndex("ForumAutoCartItemId")
 03877                        .HasDatabaseName("FK_ForumAutoOrderItems_ForumAutoCartItems");
 03878
 03879                    b.HasIndex("ForumAutoOrderId")
 03880                        .HasDatabaseName("IX_ForumAutoOrderItems_Order");
 03881
 03882                    b.HasIndex("StudioOrderId")
 03883                        .HasDatabaseName("FK_ForumAutoOrderItems_Orders_StudioOrderId");
 03884
 03885                    b.ToTable("ForumAutoOrderItems");
 03886                });
 3887
 03888            modelBuilder.Entity("OzonDomains.Models.InterpartsSutCurrency", b =>
 03889                {
 03890                    b.Property<int>("Id")
 03891                        .ValueGeneratedOnAdd()
 03892                        .HasColumnType("int");
 03893
 03894                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03895
 03896                    b.Property<short>("Accuracy")
 03897                        .HasColumnType("smallint");
 03898
 03899                    b.Property<string>("LongName")
 03900                        .IsRequired()
 03901                        .HasMaxLength(50)
 03902                        .HasColumnType("varchar(50)");
 03903
 03904                    b.Property<string>("Name")
 03905                        .IsRequired()
 03906                        .HasMaxLength(50)
 03907                        .HasColumnType("varchar(50)");
 03908
 03909                    b.Property<decimal>("RateToRub")
 03910                        .HasColumnType("decimal(18,6)");
 03911
 03912                    b.Property<short>("RbcId")
 03913                        .HasColumnType("smallint");
 03914
 03915                    b.Property<string>("Symbol")
 03916                        .IsRequired()
 03917                        .HasMaxLength(10)
 03918                        .HasColumnType("varchar(10)");
 03919
 03920                    b.HasKey("Id");
 03921
 03922                    b.HasIndex("Name")
 03923                        .HasDatabaseName("IX_InterpartsSutCurrencies_Name");
 03924
 03925                    b.ToTable("InterpartsSutCurrencies");
 03926                });
 3927
 03928            modelBuilder.Entity("OzonDomains.Models.InterpartsWarehouseLogin", b =>
 03929                {
 03930                    b.Property<int>("Id")
 03931                        .ValueGeneratedOnAdd()
 03932                        .HasColumnType("int");
 03933
 03934                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03935
 03936                    b.Property<string>("Login")
 03937                        .IsRequired()
 03938                        .HasMaxLength(100)
 03939                        .HasColumnType("varchar(100)");
 03940
 03941                    b.Property<int>("WarehouseId")
 03942                        .HasColumnType("int");
 03943
 03944                    b.HasKey("Id");
 03945
 03946                    b.HasIndex("WarehouseId")
 03947                        .IsUnique()
 03948                        .HasDatabaseName("UX_InterpartsWarehouseLogins_WarehouseId");
 03949
 03950                    b.ToTable("InterpartsWarehouseLogins");
 03951                });
 3952
 03953            modelBuilder.Entity("OzonDomains.Models.Manufacturer", b =>
 03954                {
 03955                    b.Property<int>("Id")
 03956                        .ValueGeneratedOnAdd()
 03957                        .HasColumnType("int");
 03958
 03959                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03960
 03961                    b.Property<string>("Code")
 03962                        .HasMaxLength(50)
 03963                        .HasColumnType("varchar(50)");
 03964
 03965                    b.Property<int?>("EtProduserId")
 03966                        .HasColumnType("int");
 03967
 03968                    b.Property<string>("Name")
 03969                        .HasMaxLength(50)
 03970                        .HasColumnType("varchar(50)");
 03971
 03972                    b.HasKey("Id");
 03973
 03974                    b.HasIndex("EtProduserId")
 03975                        .HasDatabaseName("IX_manufacturers_EtProduserId");
 03976
 03977                    b.ToTable("Manufacturers");
 03978                });
 3979
 03980            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedResult", b =>
 03981                {
 03982                    b.Property<int>("Id")
 03983                        .ValueGeneratedOnAdd()
 03984                        .HasColumnType("int");
 03985
 03986                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 03987
 03988                    b.Property<string>("MainFileName")
 03989                        .HasColumnType("longtext");
 03990
 03991                    b.Property<string>("ScondaryFileName")
 03992                        .HasColumnType("longtext");
 03993
 03994                    b.Property<DateTime>("СreationDate")
 03995                        .HasColumnType("datetime(6)");
 03996
 03997                    b.HasKey("Id");
 03998
 03999                    b.ToTable("MatchedResults");
 04000                });
 4001
 04002            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedRow", b =>
 04003                {
 04004                    b.Property<int>("Id")
 04005                        .ValueGeneratedOnAdd()
 04006                        .HasColumnType("int");
 04007
 04008                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 04009
 04010                    b.Property<string>("File1DataSerialized")
 04011                        .IsRequired()
 04012                        .HasColumnType("longtext");
 04013
 04014                    b.Property<string>("File2DataSerialized")
 04015                        .IsRequired()
 04016                        .HasColumnType("longtext");
 04017
 04018                    b.Property<int?>("MatchedResultId")
 04019                        .HasColumnType("int");
 04020
 04021                    b.HasKey("Id");
 04022
 04023                    b.HasIndex("MatchedResultId");
 04024
 04025                    b.ToTable("MatchedRows");
 04026                });
 4027
 04028            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchingColumn", b =>
 04029                {
 04030                    b.Property<int>("Id")
 04031                        .ValueGeneratedOnAdd()
 04032                        .HasColumnType("int");
 04033
 04034                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 04035
 04036                    b.Property<string>("Item1")
 04037                        .HasColumnType("longtext");
 04038
 04039                    b.Property<string>("Item2")
 04040                        .HasColumnType("longtext");
 04041
 04042                    b.Property<int?>("MatchedResultId")
 04043                        .HasColumnType("int");
 04044
 04045                    b.Property<int?>("SavedMatchingColumnId")
 04046                        .HasColumnType("int");
 04047
 04048                    b.HasKey("Id");
 04049
 04050                    b.HasIndex("MatchedResultId");
 04051
 04052                    b.HasIndex("SavedMatchingColumnId");
 04053
 04054                    b.ToTable("MatchingColumns");
 04055                });
 4056
 04057            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", b =>
 04058                {
 04059                    b.Property<int>("Id")
 04060                        .ValueGeneratedOnAdd()
 04061                        .HasColumnType("int");
 04062
 04063                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 04064
 04065                    b.Property<string>("Name")
 04066                        .IsRequired()
 04067                        .HasColumnType("longtext");
 04068
 04069                    b.Property<int>("StartColumn1")
 04070                        .HasColumnType("int");
 04071
 04072                    b.Property<int>("StartColumn2")
 04073                        .HasColumnType("int");
 04074
 04075                    b.Property<int>("StartRow1")
 04076                        .HasColumnType("int");
 04077
 04078                    b.Property<int>("StartRow2")
 04079                        .HasColumnType("int");
 04080
 04081                    b.HasKey("Id");
 04082
 04083                    b.ToTable("SavedMatchingColumns");
 04084                });
 4085
 04086            modelBuilder.Entity("OzonDomains.Models.MikadoCartItem", b =>
 04087                {
 04088                    b.Property<long>("Id")
 04089                        .ValueGeneratedOnAdd()
 04090                        .HasColumnType("bigint");
 04091
 04092                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04093
 04094                    b.Property<int?>("ActiveStudioOrderId")
 04095                        .HasColumnType("int");
 04096
 04097                    b.Property<long>("ApiBasketItemId")
 04098                        .HasColumnType("bigint");
 04099
 04100                    b.Property<string>("Article")
 04101                        .IsRequired()
 04102                        .HasMaxLength(80)
 04103                        .HasColumnType("varchar(80)");
 04104
 04105                    b.Property<string>("Brand")
 04106                        .IsRequired()
 04107                        .HasMaxLength(120)
 04108                        .HasColumnType("varchar(120)");
 04109
 04110                    b.Property<DateTime>("CreatedAtUtc")
 04111                        .HasColumnType("datetime(6)");
 04112
 04113                    b.Property<string>("CreatedBy")
 04114                        .HasMaxLength(450)
 04115                        .HasColumnType("varchar(450)");
 04116
 04117                    b.Property<int>("DeliveryDays")
 04118                        .HasColumnType("int");
 04119
 04120                    b.Property<int>("DeliveryType")
 04121                        .HasColumnType("int");
 04122
 04123                    b.Property<int>("ExpressId")
 04124                        .HasColumnType("int");
 04125
 04126                    b.Property<string>("LastError")
 04127                        .HasMaxLength(1000)
 04128                        .HasColumnType("varchar(1000)");
 04129
 04130                    b.Property<int>("MinimumQuantity")
 04131                        .HasColumnType("int");
 04132
 04133                    b.Property<string>("OrderCode")
 04134                        .IsRequired()
 04135                        .HasMaxLength(80)
 04136                        .HasColumnType("varchar(80)");
 04137
 04138                    b.Property<string>("ProductName")
 04139                        .HasMaxLength(255)
 04140                        .HasColumnType("varchar(255)");
 04141
 04142                    b.Property<int>("Quantity")
 04143                        .HasColumnType("int");
 04144
 04145                    b.Property<decimal?>("SourcePrice")
 04146                        .HasPrecision(18, 4)
 04147                        .HasColumnType("decimal(18,4)");
 04148
 04149                    b.Property<string>("Status")
 04150                        .IsRequired()
 04151                        .HasMaxLength(20)
 04152                        .HasColumnType("varchar(20)");
 04153
 04154                    b.Property<int>("StockId")
 04155                        .HasColumnType("int");
 04156
 04157                    b.Property<int>("StudioOrderId")
 04158                        .HasColumnType("int");
 04159
 04160                    b.Property<DateTime?>("TestedAtUtc")
 04161                        .HasColumnType("datetime(6)");
 04162
 04163                    b.Property<DateTime>("UpdatedAtUtc")
 04164                        .HasColumnType("datetime(6)");
 04165
 04166                    b.Property<string>("WarehouseName")
 04167                        .HasMaxLength(160)
 04168                        .HasColumnType("varchar(160)");
 04169
 04170                    b.HasKey("Id");
 04171
 04172                    b.HasIndex("ActiveStudioOrderId")
 04173                        .IsUnique()
 04174                        .HasDatabaseName("UX_MikadoCartItems_ActiveStudioOrderId");
 04175
 04176                    b.HasIndex("StudioOrderId")
 04177                        .HasDatabaseName("FK_MikadoCartItems_Orders");
 04178
 04179                    b.ToTable("MikadoCartItems");
 04180                });
 4181
 04182            modelBuilder.Entity("OzonDomains.Models.MlAutoCartItem", b =>
 04183                {
 04184                    b.Property<long>("Id")
 04185                        .ValueGeneratedOnAdd()
 04186                        .HasColumnType("bigint");
 04187
 04188                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04189
 04190                    b.Property<int?>("ActiveStudioOrderId")
 04191                        .HasColumnType("int");
 04192
 04193                    b.Property<string>("Brand")
 04194                        .IsRequired()
 04195                        .HasMaxLength(100)
 04196                        .HasColumnType("varchar(100)");
 04197
 04198                    b.Property<DateTime>("CreatedAtUtc")
 04199                        .HasColumnType("datetime(6)");
 04200
 04201                    b.Property<string>("CreatedBy")
 04202                        .HasMaxLength(450)
 04203                        .HasColumnType("varchar(450)");
 04204
 04205                    b.Property<string>("CurrencyCode")
 04206                        .IsRequired()
 04207                        .HasMaxLength(8)
 04208                        .HasColumnType("varchar(8)");
 04209
 04210                    b.Property<string>("DeliveryAddressId")
 04211                        .HasMaxLength(50)
 04212                        .HasColumnType("varchar(50)");
 04213
 04214                    b.Property<string>("DeliveryAddressName")
 04215                        .HasMaxLength(300)
 04216                        .HasColumnType("varchar(300)");
 04217
 04218                    b.Property<DateTime?>("DeliveryAtUtc")
 04219                        .HasColumnType("datetime(6)");
 04220
 04221                    b.Property<string>("LastError")
 04222                        .HasMaxLength(1000)
 04223                        .HasColumnType("varchar(1000)");
 04224
 04225                    b.Property<string>("Pin")
 04226                        .IsRequired()
 04227                        .HasMaxLength(60)
 04228                        .HasColumnType("varchar(60)");
 04229
 04230                    b.Property<string>("ProductName")
 04231                        .HasMaxLength(200)
 04232                        .HasColumnType("varchar(200)");
 04233
 04234                    b.Property<decimal>("Quantity")
 04235                        .HasColumnType("decimal(18,3)");
 04236
 04237                    b.Property<decimal?>("SourcePrice")
 04238                        .HasColumnType("decimal(18,4)");
 04239
 04240                    b.Property<string>("Status")
 04241                        .IsRequired()
 04242                        .HasMaxLength(30)
 04243                        .HasColumnType("varchar(30)");
 04244
 04245                    b.Property<string>("StorageCode")
 04246                        .HasMaxLength(80)
 04247                        .HasColumnType("varchar(80)");
 04248
 04249                    b.Property<int>("StudioOrderId")
 04250                        .HasColumnType("int");
 04251
 04252                    b.Property<string>("TestResultJson")
 04253                        .HasColumnType("longtext");
 04254
 04255                    b.Property<DateTime?>("TestedAtUtc")
 04256                        .HasColumnType("datetime(6)");
 04257
 04258                    b.Property<DateTime>("UpdatedAtUtc")
 04259                        .HasColumnType("datetime(6)");
 04260
 04261                    b.Property<string>("WarehouseName")
 04262                        .HasMaxLength(160)
 04263                        .HasColumnType("varchar(160)");
 04264
 04265                    b.HasKey("Id");
 04266
 04267                    b.HasIndex("ActiveStudioOrderId")
 04268                        .IsUnique()
 04269                        .HasDatabaseName("UX_MlAutoCartItems_ActiveOrder");
 04270
 04271                    b.HasIndex("StudioOrderId", "Status")
 04272                        .HasDatabaseName("IX_MlAutoCartItems_Order_Status");
 04273
 04274                    b.ToTable("MlAutoCartItems");
 04275                });
 4276
 04277            modelBuilder.Entity("OzonDomains.Models.MlAutoDeliveryAddressMapping", b =>
 04278                {
 04279                    b.Property<long>("Id")
 04280                        .ValueGeneratedOnAdd()
 04281                        .HasColumnType("bigint");
 04282
 04283                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04284
 04285                    b.Property<string>("DeliveryAddressId")
 04286                        .IsRequired()
 04287                        .HasMaxLength(50)
 04288                        .HasColumnType("varchar(50)");
 04289
 04290                    b.Property<int>("ShipmentWarehouseId")
 04291                        .HasColumnType("int");
 04292
 04293                    b.HasKey("Id");
 04294
 04295                    b.HasIndex("ShipmentWarehouseId")
 04296                        .IsUnique()
 04297                        .HasDatabaseName("UX_MlAutoDeliveryAddressMappings_Warehouse");
 04298
 04299                    b.ToTable("MlAutoDeliveryAddressMappings");
 04300                });
 4301
 04302            modelBuilder.Entity("OzonDomains.Models.MlAutoOrder", b =>
 04303                {
 04304                    b.Property<long>("Id")
 04305                        .ValueGeneratedOnAdd()
 04306                        .HasColumnType("bigint");
 04307
 04308                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04309
 04310                    b.Property<DateTime>("CreatedAtUtc")
 04311                        .HasColumnType("datetime(6)");
 04312
 04313                    b.Property<string>("CreatedBy")
 04314                        .HasMaxLength(450)
 04315                        .HasColumnType("varchar(450)");
 04316
 04317                    b.Property<string>("DeliveryAddressId")
 04318                        .IsRequired()
 04319                        .HasMaxLength(50)
 04320                        .HasColumnType("varchar(50)");
 04321
 04322                    b.Property<string>("DeliveryAddressName")
 04323                        .HasMaxLength(300)
 04324                        .HasColumnType("varchar(300)");
 04325
 04326                    b.Property<bool>("IsCashless")
 04327                        .HasColumnType("tinyint(1)");
 04328
 04329                    b.Property<string>("OrderNumber")
 04330                        .IsRequired()
 04331                        .HasMaxLength(50)
 04332                        .HasColumnType("varchar(50)");
 04333
 04334                    b.Property<string>("RequestJson")
 04335                        .HasColumnType("longtext");
 04336
 04337                    b.Property<string>("ResponseJson")
 04338                        .HasColumnType("longtext");
 04339
 04340                    b.Property<string>("Status")
 04341                        .IsRequired()
 04342                        .HasMaxLength(50)
 04343                        .HasColumnType("varchar(50)");
 04344
 04345                    b.HasKey("Id");
 04346
 04347                    b.HasIndex("OrderNumber")
 04348                        .IsUnique()
 04349                        .HasDatabaseName("UX_MlAutoOrders_Number");
 04350
 04351                    b.ToTable("MlAutoOrders");
 04352                });
 4353
 04354            modelBuilder.Entity("OzonDomains.Models.MlAutoOrderItem", b =>
 04355                {
 04356                    b.Property<long>("Id")
 04357                        .ValueGeneratedOnAdd()
 04358                        .HasColumnType("bigint");
 04359
 04360                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04361
 04362                    b.Property<string>("Brand")
 04363                        .IsRequired()
 04364                        .HasMaxLength(100)
 04365                        .HasColumnType("varchar(100)");
 04366
 04367                    b.Property<string>("CurrencyCode")
 04368                        .HasMaxLength(8)
 04369                        .HasColumnType("varchar(8)");
 04370
 04371                    b.Property<string>("Error")
 04372                        .HasMaxLength(1000)
 04373                        .HasColumnType("varchar(1000)");
 04374
 04375                    b.Property<long?>("MlAutoCartItemId")
 04376                        .HasColumnType("bigint");
 04377
 04378                    b.Property<long>("MlAutoOrderId")
 04379                        .HasColumnType("bigint");
 04380
 04381                    b.Property<string>("Pin")
 04382                        .IsRequired()
 04383                        .HasMaxLength(60)
 04384                        .HasColumnType("varchar(60)");
 04385
 04386                    b.Property<decimal?>("Price")
 04387                        .HasColumnType("decimal(18,4)");
 04388
 04389                    b.Property<decimal>("Quantity")
 04390                        .HasColumnType("decimal(18,3)");
 04391
 04392                    b.Property<int>("StudioOrderId")
 04393                        .HasColumnType("int");
 04394
 04395                    b.HasKey("Id");
 04396
 04397                    b.HasIndex("MlAutoOrderId")
 04398                        .HasDatabaseName("IX_MlAutoOrderItems_Order");
 04399
 04400                    b.ToTable("MlAutoOrderItems");
 04401                });
 4402
 04403            modelBuilder.Entity("OzonDomains.Models.MlAutoRuCartItem", b =>
 04404                {
 04405                    b.Property<long>("Id")
 04406                        .ValueGeneratedOnAdd()
 04407                        .HasColumnType("bigint");
 04408
 04409                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04410
 04411                    b.Property<int?>("ActiveStudioOrderId")
 04412                        .HasColumnType("int");
 04413
 04414                    b.Property<string>("Brand")
 04415                        .IsRequired()
 04416                        .HasMaxLength(100)
 04417                        .HasColumnType("varchar(100)");
 04418
 04419                    b.Property<DateTime>("CreatedAtUtc")
 04420                        .HasColumnType("datetime(6)");
 04421
 04422                    b.Property<string>("CreatedBy")
 04423                        .HasMaxLength(450)
 04424                        .HasColumnType("varchar(450)");
 04425
 04426                    b.Property<string>("CurrencyCode")
 04427                        .IsRequired()
 04428                        .HasMaxLength(8)
 04429                        .HasColumnType("varchar(8)");
 04430
 04431                    b.Property<string>("DeliveryAddressId")
 04432                        .HasMaxLength(50)
 04433                        .HasColumnType("varchar(50)");
 04434
 04435                    b.Property<string>("DeliveryAddressName")
 04436                        .HasMaxLength(300)
 04437                        .HasColumnType("varchar(300)");
 04438
 04439                    b.Property<DateTime?>("DeliveryAtUtc")
 04440                        .HasColumnType("datetime(6)");
 04441
 04442                    b.Property<string>("LastError")
 04443                        .HasMaxLength(1000)
 04444                        .HasColumnType("varchar(1000)");
 04445
 04446                    b.Property<string>("Pin")
 04447                        .IsRequired()
 04448                        .HasMaxLength(60)
 04449                        .HasColumnType("varchar(60)");
 04450
 04451                    b.Property<string>("ProductName")
 04452                        .HasMaxLength(200)
 04453                        .HasColumnType("varchar(200)");
 04454
 04455                    b.Property<decimal>("Quantity")
 04456                        .HasColumnType("decimal(18,3)");
 04457
 04458                    b.Property<decimal?>("SourcePrice")
 04459                        .HasColumnType("decimal(18,4)");
 04460
 04461                    b.Property<string>("Status")
 04462                        .IsRequired()
 04463                        .HasMaxLength(30)
 04464                        .HasColumnType("varchar(30)");
 04465
 04466                    b.Property<string>("StorageCode")
 04467                        .HasMaxLength(80)
 04468                        .HasColumnType("varchar(80)");
 04469
 04470                    b.Property<int>("StudioOrderId")
 04471                        .HasColumnType("int");
 04472
 04473                    b.Property<string>("TestResultJson")
 04474                        .HasColumnType("longtext");
 04475
 04476                    b.Property<DateTime?>("TestedAtUtc")
 04477                        .HasColumnType("datetime(6)");
 04478
 04479                    b.Property<DateTime>("UpdatedAtUtc")
 04480                        .HasColumnType("datetime(6)");
 04481
 04482                    b.Property<string>("WarehouseName")
 04483                        .HasMaxLength(160)
 04484                        .HasColumnType("varchar(160)");
 04485
 04486                    b.HasKey("Id");
 04487
 04488                    b.HasIndex("ActiveStudioOrderId")
 04489                        .IsUnique()
 04490                        .HasDatabaseName("UX_MlAutoRuCartItems_ActiveOrder");
 04491
 04492                    b.HasIndex("StudioOrderId", "Status")
 04493                        .HasDatabaseName("IX_MlAutoRuCartItems_Order_Status");
 04494
 04495                    b.ToTable("MlAutoRuCartItems");
 04496                });
 4497
 04498            modelBuilder.Entity("OzonDomains.Models.MlAutoRuDeliveryAddressMapping", b =>
 04499                {
 04500                    b.Property<long>("Id")
 04501                        .ValueGeneratedOnAdd()
 04502                        .HasColumnType("bigint");
 04503
 04504                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04505
 04506                    b.Property<string>("DeliveryAddressId")
 04507                        .IsRequired()
 04508                        .HasMaxLength(50)
 04509                        .HasColumnType("varchar(50)");
 04510
 04511                    b.Property<int>("ShipmentWarehouseId")
 04512                        .HasColumnType("int");
 04513
 04514                    b.HasKey("Id");
 04515
 04516                    b.HasIndex("ShipmentWarehouseId")
 04517                        .IsUnique()
 04518                        .HasDatabaseName("UX_MlAutoRuDeliveryAddressMappings_Warehouse");
 04519
 04520                    b.ToTable("MlAutoRuDeliveryAddressMappings");
 04521                });
 4522
 04523            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrder", b =>
 04524                {
 04525                    b.Property<long>("Id")
 04526                        .ValueGeneratedOnAdd()
 04527                        .HasColumnType("bigint");
 04528
 04529                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04530
 04531                    b.Property<DateTime>("CreatedAtUtc")
 04532                        .HasColumnType("datetime(6)");
 04533
 04534                    b.Property<string>("CreatedBy")
 04535                        .HasMaxLength(450)
 04536                        .HasColumnType("varchar(450)");
 04537
 04538                    b.Property<string>("DeliveryAddressId")
 04539                        .IsRequired()
 04540                        .HasMaxLength(50)
 04541                        .HasColumnType("varchar(50)");
 04542
 04543                    b.Property<string>("DeliveryAddressName")
 04544                        .HasMaxLength(300)
 04545                        .HasColumnType("varchar(300)");
 04546
 04547                    b.Property<bool>("IsCashless")
 04548                        .HasColumnType("tinyint(1)");
 04549
 04550                    b.Property<string>("OrderNumber")
 04551                        .IsRequired()
 04552                        .HasMaxLength(50)
 04553                        .HasColumnType("varchar(50)");
 04554
 04555                    b.Property<string>("RequestJson")
 04556                        .HasColumnType("longtext");
 04557
 04558                    b.Property<string>("ResponseJson")
 04559                        .HasColumnType("longtext");
 04560
 04561                    b.Property<string>("Status")
 04562                        .IsRequired()
 04563                        .HasMaxLength(50)
 04564                        .HasColumnType("varchar(50)");
 04565
 04566                    b.HasKey("Id");
 04567
 04568                    b.HasIndex("OrderNumber")
 04569                        .IsUnique()
 04570                        .HasDatabaseName("UX_MlAutoRuOrders_Number");
 04571
 04572                    b.ToTable("MlAutoRuOrders");
 04573                });
 4574
 04575            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrderItem", b =>
 04576                {
 04577                    b.Property<long>("Id")
 04578                        .ValueGeneratedOnAdd()
 04579                        .HasColumnType("bigint");
 04580
 04581                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04582
 04583                    b.Property<string>("Brand")
 04584                        .IsRequired()
 04585                        .HasMaxLength(100)
 04586                        .HasColumnType("varchar(100)");
 04587
 04588                    b.Property<string>("CurrencyCode")
 04589                        .HasMaxLength(8)
 04590                        .HasColumnType("varchar(8)");
 04591
 04592                    b.Property<string>("Error")
 04593                        .HasMaxLength(1000)
 04594                        .HasColumnType("varchar(1000)");
 04595
 04596                    b.Property<long?>("MlAutoRuCartItemId")
 04597                        .HasColumnType("bigint");
 04598
 04599                    b.Property<long>("MlAutoRuOrderId")
 04600                        .HasColumnType("bigint");
 04601
 04602                    b.Property<string>("Pin")
 04603                        .IsRequired()
 04604                        .HasMaxLength(60)
 04605                        .HasColumnType("varchar(60)");
 04606
 04607                    b.Property<decimal?>("Price")
 04608                        .HasColumnType("decimal(18,4)");
 04609
 04610                    b.Property<decimal>("Quantity")
 04611                        .HasColumnType("decimal(18,3)");
 04612
 04613                    b.Property<int>("StudioOrderId")
 04614                        .HasColumnType("int");
 04615
 04616                    b.HasKey("Id");
 04617
 04618                    b.HasIndex("MlAutoRuOrderId")
 04619                        .HasDatabaseName("IX_MlAutoRuOrderItems_Order");
 04620
 04621                    b.ToTable("MlAutoRuOrderItems");
 04622                });
 4623
 04624            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraCartItem", b =>
 04625                {
 04626                    b.Property<long>("Id")
 04627                        .ValueGeneratedOnAdd()
 04628                        .HasColumnType("bigint");
 04629
 04630                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04631
 04632                    b.Property<int?>("ActiveStudioOrderId")
 04633                        .HasColumnType("int");
 04634
 04635                    b.Property<string>("Article")
 04636                        .IsRequired()
 04637                        .HasMaxLength(128)
 04638                        .HasColumnType("varchar(128)");
 04639
 04640                    b.Property<string>("Brand")
 04641                        .IsRequired()
 04642                        .HasMaxLength(80)
 04643                        .HasColumnType("varchar(80)");
 04644
 04645                    b.Property<string>("Comment")
 04646                        .HasMaxLength(1000)
 04647                        .HasColumnType("varchar(1000)");
 04648
 04649                    b.Property<DateTime>("CreatedAtUtc")
 04650                        .HasColumnType("datetime(6)");
 04651
 04652                    b.Property<string>("CreatedBy")
 04653                        .HasMaxLength(450)
 04654                        .HasColumnType("varchar(450)");
 04655
 04656                    b.Property<int?>("DeliveryDaysMax")
 04657                        .HasColumnType("int");
 04658
 04659                    b.Property<int?>("DeliveryDaysMin")
 04660                        .HasColumnType("int");
 04661
 04662                    b.Property<string>("ExternalBasketItemId")
 04663                        .IsRequired()
 04664                        .HasMaxLength(32)
 04665                        .HasColumnType("varchar(32)");
 04666
 04667                    b.Property<string>("LastError")
 04668                        .HasMaxLength(1000)
 04669                        .HasColumnType("varchar(1000)");
 04670
 04671                    b.Property<string>("ProductName")
 04672                        .HasMaxLength(160)
 04673                        .HasColumnType("varchar(160)");
 04674
 04675                    b.Property<decimal>("Quantity")
 04676                        .HasPrecision(18, 3)
 04677                        .HasColumnType("decimal(18,3)");
 04678
 04679                    b.Property<decimal?>("SourcePrice")
 04680                        .HasPrecision(18, 4)
 04681                        .HasColumnType("decimal(18,4)");
 04682
 04683                    b.Property<string>("Status")
 04684                        .IsRequired()
 04685                        .HasMaxLength(30)
 04686                        .HasColumnType("varchar(30)");
 04687
 04688                    b.Property<int>("StudioOrderId")
 04689                        .HasColumnType("int");
 04690
 04691                    b.Property<DateTime>("UpdatedAtUtc")
 04692                        .HasColumnType("datetime(6)");
 04693
 04694                    b.Property<string>("Warehouse")
 04695                        .HasMaxLength(255)
 04696                        .HasColumnType("varchar(255)");
 04697
 04698                    b.HasKey("Id");
 04699
 04700                    b.HasIndex("ActiveStudioOrderId")
 04701                        .IsUnique()
 04702                        .HasDatabaseName("UX_MoskvorechieIstraCartItems_ActiveStudioOrderId");
 04703
 04704                    b.HasIndex("StudioOrderId")
 04705                        .HasDatabaseName("FK_MoskvorechieIstraCartItems_StudioOrder");
 04706
 04707                    b.HasIndex("ExternalBasketItemId", "Status");
 04708
 04709                    b.ToTable("MoskvorechieIstraCartItems");
 04710                });
 4711
 04712            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrder", b =>
 04713                {
 04714                    b.Property<long>("Id")
 04715                        .ValueGeneratedOnAdd()
 04716                        .HasColumnType("bigint");
 04717
 04718                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04719
 04720                    b.Property<DateTime>("CreatedAt")
 04721                        .HasColumnType("datetime(6)");
 04722
 04723                    b.Property<string>("CreatedBy")
 04724                        .HasMaxLength(256)
 04725                        .HasColumnType("varchar(256)");
 04726
 04727                    b.Property<string>("ExternalOrderNumber")
 04728                        .HasMaxLength(128)
 04729                        .HasColumnType("varchar(128)");
 04730
 04731                    b.Property<string>("ResponseJson")
 04732                        .IsRequired()
 04733                        .HasColumnType("longtext");
 04734
 04735                    b.Property<string>("Status")
 04736                        .IsRequired()
 04737                        .HasMaxLength(30)
 04738                        .HasColumnType("varchar(30)");
 04739
 04740                    b.HasKey("Id");
 04741
 04742                    b.HasIndex("ExternalOrderNumber")
 04743                        .IsUnique()
 04744                        .HasDatabaseName("UX_MoskvorechieIstraOrders_ExternalOrderNumber");
 04745
 04746                    b.ToTable("MoskvorechieIstraOrders");
 04747                });
 4748
 04749            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrderItem", b =>
 04750                {
 04751                    b.Property<long>("Id")
 04752                        .ValueGeneratedOnAdd()
 04753                        .HasColumnType("bigint");
 04754
 04755                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04756
 04757                    b.Property<string>("Article")
 04758                        .IsRequired()
 04759                        .HasMaxLength(128)
 04760                        .HasColumnType("varchar(128)");
 04761
 04762                    b.Property<string>("Brand")
 04763                        .HasMaxLength(256)
 04764                        .HasColumnType("varchar(256)");
 04765
 04766                    b.Property<string>("ExternalBasketItemId")
 04767                        .HasMaxLength(128)
 04768                        .HasColumnType("varchar(128)");
 04769
 04770                    b.Property<long>("MoskvorechieIstraOrderId")
 04771                        .HasColumnType("bigint");
 04772
 04773                    b.Property<decimal?>("Price")
 04774                        .HasPrecision(18, 2)
 04775                        .HasColumnType("decimal(18,2)");
 04776
 04777                    b.Property<decimal>("Quantity")
 04778                        .HasPrecision(18, 3)
 04779                        .HasColumnType("decimal(18,3)");
 04780
 04781                    b.Property<int>("StudioOrderId")
 04782                        .HasColumnType("int");
 04783
 04784                    b.HasKey("Id");
 04785
 04786                    b.HasIndex("StudioOrderId")
 04787                        .HasDatabaseName("FK_MoskvorechieIstraOrderItems_StudioOrder");
 04788
 04789                    b.HasIndex("MoskvorechieIstraOrderId", "StudioOrderId", "Article")
 04790                        .IsUnique()
 04791                        .HasDatabaseName("UX_MoskvorechieIstraOrderItems_OrderStudio");
 04792
 04793                    b.ToTable("MoskvorechieIstraOrderItems");
 04794                });
 4795
 04796            modelBuilder.Entity("OzonDomains.Models.MotexCartItem", b =>
 04797                {
 04798                    b.Property<long>("Id")
 04799                        .ValueGeneratedOnAdd()
 04800                        .HasColumnType("bigint");
 04801
 04802                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04803
 04804                    b.Property<int?>("ActiveStudioOrderId")
 04805                        .HasColumnType("int");
 04806
 04807                    b.Property<string>("Brand")
 04808                        .IsRequired()
 04809                        .HasMaxLength(256)
 04810                        .HasColumnType("varchar(256)");
 04811
 04812                    b.Property<string>("Code")
 04813                        .IsRequired()
 04814                        .HasMaxLength(120)
 04815                        .HasColumnType("varchar(120)");
 04816
 04817                    b.Property<DateTime>("CreatedAtUtc")
 04818                        .HasColumnType("datetime(6)");
 04819
 04820                    b.Property<string>("CreatedBy")
 04821                        .HasMaxLength(450)
 04822                        .HasColumnType("varchar(450)");
 04823
 04824                    b.Property<string>("CurrencyCode")
 04825                        .IsRequired()
 04826                        .HasMaxLength(8)
 04827                        .HasColumnType("varchar(8)");
 04828
 04829                    b.Property<DateTime?>("DeliveryAtUtc")
 04830                        .HasColumnType("datetime(6)");
 04831
 04832                    b.Property<string>("LastError")
 04833                        .HasMaxLength(1000)
 04834                        .HasColumnType("varchar(1000)");
 04835
 04836                    b.Property<string>("ProductName")
 04837                        .HasMaxLength(200)
 04838                        .HasColumnType("varchar(200)");
 04839
 04840                    b.Property<decimal>("Quantity")
 04841                        .HasPrecision(18, 3)
 04842                        .HasColumnType("decimal(18,3)");
 04843
 04844                    b.Property<decimal?>("SourcePrice")
 04845                        .HasPrecision(18, 4)
 04846                        .HasColumnType("decimal(18,4)");
 04847
 04848                    b.Property<string>("Status")
 04849                        .IsRequired()
 04850                        .HasMaxLength(30)
 04851                        .HasColumnType("varchar(30)");
 04852
 04853                    b.Property<string>("StoreCode")
 04854                        .HasMaxLength(40)
 04855                        .HasColumnType("varchar(40)");
 04856
 04857                    b.Property<string>("StoreInfo")
 04858                        .HasMaxLength(255)
 04859                        .HasColumnType("varchar(255)");
 04860
 04861                    b.Property<int>("StudioOrderId")
 04862                        .HasColumnType("int");
 04863
 04864                    b.Property<DateTime>("UpdatedAtUtc")
 04865                        .HasColumnType("datetime(6)");
 04866
 04867                    b.HasKey("Id");
 04868
 04869                    b.HasIndex("ActiveStudioOrderId")
 04870                        .IsUnique()
 04871                        .HasDatabaseName("UX_MotexCartItems_ActiveStudioOrderId");
 04872
 04873                    b.HasIndex("StudioOrderId", "Status")
 04874                        .HasDatabaseName("IX_MotexCartItems_StudioOrder_Status");
 04875
 04876                    b.ToTable("MotexCartItems");
 04877                });
 4878
 04879            modelBuilder.Entity("OzonDomains.Models.MotexOrder", b =>
 04880                {
 04881                    b.Property<long>("Id")
 04882                        .ValueGeneratedOnAdd()
 04883                        .HasColumnType("bigint");
 04884
 04885                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04886
 04887                    b.Property<string>("ClientOrderNum")
 04888                        .IsRequired()
 04889                        .HasMaxLength(50)
 04890                        .HasColumnType("varchar(50)");
 04891
 04892                    b.Property<DateTime>("CreatedAtUtc")
 04893                        .HasColumnType("datetime(6)");
 04894
 04895                    b.Property<string>("CreatedBy")
 04896                        .HasMaxLength(450)
 04897                        .HasColumnType("varchar(450)");
 04898
 04899                    b.Property<string>("DeliveryAddressCode")
 04900                        .IsRequired()
 04901                        .HasMaxLength(70)
 04902                        .HasColumnType("varchar(70)");
 04903
 04904                    b.Property<string>("ExternalOrderId")
 04905                        .HasMaxLength(50)
 04906                        .HasColumnType("varchar(50)");
 04907
 04908                    b.Property<string>("RequestJson")
 04909                        .HasColumnType("longtext");
 04910
 04911                    b.Property<string>("ResponseJson")
 04912                        .HasColumnType("longtext");
 04913
 04914                    b.Property<string>("Status")
 04915                        .IsRequired()
 04916                        .HasMaxLength(50)
 04917                        .HasColumnType("varchar(50)");
 04918
 04919                    b.HasKey("Id");
 04920
 04921                    b.HasIndex("ClientOrderNum")
 04922                        .IsUnique()
 04923                        .HasDatabaseName("UX_MotexOrders_ClientOrderNum");
 04924
 04925                    b.ToTable("MotexOrders");
 04926                });
 4927
 04928            modelBuilder.Entity("OzonDomains.Models.MotexOrderItem", b =>
 04929                {
 04930                    b.Property<long>("Id")
 04931                        .ValueGeneratedOnAdd()
 04932                        .HasColumnType("bigint");
 04933
 04934                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04935
 04936                    b.Property<string>("Brand")
 04937                        .IsRequired()
 04938                        .HasMaxLength(256)
 04939                        .HasColumnType("varchar(256)");
 04940
 04941                    b.Property<string>("Code")
 04942                        .IsRequired()
 04943                        .HasMaxLength(120)
 04944                        .HasColumnType("varchar(120)");
 04945
 04946                    b.Property<string>("CurrencyCode")
 04947                        .HasMaxLength(8)
 04948                        .HasColumnType("varchar(8)");
 04949
 04950                    b.Property<string>("Error")
 04951                        .HasMaxLength(1000)
 04952                        .HasColumnType("varchar(1000)");
 04953
 04954                    b.Property<long?>("MotexCartItemId")
 04955                        .HasColumnType("bigint");
 04956
 04957                    b.Property<long>("MotexOrderId")
 04958                        .HasColumnType("bigint");
 04959
 04960                    b.Property<decimal?>("Price")
 04961                        .HasPrecision(18, 4)
 04962                        .HasColumnType("decimal(18,4)");
 04963
 04964                    b.Property<decimal>("Quantity")
 04965                        .HasPrecision(18, 3)
 04966                        .HasColumnType("decimal(18,3)");
 04967
 04968                    b.Property<int>("StudioOrderId")
 04969                        .HasColumnType("int");
 04970
 04971                    b.HasKey("Id");
 04972
 04973                    b.HasIndex("MotexOrderId")
 04974                        .HasDatabaseName("IX_MotexOrderItems_MotexOrderId");
 04975
 04976                    b.HasIndex("MotexOrderId", "StudioOrderId", "Code")
 04977                        .IsUnique()
 04978                        .HasDatabaseName("UX_MotexOrderItems_Order_StudioOrder_Code");
 04979
 04980                    b.ToTable("MotexOrderItems");
 04981                });
 4982
 04983            modelBuilder.Entity("OzonDomains.Models.NikeiCartItem", b =>
 04984                {
 04985                    b.Property<long>("Id")
 04986                        .ValueGeneratedOnAdd()
 04987                        .HasColumnType("bigint");
 04988
 04989                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04990
 04991                    b.Property<int?>("ActiveStudioOrderId")
 04992                        .HasColumnType("int");
 04993
 04994                    b.Property<string>("Article")
 04995                        .IsRequired()
 04996                        .HasMaxLength(60)
 04997                        .HasColumnType("varchar(60)");
 04998
 04999                    b.Property<string>("Brand")
 05000                        .IsRequired()
 05001                        .HasMaxLength(120)
 05002                        .HasColumnType("varchar(120)");
 05003
 05004                    b.Property<string>("Comment")
 05005                        .HasMaxLength(1000)
 05006                        .HasColumnType("varchar(1000)");
 05007
 05008                    b.Property<DateTime>("CreatedAtUtc")
 05009                        .HasColumnType("datetime(6)");
 05010
 05011                    b.Property<string>("CreatedBy")
 05012                        .HasMaxLength(450)
 05013                        .HasColumnType("varchar(450)");
 05014
 05015                    b.Property<int?>("DeliveryDaysMax")
 05016                        .HasColumnType("int");
 05017
 05018                    b.Property<int?>("DeliveryDaysMin")
 05019                        .HasColumnType("int");
 05020
 05021                    b.Property<string>("ExternalOrderNumber")
 05022                        .HasMaxLength(80)
 05023                        .HasColumnType("varchar(80)");
 05024
 05025                    b.Property<string>("LastError")
 05026                        .HasMaxLength(1000)
 05027                        .HasColumnType("varchar(1000)");
 05028
 05029                    b.Property<int>("Multiplicity")
 05030                        .HasColumnType("int");
 05031
 05032                    b.Property<string>("ProductKey")
 05033                        .HasMaxLength(128)
 05034                        .HasColumnType("varchar(128)");
 05035
 05036                    b.Property<string>("ProductName")
 05037                        .HasMaxLength(250)
 05038                        .HasColumnType("varchar(250)");
 05039
 05040                    b.Property<int>("Quantity")
 05041                        .HasColumnType("int");
 05042
 05043                    b.Property<decimal?>("SourcePrice")
 05044                        .HasPrecision(18, 4)
 05045                        .HasColumnType("decimal(18,4)");
 05046
 05047                    b.Property<string>("Status")
 05048                        .IsRequired()
 05049                        .HasMaxLength(30)
 05050                        .HasColumnType("varchar(30)");
 05051
 05052                    b.Property<int?>("Stock")
 05053                        .HasColumnType("int");
 05054
 05055                    b.Property<int>("StudioOrderId")
 05056                        .HasColumnType("int");
 05057
 05058                    b.Property<string>("ToCart")
 05059                        .IsRequired()
 05060                        .HasColumnType("longtext");
 05061
 05062                    b.Property<string>("ToOrder")
 05063                        .HasMaxLength(128)
 05064                        .HasColumnType("varchar(128)");
 05065
 05066                    b.Property<DateTime>("UpdatedAtUtc")
 05067                        .HasColumnType("datetime(6)");
 05068
 05069                    b.Property<string>("WarehouseName")
 05070                        .HasMaxLength(250)
 05071                        .HasColumnType("varchar(250)");
 05072
 05073                    b.HasKey("Id");
 05074
 05075                    b.HasIndex("ActiveStudioOrderId")
 05076                        .IsUnique();
 05077
 05078                    b.HasIndex("CreatedAtUtc");
 05079
 05080                    b.HasIndex("ExternalOrderNumber");
 05081
 05082                    b.HasIndex("StudioOrderId", "Status");
 05083
 05084                    b.ToTable("NikeiCartItems");
 05085                });
 5086
 05087            modelBuilder.Entity("OzonDomains.Models.OneCNomenclatureMap", b =>
 05088                {
 05089                    b.Property<long>("Id")
 05090                        .ValueGeneratedOnAdd()
 05091                        .HasColumnType("bigint");
 05092
 05093                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05094
 05095                    b.Property<string>("ArticleNorm")
 05096                        .IsRequired()
 05097                        .HasMaxLength(128)
 05098                        .HasColumnType("varchar(128)");
 05099
 05100                    b.Property<DateTime>("CreatedAt")
 05101                        .HasColumnType("datetime(6)");
 05102
 05103                    b.Property<string>("OneCArticleRaw")
 05104                        .HasMaxLength(191)
 05105                        .HasColumnType("varchar(191)");
 05106
 05107                    b.Property<string>("OneCProducerName")
 05108                        .HasMaxLength(191)
 05109                        .HasColumnType("varchar(191)");
 05110
 05111                    b.Property<Guid>("OneCRefKey")
 05112                        .HasColumnType("char(36)");
 05113
 05114                    b.Property<string>("ProducerNorm")
 05115                        .IsRequired()
 05116                        .HasMaxLength(128)
 05117                        .HasColumnType("varchar(128)");
 05118
 05119                    b.Property<string>("Source")
 05120                        .IsRequired()
 05121                        .HasMaxLength(32)
 05122                        .HasColumnType("varchar(32)");
 05123
 05124                    b.Property<DateTime>("UpdatedAt")
 05125                        .HasColumnType("datetime(6)");
 05126
 05127                    b.HasKey("Id");
 05128
 05129                    b.HasIndex("ArticleNorm");
 05130
 05131                    b.HasIndex("OneCRefKey");
 05132
 05133                    b.HasIndex("ArticleNorm", "ProducerNorm")
 05134                        .IsUnique();
 05135
 05136                    b.ToTable("OneCNomenclatureMaps");
 05137                });
 5138
 05139            modelBuilder.Entity("OzonDomains.Models.OneCProducerAlias", b =>
 05140                {
 05141                    b.Property<long>("Id")
 05142                        .ValueGeneratedOnAdd()
 05143                        .HasColumnType("bigint");
 05144
 05145                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05146
 05147                    b.Property<string>("AliasNorm")
 05148                        .IsRequired()
 05149                        .HasMaxLength(128)
 05150                        .HasColumnType("varchar(128)");
 05151
 05152                    b.Property<string>("CanonicalName")
 05153                        .HasMaxLength(191)
 05154                        .HasColumnType("varchar(191)");
 05155
 05156                    b.Property<Guid>("CanonicalRefKey")
 05157                        .HasColumnType("char(36)");
 05158
 05159                    b.Property<DateTime>("CreatedAt")
 05160                        .HasColumnType("datetime(6)");
 05161
 05162                    b.Property<string>("Source")
 05163                        .IsRequired()
 05164                        .HasMaxLength(32)
 05165                        .HasColumnType("varchar(32)");
 05166
 05167                    b.HasKey("Id");
 05168
 05169                    b.HasIndex("AliasNorm")
 05170                        .IsUnique();
 05171
 05172                    b.ToTable("OneCProducerAliases");
 05173                });
 5174
 05175            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 05176                {
 05177                    b.Property<int>("Id")
 05178                        .ValueGeneratedOnAdd()
 05179                        .HasColumnType("int");
 05180
 05181                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05182
 05183                    b.Property<int?>("AppStatusId")
 05184                        .HasColumnType("int");
 05185
 05186                    b.Property<string>("Article")
 05187                        .HasMaxLength(255)
 05188                        .HasColumnType("varchar(255)");
 05189
 05190                    b.Property<int?>("CartItemId")
 05191                        .HasColumnType("int");
 05192
 05193                    b.Property<int?>("ClientStatusId")
 05194                        .HasColumnType("int");
 05195
 05196                    b.Property<string>("Comment")
 05197                        .HasMaxLength(500)
 05198                        .HasColumnType("varchar(500)");
 05199
 05200                    b.Property<decimal?>("CostPrice")
 05201                        .HasColumnType("decimal(65,2)");
 05202
 05203                    b.Property<string>("DeliveryCity")
 05204                        .HasMaxLength(100)
 05205                        .HasColumnType("varchar(100)");
 05206
 05207                    b.Property<int?>("DeliveryId")
 05208                        .HasColumnType("int");
 05209
 05210                    b.Property<int?>("EtProducerId")
 05211                        .HasColumnType("int");
 05212
 05213                    b.Property<int?>("ExcelFileDataId")
 05214                        .HasColumnType("int");
 05215
 05216                    b.Property<bool?>("FromFile")
 05217                        .HasColumnType("tinyint(1)");
 05218
 05219                    b.Property<int?>("FromFiletId")
 05220                        .HasColumnType("int");
 05221
 05222                    b.Property<bool>("IsAccepted")
 05223                        .HasColumnType("tinyint(1)");
 05224
 05225                    b.Property<bool?>("IsReturnable")
 05226                        .HasColumnType("tinyint(1)");
 05227
 05228                    b.Property<bool>("IsReturned")
 05229                        .HasColumnType("tinyint(1)");
 05230
 05231                    b.Property<bool>("IsVerified")
 05232                        .HasColumnType("tinyint(1)");
 05233
 05234                    b.Property<string>("Key")
 05235                        .HasMaxLength(50)
 05236                        .HasColumnType("varchar(50)");
 05237
 05238                    b.Property<DateTime?>("LastStatusChangeDate")
 05239                        .HasColumnType("datetime(6)");
 05240
 05241                    b.Property<int?>("ManufacturerId")
 05242                        .HasColumnType("int");
 05243
 05244                    b.Property<string>("MaxCommissionInfo")
 05245                        .HasColumnType("longtext");
 05246
 05247                    b.Property<decimal?>("MaxDiscount")
 05248                        .HasColumnType("decimal(65,2)");
 05249
 05250                    b.Property<decimal?>("MaxOzonCommission")
 05251                        .HasColumnType("decimal(65,2)");
 05252
 05253                    b.Property<decimal?>("MaxProfit")
 05254                        .HasColumnType("decimal(65,2)");
 05255
 05256                    b.Property<string>("MinCommissionInfo")
 05257                        .HasColumnType("longtext");
 05258
 05259                    b.Property<decimal?>("MinDiscount")
 05260                        .HasColumnType("decimal(65,2)");
 05261
 05262                    b.Property<decimal?>("MinOzonCommission")
 05263                        .HasColumnType("decimal(65,2)");
 05264
 05265                    b.Property<decimal?>("MinProfit")
 05266                        .HasColumnType("decimal(65,2)");
 05267
 05268                    b.Property<string>("NewCategory")
 05269                        .HasMaxLength(255)
 05270                        .HasColumnType("varchar(255)");
 05271
 05272                    b.Property<string>("OrderNumberToSupplier")
 05273                        .HasMaxLength(50)
 05274                        .HasColumnType("varchar(50)");
 05275
 05276                    b.Property<decimal?>("OriginalPurchasePrice")
 05277                        .HasColumnType("decimal(65,2)");
 05278
 05279                    b.Property<int?>("OzonClientId")
 05280                        .HasColumnType("int");
 05281
 05282                    b.Property<decimal?>("Price")
 05283                        .HasColumnType("decimal(65,2)");
 05284
 05285                    b.Property<DateTime?>("ProcessingDate")
 05286                        .HasColumnType("datetime(6)");
 05287
 05288                    b.Property<int?>("ProductInfoId")
 05289                        .HasColumnType("int");
 05290
 05291                    b.Property<string>("ProductKey")
 05292                        .HasMaxLength(255)
 05293                        .HasColumnType("varchar(255)");
 05294
 05295                    b.Property<string>("ProductName")
 05296                        .HasMaxLength(255)
 05297                        .HasColumnType("varchar(255)");
 05298
 05299                    b.Property<decimal?>("PurchasePrice")
 05300                        .HasColumnType("decimal(65,2)");
 05301
 05302                    b.Property<int?>("Quantity")
 05303                        .HasColumnType("int");
 05304
 05305                    b.Property<string>("Scanit")
 05306                        .HasMaxLength(64)
 05307                        .HasColumnType("varchar(64)");
 05308
 05309                    b.Property<decimal?>("ShipmentAmount")
 05310                        .HasColumnType("decimal(65,2)");
 05311
 05312                    b.Property<int?>("ShipmentId")
 05313                        .HasColumnType("int");
 05314
 05315                    b.Property<string>("ShipmentNumber")
 05316                        .HasMaxLength(50)
 05317                        .HasColumnType("varchar(50)");
 05318
 05319                    b.Property<int?>("ShipmentWarehouseId")
 05320                        .HasColumnType("int");
 05321
 05322                    b.Property<DateTime?>("ShippingDate")
 05323                        .HasColumnType("datetime(6)");
 05324
 05325                    b.Property<int?>("SupplierId")
 05326                        .HasColumnType("int");
 05327
 05328                    b.Property<string>("TrackingNumber")
 05329                        .HasMaxLength(100)
 05330                        .HasColumnType("varchar(100)");
 05331
 05332                    b.Property<int?>("TransactionId")
 05333                        .HasColumnType("int");
 05334
 05335                    b.Property<DateTime?>("UpdatedAt")
 05336                        .HasColumnType("datetime(6)");
 05337
 05338                    b.Property<string>("UpdatedBy")
 05339                        .HasColumnType("longtext");
 05340
 05341                    b.Property<string>("UpdatedColumns")
 05342                        .HasColumnType("longtext");
 05343
 05344                    b.Property<int?>("СurrencyId")
 05345                        .HasColumnType("int");
 05346
 05347                    b.HasKey("Id");
 05348
 05349                    b.HasIndex("Article")
 05350                        .HasDatabaseName("IX_Orders_Article");
 05351
 05352                    b.HasIndex("CartItemId")
 05353                        .HasDatabaseName("IX_Orders_CartId");
 05354
 05355                    b.HasIndex("ClientStatusId");
 05356
 05357                    b.HasIndex("DeliveryId");
 05358
 05359                    b.HasIndex("EtProducerId");
 05360
 05361                    b.HasIndex("ExcelFileDataId");
 05362
 05363                    b.HasIndex("Key");
 05364
 05365                    b.HasIndex("LastStatusChangeDate")
 05366                        .HasDatabaseName("IX_Orders_LastStatusChangeDate");
 05367
 05368                    b.HasIndex("ManufacturerId");
 05369
 05370                    b.HasIndex("OzonClientId");
 05371
 05372                    b.HasIndex("ProcessingDate")
 05373                        .HasDatabaseName("IX_Orders_ProcessingDate");
 05374
 05375                    b.HasIndex("ProductInfoId");
 05376
 05377                    b.HasIndex("ProductKey")
 05378                        .HasDatabaseName("IX_Orders_ProductKey");
 05379
 05380                    b.HasIndex("Scanit")
 05381                        .HasDatabaseName("IX_Orders_Scanit");
 05382
 05383                    b.HasIndex("ShipmentNumber")
 05384                        .HasDatabaseName("IX_Orders_ShipmentNumber");
 05385
 05386                    b.HasIndex("ShipmentWarehouseId");
 05387
 05388                    b.HasIndex("SupplierId");
 05389
 05390                    b.HasIndex("TransactionId");
 05391
 05392                    b.HasIndex("UpdatedAt")
 05393                        .HasDatabaseName("IX_Orders_UpdatedAt");
 05394
 05395                    b.HasIndex("СurrencyId");
 05396
 05397                    b.HasIndex("AppStatusId", "LastStatusChangeDate")
 05398                        .HasDatabaseName("IX_Orders_AppStatusId_LastStatusChangeDate");
 05399
 05400                    b.ToTable("Orders", (string)null);
 05401
 05402                    b.HasAnnotation("SqlServer:IsTemporal", true);
 05403                });
 5404
 05405            modelBuilder.Entity("OzonDomains.Models.OrderArchive", b =>
 05406                {
 05407                    b.Property<int>("Id")
 05408                        .ValueGeneratedOnAdd()
 05409                        .HasColumnType("int");
 05410
 05411                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05412
 05413                    b.Property<string>("ArchiveReason")
 05414                        .HasMaxLength(500)
 05415                        .HasColumnType("varchar(500)");
 05416
 05417                    b.Property<DateTime>("ArchivedAt")
 05418                        .HasColumnType("datetime");
 05419
 05420                    b.Property<string>("ArchivedBy")
 05421                        .IsRequired()
 05422                        .HasMaxLength(100)
 05423                        .HasColumnType("varchar(100)");
 05424
 05425                    b.Property<int>("OrderId")
 05426                        .HasColumnType("int");
 05427
 05428                    b.Property<int?>("PreviousOzonClientId")
 05429                        .HasColumnType("int");
 05430
 05431                    b.Property<string>("PreviousStatus")
 05432                        .HasMaxLength(200)
 05433                        .HasColumnType("varchar(200)");
 05434
 05435                    b.HasKey("Id");
 05436
 05437                    b.HasIndex("ArchivedAt");
 05438
 05439                    b.HasIndex("ArchivedBy")
 05440                        .HasDatabaseName("IX_OrderArchives_ArchivedBy");
 05441
 05442                    b.HasIndex("OrderId")
 05443                        .IsUnique()
 05444                        .HasDatabaseName("UK_OrderArchives_OrderId");
 05445
 05446                    b.ToTable("OrderArchives");
 05447                });
 5448
 05449            modelBuilder.Entity("OzonDomains.Models.OrderCalculationSnapshot", b =>
 05450                {
 05451                    b.Property<long>("Id")
 05452                        .ValueGeneratedOnAdd()
 05453                        .HasColumnType("bigint");
 05454
 05455                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05456
 05457                    b.Property<DateTime>("CapturedAt")
 05458                        .HasColumnType("datetime(6)");
 05459
 05460                    b.Property<Guid>("OperationId")
 05461                        .HasColumnType("char(36)");
 05462
 05463                    b.Property<int>("OrderId")
 05464                        .HasColumnType("int");
 05465
 05466                    b.Property<string>("PayloadJson")
 05467                        .IsRequired()
 05468                        .HasColumnType("longtext");
 05469
 05470                    b.Property<string>("Source")
 05471                        .IsRequired()
 05472                        .HasMaxLength(32)
 05473                        .HasColumnType("varchar(32)");
 05474
 05475                    b.HasKey("Id");
 05476
 05477                    b.HasIndex("OperationId");
 05478
 05479                    b.HasIndex("OrderId", "OperationId")
 05480                        .IsUnique()
 05481                        .HasDatabaseName("UX_OrderCalculationSnapshots_OrderId_OperationId");
 05482
 05483                    b.ToTable("OrderCalculationSnapshots");
 05484                });
 5485
 05486            modelBuilder.Entity("OzonDomains.Models.OrderCarts.CartStatus", b =>
 05487                {
 05488                    b.Property<int>("Id")
 05489                        .ValueGeneratedOnAdd()
 05490                        .HasColumnType("int");
 05491
 05492                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05493
 05494                    b.Property<string>("Name")
 05495                        .IsRequired()
 05496                        .HasMaxLength(100)
 05497                        .HasColumnType("varchar(100)");
 05498
 05499                    b.HasKey("Id");
 05500
 05501                    b.ToTable("CartStatuses");
 05502                });
 5503
 05504            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 05505                {
 05506                    b.Property<int>("Id")
 05507                        .ValueGeneratedOnAdd()
 05508                        .HasColumnType("int");
 05509
 05510                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05511
 05512                    b.Property<string>("Name")
 05513                        .IsRequired()
 05514                        .HasMaxLength(100)
 05515                        .HasColumnType("text");
 05516
 05517                    b.Property<int?>("StatusColorId")
 05518                        .HasColumnType("int");
 05519
 05520                    b.HasKey("Id");
 05521
 05522                    b.HasIndex("StatusColorId")
 05523                        .HasDatabaseName("FK_ItemStatuses_StatusColors");
 05524
 05525                    b.ToTable("ItemStatuses");
 05526                });
 5527
 05528            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 05529                {
 05530                    b.Property<int>("Id")
 05531                        .ValueGeneratedOnAdd()
 05532                        .HasColumnType("int");
 05533
 05534                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05535
 05536                    b.Property<int?>("CartStatusId")
 05537                        .HasColumnType("int");
 05538
 05539                    b.Property<string>("ClientOrderNumber")
 05540                        .HasMaxLength(100)
 05541                        .HasColumnType("varchar(100)");
 05542
 05543                    b.Property<string>("Comment")
 05544                        .HasMaxLength(250)
 05545                        .HasColumnType("varchar(250)");
 05546
 05547                    b.Property<DateTime>("CreatedAt")
 05548                        .HasColumnType("datetime");
 05549
 05550                    b.Property<string>("Provider")
 05551                        .IsRequired()
 05552                        .HasMaxLength(100)
 05553                        .HasColumnType("varchar(100)");
 05554
 05555                    b.HasKey("Id");
 05556
 05557                    b.HasIndex("CartStatusId")
 05558                        .HasDatabaseName("ix_ordercarts_cartstatusid");
 05559
 05560                    b.ToTable("OrderCarts");
 05561                });
 5562
 05563            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderItem", b =>
 05564                {
 05565                    b.Property<int>("Id")
 05566                        .ValueGeneratedOnAdd()
 05567                        .HasColumnType("int");
 05568
 05569                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05570
 05571                    b.Property<string>("Comment")
 05572                        .HasMaxLength(250)
 05573                        .HasColumnType("varchar(250)");
 05574
 05575                    b.Property<string>("ItemId")
 05576                        .IsRequired()
 05577                        .HasMaxLength(100)
 05578                        .HasColumnType("varchar(100)");
 05579
 05580                    b.Property<int?>("ItemStatusId")
 05581                        .HasColumnType("int");
 05582
 05583                    b.Property<int>("OrderCartId")
 05584                        .HasColumnType("int");
 05585
 05586                    b.Property<string>("OrderItemCode")
 05587                        .HasMaxLength(100)
 05588                        .HasColumnType("varchar(100)");
 05589
 05590                    b.Property<int>("Quantity")
 05591                        .HasColumnType("int");
 05592
 05593                    b.Property<int?>("StudioOrderId")
 05594                        .HasColumnType("int");
 05595
 05596                    b.HasKey("Id");
 05597
 05598                    b.HasIndex("ItemStatusId")
 05599                        .HasDatabaseName("ix_orderitems_itemstatusid");
 05600
 05601                    b.HasIndex("OrderCartId")
 05602                        .HasDatabaseName("ix_orderitems_ordercartid");
 05603
 05604                    b.HasIndex("StudioOrderId");
 05605
 05606                    b.ToTable("OrderItems");
 05607                });
 5608
 05609            modelBuilder.Entity("OzonDomains.Models.OrderControlExecution", b =>
 05610                {
 05611                    b.Property<long>("Id")
 05612                        .ValueGeneratedOnAdd()
 05613                        .HasColumnType("bigint");
 05614
 05615                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05616
 05617                    b.Property<DateTime?>("CompletedAtUtc")
 05618                        .HasColumnType("datetime(6)");
 05619
 05620                    b.Property<int>("CreatedTasksCount")
 05621                        .HasColumnType("int");
 05622
 05623                    b.Property<string>("ErrorMessage")
 05624                        .HasMaxLength(1000)
 05625                        .HasColumnType("varchar(1000)");
 05626
 05627                    b.Property<DateTime>("StartedAtUtc")
 05628                        .HasColumnType("datetime(6)");
 05629
 05630                    b.Property<string>("Status")
 05631                        .IsRequired()
 05632                        .HasMaxLength(30)
 05633                        .HasColumnType("varchar(30)");
 05634
 05635                    b.HasKey("Id");
 05636
 05637                    b.HasIndex("StartedAtUtc");
 05638
 05639                    b.ToTable("OrderControlExecutions");
 05640                });
 5641
 05642            modelBuilder.Entity("OzonDomains.Models.OrderControlRule", b =>
 05643                {
 05644                    b.Property<int>("Id")
 05645                        .ValueGeneratedOnAdd()
 05646                        .HasColumnType("int");
 05647
 05648                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05649
 05650                    b.Property<string>("Code")
 05651                        .IsRequired()
 05652                        .HasMaxLength(80)
 05653                        .HasColumnType("varchar(80)");
 05654
 05655                    b.Property<DateTime>("CreatedAtUtc")
 05656                        .HasColumnType("datetime(6)");
 05657
 05658                    b.Property<bool>("IsActive")
 05659                        .HasColumnType("tinyint(1)");
 05660
 05661                    b.Property<string>("Name")
 05662                        .IsRequired()
 05663                        .HasMaxLength(200)
 05664                        .HasColumnType("varchar(200)");
 05665
 05666                    b.Property<string>("ParametersJson")
 05667                        .HasMaxLength(1000)
 05668                        .HasColumnType("varchar(1000)");
 05669
 05670                    b.Property<int>("Priority")
 05671                        .HasColumnType("int");
 05672
 05673                    b.Property<string>("RuleType")
 05674                        .IsRequired()
 05675                        .HasMaxLength(40)
 05676                        .HasColumnType("varchar(40)");
 05677
 05678                    b.Property<int>("TargetAppRoleId")
 05679                        .HasColumnType("int");
 05680
 05681                    b.Property<DateTime>("UpdatedAtUtc")
 05682                        .HasColumnType("datetime(6)");
 05683
 05684                    b.HasKey("Id");
 05685
 05686                    b.HasIndex("Code")
 05687                        .IsUnique()
 05688                        .HasDatabaseName("UX_OrderControlRules_Code");
 05689
 05690                    b.HasIndex("TargetAppRoleId")
 05691                        .HasDatabaseName("FK_OrderControlRules_AppRoles_TargetAppRoleId");
 05692
 05693                    b.HasIndex("IsActive", "RuleType")
 05694                        .HasDatabaseName("IX_OrderControlRules_Active_Type");
 05695
 05696                    b.ToTable("OrderControlRules");
 05697                });
 5698
 05699            modelBuilder.Entity("OzonDomains.Models.OrderControlSettings", b =>
 05700                {
 05701                    b.Property<int>("Id")
 05702                        .ValueGeneratedOnAdd()
 05703                        .HasColumnType("int");
 05704
 05705                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05706
 05707                    b.Property<int>("IntervalMinutes")
 05708                        .HasColumnType("int");
 05709
 05710                    b.Property<DateTime>("UpdatedAtUtc")
 05711                        .HasColumnType("datetime(6)");
 05712
 05713                    b.HasKey("Id");
 05714
 05715                    b.ToTable("OrderControlSettings");
 05716                });
 5717
 05718            modelBuilder.Entity("OzonDomains.Models.OrderControlTask", b =>
 05719                {
 05720                    b.Property<long>("Id")
 05721                        .ValueGeneratedOnAdd()
 05722                        .HasColumnType("bigint");
 05723
 05724                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05725
 05726                    b.Property<DateTime?>("ClaimedAtUtc")
 05727                        .HasColumnType("datetime(6)");
 05728
 05729                    b.Property<string>("ClaimedByUserId")
 05730                        .HasMaxLength(450)
 05731                        .HasColumnType("varchar(450)");
 05732
 05733                    b.Property<string>("CloseReason")
 05734                        .HasMaxLength(500)
 05735                        .HasColumnType("varchar(500)");
 05736
 05737                    b.Property<DateTime?>("ClosedAtUtc")
 05738                        .HasColumnType("datetime(6)");
 05739
 05740                    b.Property<string>("ClosedByUserId")
 05741                        .HasMaxLength(450)
 05742                        .HasColumnType("varchar(450)");
 05743
 05744                    b.Property<DateTime>("CreatedAtUtc")
 05745                        .HasColumnType("datetime(6)");
 05746
 05747                    b.Property<string>("DeduplicationKey")
 05748                        .IsRequired()
 05749                        .HasMaxLength(160)
 05750                        .HasColumnType("varchar(160)");
 05751
 05752                    b.Property<DateTime>("DueAtUtc")
 05753                        .HasColumnType("datetime(6)");
 05754
 05755                    b.Property<DateTime?>("EscalatedAtUtc")
 05756                        .HasColumnType("datetime(6)");
 05757
 05758                    b.Property<int>("OrderId")
 05759                        .HasColumnType("int");
 05760
 05761                    b.Property<int>("Priority")
 05762                        .HasColumnType("int");
 05763
 05764                    b.Property<int>("RuleId")
 05765                        .HasColumnType("int");
 05766
 05767                    b.Property<string>("SnapshotJson")
 05768                        .HasColumnType("longtext");
 05769
 05770                    b.Property<string>("Status")
 05771                        .IsRequired()
 05772                        .HasMaxLength(30)
 05773                        .HasColumnType("varchar(30)");
 05774
 05775                    b.Property<int>("TargetAppRoleId")
 05776                        .HasColumnType("int");
 05777
 05778                    b.Property<DateTime>("UpdatedAtUtc")
 05779                        .HasColumnType("datetime(6)");
 05780
 05781                    b.Property<DateTime>("WarningAtUtc")
 05782                        .HasColumnType("datetime(6)");
 05783
 05784                    b.HasKey("Id");
 05785
 05786                    b.HasIndex("DeduplicationKey")
 05787                        .IsUnique()
 05788                        .HasDatabaseName("UX_OrderControlTasks_DeduplicationKey");
 05789
 05790                    b.HasIndex("OrderId")
 05791                        .HasDatabaseName("FK_OrderControlTasks_Orders_OrderId");
 05792
 05793                    b.HasIndex("RuleId")
 05794                        .HasDatabaseName("FK_OrderControlTasks_OrderControlRules_RuleId");
 05795
 05796                    b.HasIndex("Status", "DueAtUtc");
 05797
 05798                    b.HasIndex("TargetAppRoleId", "Status");
 05799
 05800                    b.ToTable("OrderControlTasks");
 05801                });
 5802
 05803            modelBuilder.Entity("OzonDomains.Models.OrderControlTaskEvent", b =>
 05804                {
 05805                    b.Property<long>("Id")
 05806                        .ValueGeneratedOnAdd()
 05807                        .HasColumnType("bigint");
 05808
 05809                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05810
 05811                    b.Property<DateTime>("CreatedAtUtc")
 05812                        .HasColumnType("datetime(6)");
 05813
 05814                    b.Property<string>("Details")
 05815                        .HasMaxLength(1000)
 05816                        .HasColumnType("varchar(1000)");
 05817
 05818                    b.Property<string>("EventType")
 05819                        .IsRequired()
 05820                        .HasMaxLength(40)
 05821                        .HasColumnType("varchar(40)");
 05822
 05823                    b.Property<long>("TaskId")
 05824                        .HasColumnType("bigint");
 05825
 05826                    b.Property<string>("UserId")
 05827                        .HasMaxLength(450)
 05828                        .HasColumnType("varchar(450)");
 05829
 05830                    b.HasKey("Id");
 05831
 05832                    b.HasIndex("TaskId", "CreatedAtUtc");
 05833
 05834                    b.ToTable("OrderControlTaskEvents");
 05835                });
 5836
 05837            modelBuilder.Entity("OzonDomains.Models.OrderExtension", b =>
 05838                {
 05839                    b.Property<int>("Id")
 05840                        .ValueGeneratedOnAdd()
 05841                        .HasColumnType("int");
 05842
 05843                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05844
 05845                    b.Property<DateTime>("CreatedAt")
 05846                        .HasColumnType("datetime");
 05847
 05848                    b.Property<string>("Key")
 05849                        .IsRequired()
 05850                        .HasMaxLength(100)
 05851                        .HasColumnType("varchar(100)");
 05852
 05853                    b.Property<int>("OrderId")
 05854                        .HasColumnType("int");
 05855
 05856                    b.Property<string>("Value")
 05857                        .HasMaxLength(2000)
 05858                        .HasColumnType("varchar(2000)");
 05859
 05860                    b.HasKey("Id");
 05861
 05862                    b.HasIndex("OrderId")
 05863                        .HasDatabaseName("IX_OrderExtensions_OrderId");
 05864
 05865                    b.HasIndex("OrderId", "Key")
 05866                        .IsUnique()
 05867                        .HasDatabaseName("UX_OrderExtensions_OrderId_Key");
 05868
 05869                    b.ToTable("order_extensions");
 05870                });
 5871
 05872            modelBuilder.Entity("OzonDomains.Models.OrderExtraExpense", b =>
 05873                {
 05874                    b.Property<int>("Id")
 05875                        .ValueGeneratedOnAdd()
 05876                        .HasColumnType("int");
 05877
 05878                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05879
 05880                    b.Property<decimal>("Amount")
 05881                        .HasColumnType("decimal(18,2)");
 05882
 05883                    b.Property<string>("Comment")
 05884                        .HasMaxLength(255)
 05885                        .HasColumnType("varchar(255)");
 05886
 05887                    b.Property<DateTime>("CreatedAt")
 05888                        .HasColumnType("datetime");
 05889
 05890                    b.Property<int>("ExpenseTypeId")
 05891                        .HasColumnType("int");
 05892
 05893                    b.Property<int>("OrderId")
 05894                        .HasColumnType("int");
 05895
 05896                    b.HasKey("Id");
 05897
 05898                    b.HasIndex("ExpenseTypeId");
 05899
 05900                    b.HasIndex("OrderId");
 05901
 05902                    b.ToTable("OrderExtraExpenses");
 05903                });
 5904
 05905            modelBuilder.Entity("OzonDomains.Models.OrderHistory", b =>
 05906                {
 05907                    b.Property<int>("Id")
 05908                        .ValueGeneratedOnAdd()
 05909                        .HasColumnType("int")
 05910                        .HasColumnName("Id");
 05911
 05912                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05913
 05914                    b.Property<DateTime>("ChangedAt")
 05915                        .HasColumnType("datetime(6)")
 05916                        .HasColumnName("ChangedAt");
 05917
 05918                    b.Property<string>("ChangedBy")
 05919                        .HasMaxLength(255)
 05920                        .HasColumnType("varchar(255)")
 05921                        .HasColumnName("ChangedBy");
 05922
 05923                    b.Property<string>("ColumnDisplayName")
 05924                        .IsRequired()
 05925                        .HasMaxLength(200)
 05926                        .HasColumnType("varchar(200)")
 05927                        .HasColumnName("ColumnDisplayName");
 05928
 05929                    b.Property<string>("ColumnName")
 05930                        .IsRequired()
 05931                        .HasMaxLength(100)
 05932                        .HasColumnType("varchar(100)")
 05933                        .HasColumnName("ColumnName");
 05934
 05935                    b.Property<string>("NewValue")
 05936                        .HasColumnType("text")
 05937                        .HasColumnName("NewValue");
 05938
 05939                    b.Property<string>("OldValue")
 05940                        .HasColumnType("text")
 05941                        .HasColumnName("OldValue");
 05942
 05943                    b.Property<Guid?>("OperationId")
 05944                        .HasMaxLength(36)
 05945                        .HasColumnType("char(36)")
 05946                        .HasColumnName("OperationId");
 05947
 05948                    b.Property<int>("OrderId")
 05949                        .HasColumnType("int")
 05950                        .HasColumnName("OrderId");
 05951
 05952                    b.HasKey("Id");
 05953
 05954                    b.HasIndex("ChangedAt")
 05955                        .HasDatabaseName("IX_OrdersHistory_ChangedAt");
 05956
 05957                    b.HasIndex("OperationId")
 05958                        .HasDatabaseName("IX_orders_history_OperationId");
 05959
 05960                    b.HasIndex("OrderId")
 05961                        .HasDatabaseName("IX_OrdersHistory_OrderId");
 05962
 05963                    b.ToTable("orders_history");
 05964                });
 5965
 05966            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPosting", b =>
 05967                {
 05968                    b.Property<long>("Id")
 05969                        .ValueGeneratedOnAdd()
 05970                        .HasColumnType("bigint");
 05971
 05972                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05973
 05974                    b.Property<string>("ArticlesSummary")
 05975                        .HasMaxLength(500)
 05976                        .HasColumnType("varchar(500)");
 05977
 05978                    b.Property<string>("ChangedBy")
 05979                        .HasMaxLength(255)
 05980                        .HasColumnType("varchar(255)");
 05981
 05982                    b.Property<DateTime>("CreatedAt")
 05983                        .HasColumnType("datetime");
 05984
 05985                    b.Property<string>("DetailsJson")
 05986                        .HasColumnType("longtext");
 05987
 05988                    b.Property<string>("DocumentGuids")
 05989                        .HasMaxLength(2000)
 05990                        .HasColumnType("varchar(2000)");
 05991
 05992                    b.Property<string>("DocumentNumbers")
 05993                        .HasMaxLength(1000)
 05994                        .HasColumnType("varchar(1000)");
 05995
 05996                    b.Property<int>("DocumentsCount")
 05997                        .HasColumnType("int");
 05998
 05999                    b.Property<string>("ErrorSummary")
 06000                        .HasMaxLength(2000)
 06001                        .HasColumnType("varchar(2000)");
 06002
 06003                    b.Property<string>("HistoryBatchKey")
 06004                        .HasMaxLength(128)
 06005                        .HasColumnType("varchar(128)");
 06006
 06007                    b.Property<bool>("IsPosted")
 06008                        .HasColumnType("tinyint(1)");
 06009
 06010                    b.Property<string>("OperationKind")
 06011                        .IsRequired()
 06012                        .HasMaxLength(32)
 06013                        .HasColumnType("varchar(32)");
 06014
 06015                    b.Property<int>("OrderId")
 06016                        .HasColumnType("int");
 06017
 06018                    b.Property<int>("OrdersCount")
 06019                        .HasColumnType("int");
 06020
 06021                    b.Property<string>("OrganizationInn")
 06022                        .HasMaxLength(64)
 06023                        .HasColumnType("varchar(64)");
 06024
 06025                    b.Property<string>("OrganizationName")
 06026                        .HasMaxLength(255)
 06027                        .HasColumnType("varchar(255)");
 06028
 06029                    b.Property<DateTime>("PostedAt")
 06030                        .HasColumnType("datetime");
 06031
 06032                    b.Property<int>("ProductsCount")
 06033                        .HasColumnType("int");
 06034
 06035                    b.Property<string>("SenderInn")
 06036                        .HasMaxLength(64)
 06037                        .HasColumnType("varchar(64)");
 06038
 06039                    b.Property<string>("SenderName")
 06040                        .HasMaxLength(255)
 06041                        .HasColumnType("varchar(255)");
 06042
 06043                    b.Property<bool>("Success")
 06044                        .HasColumnType("tinyint(1)");
 06045
 06046                    b.Property<int?>("TransactionId")
 06047                        .HasColumnType("int");
 06048
 06049                    b.Property<string>("WarehouseRecipient")
 06050                        .HasMaxLength(255)
 06051                        .HasColumnType("varchar(255)");
 06052
 06053                    b.Property<string>("WarehouseSender")
 06054                        .HasMaxLength(255)
 06055                        .HasColumnType("varchar(255)");
 06056
 06057                    b.HasKey("Id");
 06058
 06059                    b.HasIndex("HistoryBatchKey")
 06060                        .HasDatabaseName("IX_OrderHistoryOneCPostings_HistoryBatchKey");
 06061
 06062                    b.HasIndex("OrderId")
 06063                        .HasDatabaseName("IX_OrderHistoryOneCPostings_OrderId");
 06064
 06065                    b.HasIndex("TransactionId")
 06066                        .HasDatabaseName("IX_OrderHistoryOneCPostings_TransactionId");
 06067
 06068                    b.HasIndex("OrderId", "PostedAt")
 06069                        .HasDatabaseName("IX_OrderHistoryOneCPostings_OrderId_PostedAt");
 06070
 06071                    b.ToTable("OrderHistoryOneCPostings");
 06072                });
 6073
 06074            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPostingLink", b =>
 06075                {
 06076                    b.Property<long>("Id")
 06077                        .ValueGeneratedOnAdd()
 06078                        .HasColumnType("bigint");
 06079
 06080                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06081
 06082                    b.Property<int>("OrderHistoryId")
 06083                        .HasColumnType("int");
 06084
 06085                    b.Property<long>("PostingId")
 06086                        .HasColumnType("bigint");
 06087
 06088                    b.HasKey("Id");
 06089
 06090                    b.HasIndex("OrderHistoryId");
 06091
 06092                    b.HasIndex("PostingId", "OrderHistoryId")
 06093                        .IsUnique()
 06094                        .HasDatabaseName("UX_OrderHistoryOneCPostingLinks");
 06095
 06096                    b.ToTable("OrderHistoryOneCPostingLinks");
 06097                });
 6098
 06099            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionCondition", b =>
 06100                {
 06101                    b.Property<int>("Id")
 06102                        .ValueGeneratedOnAdd()
 06103                        .HasColumnType("int");
 06104
 06105                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06106
 06107                    b.Property<decimal?>("ActionPrice")
 06108                        .HasColumnType("decimal(18,2)");
 06109
 06110                    b.Property<string>("AddMode")
 06111                        .HasMaxLength(32)
 06112                        .HasColumnType("varchar(32)");
 06113
 06114                    b.Property<DateTime?>("DateFrom")
 06115                        .HasColumnType("datetime(6)");
 06116
 06117                    b.Property<DateTime?>("DateTo")
 06118                        .HasColumnType("datetime(6)");
 06119
 06120                    b.Property<string>("Description")
 06121                        .HasColumnType("longtext");
 06122
 06123                    b.Property<long?>("ExternalActionId")
 06124                        .HasColumnType("bigint");
 06125
 06126                    b.Property<string>("Mechanic")
 06127                        .HasMaxLength(100)
 06128                        .HasColumnType("varchar(100)");
 06129
 06130                    b.Property<int>("SnapshotId")
 06131                        .HasColumnType("int");
 06132
 06133                    b.Property<string>("SourceType")
 06134                        .IsRequired()
 06135                        .HasMaxLength(32)
 06136                        .HasColumnType("varchar(32)");
 06137
 06138                    b.Property<string>("Title")
 06139                        .IsRequired()
 06140                        .HasMaxLength(500)
 06141                        .HasColumnType("varchar(500)");
 06142
 06143                    b.Property<decimal?>("Value")
 06144                        .HasColumnType("decimal(18,2)");
 06145
 06146                    b.HasKey("Id");
 06147
 06148                    b.HasIndex("SnapshotId", "SourceType");
 06149
 06150                    b.HasIndex("SourceType", "ExternalActionId");
 06151
 06152                    b.ToTable("OrderOzonPromotionConditions");
 06153                });
 6154
 06155            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 06156                {
 06157                    b.Property<int>("Id")
 06158                        .ValueGeneratedOnAdd()
 06159                        .HasColumnType("int");
 06160
 06161                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06162
 06163                    b.Property<decimal>("Acquiring")
 06164                        .HasColumnType("decimal(18,2)");
 06165
 06166                    b.Property<bool>("AutoActionEnabled")
 06167                        .HasColumnType("tinyint(1)");
 06168
 06169                    b.Property<bool>("AutoAddToOzonActionsListEnabled")
 06170                        .HasColumnType("tinyint(1)");
 06171
 06172                    b.Property<DateTime>("CapturedAt")
 06173                        .HasColumnType("datetime(6)");
 06174
 06175                    b.Property<string>("CurrencyCode")
 06176                        .IsRequired()
 06177                        .HasMaxLength(10)
 06178                        .HasColumnType("varchar(10)");
 06179
 06180                    b.Property<DateTime?>("CurrentPeriodFrom")
 06181                        .HasColumnType("datetime(6)");
 06182
 06183                    b.Property<DateTime?>("CurrentPeriodTo")
 06184                        .HasColumnType("datetime(6)");
 06185
 06186                    b.Property<string>("EnrichmentStatus")
 06187                        .IsRequired()
 06188                        .HasMaxLength(32)
 06189                        .HasColumnType("varchar(32)");
 06190
 06191                    b.Property<decimal>("ExternalPriceIndex")
 06192                        .HasColumnType("decimal(18,4)");
 06193
 06194                    b.Property<decimal>("FboCommissionPercent")
 06195                        .HasColumnType("decimal(18,2)");
 06196
 06197                    b.Property<decimal>("FbsCommissionPercent")
 06198                        .HasColumnType("decimal(18,2)");
 06199
 06200                    b.Property<decimal>("FbsDeliveryToCustomerAmount")
 06201                        .HasColumnType("decimal(18,2)");
 06202
 06203                    b.Property<decimal>("FbsDirectFlowMaxAmount")
 06204                        .HasColumnType("decimal(18,2)");
 06205
 06206                    b.Property<decimal>("FbsDirectFlowMinAmount")
 06207                        .HasColumnType("decimal(18,2)");
 06208
 06209                    b.Property<decimal>("FbsFirstMileMaxAmount")
 06210                        .HasColumnType("decimal(18,2)");
 06211
 06212                    b.Property<decimal>("FbsFirstMileMinAmount")
 06213                        .HasColumnType("decimal(18,2)");
 06214
 06215                    b.Property<bool>("HasAnyPromotion")
 06216                        .HasColumnType("tinyint(1)");
 06217
 06218                    b.Property<decimal>("MarketingPrice")
 06219                        .HasColumnType("decimal(18,2)");
 06220
 06221                    b.Property<decimal>("MarketingSellerPrice")
 06222                        .HasColumnType("decimal(18,2)");
 06223
 06224                    b.Property<decimal>("MinPrice")
 06225                        .HasColumnType("decimal(18,2)");
 06226
 06227                    b.Property<decimal>("NetPrice")
 06228                        .HasColumnType("decimal(18,2)");
 06229
 06230                    b.Property<string>("OfferId")
 06231                        .IsRequired()
 06232                        .HasMaxLength(255)
 06233                        .HasColumnType("varchar(255)");
 06234
 06235                    b.Property<decimal>("OldPrice")
 06236                        .HasColumnType("decimal(18,2)");
 06237
 06238                    b.Property<int>("OrderId")
 06239                        .HasColumnType("int");
 06240
 06241                    b.Property<bool>("OzonActionsExist")
 06242                        .HasColumnType("tinyint(1)");
 06243
 06244                    b.Property<int?>("OzonClientId")
 06245                        .HasColumnType("int");
 06246
 06247                    b.Property<decimal>("OzonPriceIndex")
 06248                        .HasColumnType("decimal(18,4)");
 06249
 06250                    b.Property<long>("OzonProductId")
 06251                        .HasColumnType("bigint");
 06252
 06253                    b.Property<decimal>("Price")
 06254                        .HasColumnType("decimal(18,2)");
 06255
 06256                    b.Property<string>("RawPricePayload")
 06257                        .IsRequired()
 06258                        .HasColumnType("longtext");
 06259
 06260                    b.Property<decimal>("RetailPrice")
 06261                        .HasColumnType("decimal(18,2)");
 06262
 06263                    b.Property<decimal>("SelfMarketplacePriceIndex")
 06264                        .HasColumnType("decimal(18,4)");
 06265
 06266                    b.Property<decimal>("Vat")
 06267                        .HasColumnType("decimal(18,2)");
 06268
 06269                    b.Property<decimal>("VolumeWeight")
 06270                        .HasColumnType("decimal(18,3)");
 06271
 06272                    b.HasKey("Id");
 06273
 06274                    b.HasIndex("OrderId")
 06275                        .IsUnique();
 06276
 06277                    b.HasIndex("HasAnyPromotion", "CapturedAt");
 06278
 06279                    b.HasIndex("OzonClientId", "OzonProductId");
 06280
 06281                    b.ToTable("OrderOzonPromotionSnapshots");
 06282                });
 6283
 06284            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 06285                {
 06286                    b.Property<int>("Id")
 06287                        .ValueGeneratedOnAdd()
 06288                        .HasColumnType("int");
 06289
 06290                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06291
 06292                    b.Property<bool>("AutoActionEnabled")
 06293                        .HasColumnType("tinyint(1)");
 06294
 06295                    b.Property<bool>("AutoAddToOzonActionsListEnabled")
 06296                        .HasColumnType("tinyint(1)");
 06297
 06298                    b.Property<string>("CurrencyCode")
 06299                        .IsRequired()
 06300                        .HasMaxLength(10)
 06301                        .HasColumnType("varchar(10)");
 06302
 06303                    b.Property<decimal>("MarketingPrice")
 06304                        .HasColumnType("decimal(18,2)");
 06305
 06306                    b.Property<decimal>("MarketingSellerPrice")
 06307                        .HasColumnType("decimal(18,2)");
 06308
 06309                    b.Property<decimal>("MinPrice")
 06310                        .HasColumnType("decimal(18,2)");
 06311
 06312                    b.Property<decimal>("NetPrice")
 06313                        .HasColumnType("decimal(18,2)");
 06314
 06315                    b.Property<decimal>("OldPrice")
 06316                        .HasColumnType("decimal(18,2)");
 06317
 06318                    b.Property<int>("OrderId")
 06319                        .HasColumnType("int");
 06320
 06321                    b.Property<decimal>("Price")
 06322                        .HasColumnType("decimal(18,2)");
 06323
 06324                    b.Property<decimal>("RetailPrice")
 06325                        .HasColumnType("decimal(18,2)");
 06326
 06327                    b.Property<decimal>("Vat")
 06328                        .HasColumnType("decimal(18,2)");
 06329
 06330                    b.HasKey("Id");
 06331
 06332                    b.HasIndex("OrderId");
 06333
 06334                    b.ToTable("OrderPrices");
 06335                });
 6336
 06337            modelBuilder.Entity("OzonDomains.Models.OrderReturn", b =>
 06338                {
 06339                    b.Property<long>("Id")
 06340                        .ValueGeneratedOnAdd()
 06341                        .HasColumnType("bigint");
 06342
 06343                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06344
 06345                    b.Property<DateTime?>("CancelledWithCompensationMoment")
 06346                        .HasColumnType("datetime(6)");
 06347
 06348                    b.Property<long?>("ClearingId")
 06349                        .HasColumnType("bigint");
 06350
 06351                    b.Property<DateTime?>("CompensationStatusChangeMoment")
 06352                        .HasColumnType("datetime(6)");
 06353
 06354                    b.Property<string>("CompensationStatusDisplayName")
 06355                        .HasMaxLength(200)
 06356                        .HasColumnType("varchar(200)");
 06357
 06358                    b.Property<int?>("CompensationStatusId")
 06359                        .HasColumnType("int");
 06360
 06361                    b.Property<string>("CompensationStatusSysName")
 06362                        .HasMaxLength(100)
 06363                        .HasColumnType("varchar(100)");
 06364
 06365                    b.Property<DateTime>("CreatedAt")
 06366                        .ValueGeneratedOnAdd()
 06367                        .HasColumnType("datetime(6)")
 06368                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06369
 06370                    b.Property<DateTime?>("FinalMoment")
 06371                        .HasColumnType("datetime(6)");
 06372
 06373                    b.Property<bool>("IsOpened")
 06374                        .HasColumnType("tinyint(1)");
 06375
 06376                    b.Property<bool>("IsSuperEconom")
 06377                        .HasColumnType("tinyint(1)");
 06378
 06379                    b.Property<string>("LogisticBarcode")
 06380                        .HasMaxLength(100)
 06381                        .HasColumnType("varchar(100)");
 06382
 06383                    b.Property<int?>("OrderId")
 06384                        .HasColumnType("int");
 06385
 06386                    b.Property<string>("OrderNumber")
 06387                        .HasMaxLength(50)
 06388                        .HasColumnType("varchar(50)");
 06389
 06390                    b.Property<int>("OzonClientId")
 06391                        .HasColumnType("int");
 06392
 06393                    b.Property<long>("OzonOrderId")
 06394                        .HasColumnType("bigint");
 06395
 06396                    b.Property<long>("OzonReturnId")
 06397                        .HasColumnType("bigint");
 06398
 06399                    b.Property<string>("PlaceAddress")
 06400                        .HasColumnType("text");
 06401
 06402                    b.Property<long?>("PlaceId")
 06403                        .HasColumnType("bigint");
 06404
 06405                    b.Property<string>("PlaceName")
 06406                        .HasMaxLength(255)
 06407                        .HasColumnType("varchar(255)");
 06408
 06409                    b.Property<string>("PostingNumber")
 06410                        .HasMaxLength(50)
 06411                        .HasColumnType("varchar(50)");
 06412
 06413                    b.Property<decimal?>("ProductCommission")
 06414                        .HasColumnType("decimal(18,2)");
 06415
 06416                    b.Property<double>("ProductCommissionPercent")
 06417                        .HasColumnType("double");
 06418
 06419                    b.Property<string>("ProductName")
 06420                        .HasMaxLength(500)
 06421                        .HasColumnType("varchar(500)");
 06422
 06423                    b.Property<string>("ProductOfferId")
 06424                        .HasMaxLength(100)
 06425                        .HasColumnType("varchar(100)");
 06426
 06427                    b.Property<decimal?>("ProductPrice")
 06428                        .HasColumnType("decimal(18,2)");
 06429
 06430                    b.Property<string>("ProductPriceCurrency")
 06431                        .HasMaxLength(10)
 06432                        .HasColumnType("varchar(10)");
 06433
 06434                    b.Property<int>("ProductQuantity")
 06435                        .HasColumnType("int");
 06436
 06437                    b.Property<long>("ProductSku")
 06438                        .HasColumnType("bigint");
 06439
 06440                    b.Property<string>("RawDataJson")
 06441                        .HasColumnType("longtext");
 06442
 06443                    b.Property<long?>("ReturnClearingId")
 06444                        .HasColumnType("bigint");
 06445
 06446                    b.Property<DateTime?>("ReturnDate")
 06447                        .HasColumnType("datetime(6)");
 06448
 06449                    b.Property<string>("ReturnReasonName")
 06450                        .HasMaxLength(500)
 06451                        .HasColumnType("varchar(500)");
 06452
 06453                    b.Property<string>("ReturnType")
 06454                        .HasMaxLength(50)
 06455                        .HasColumnType("varchar(50)");
 06456
 06457                    b.Property<string>("Schema")
 06458                        .HasMaxLength(20)
 06459                        .HasColumnType("varchar(20)");
 06460
 06461                    b.Property<long?>("SourceId")
 06462                        .HasColumnType("bigint");
 06463
 06464                    b.Property<DateTime?>("StorageArrivedMoment")
 06465                        .HasColumnType("datetime(6)");
 06466
 06467                    b.Property<long>("StorageDays")
 06468                        .HasColumnType("bigint");
 06469
 06470                    b.Property<string>("StorageSumCurrency")
 06471                        .HasMaxLength(10)
 06472                        .HasColumnType("varchar(10)");
 06473
 06474                    b.Property<decimal?>("StorageSumPrice")
 06475                        .HasColumnType("decimal(18,2)");
 06476
 06477                    b.Property<DateTime?>("StorageTarificationFirstDate")
 06478                        .HasColumnType("datetime(6)");
 06479
 06480                    b.Property<DateTime?>("StorageTarificationStartDate")
 06481                        .HasColumnType("datetime(6)");
 06482
 06483                    b.Property<string>("TargetPlaceAddress")
 06484                        .HasColumnType("text");
 06485
 06486                    b.Property<long?>("TargetPlaceId")
 06487                        .HasColumnType("bigint");
 06488
 06489                    b.Property<string>("TargetPlaceName")
 06490                        .HasMaxLength(255)
 06491                        .HasColumnType("varchar(255)");
 06492
 06493                    b.Property<DateTime?>("TechnicalReturnMoment")
 06494                        .HasColumnType("datetime(6)");
 06495
 06496                    b.Property<DateTime>("UpdatedAt")
 06497                        .ValueGeneratedOnAdd()
 06498                        .HasColumnType("datetime(6)")
 06499                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06500
 06501                    b.Property<DateTime?>("UtilizationForecastDate")
 06502                        .HasColumnType("datetime(6)");
 06503
 06504                    b.Property<string>("UtilizationSumCurrency")
 06505                        .HasMaxLength(10)
 06506                        .HasColumnType("varchar(10)");
 06507
 06508                    b.Property<decimal?>("UtilizationSumPrice")
 06509                        .HasColumnType("decimal(18,2)");
 06510
 06511                    b.Property<DateTime?>("VisualStatusChangeMoment")
 06512                        .HasColumnType("datetime(6)");
 06513
 06514                    b.Property<string>("VisualStatusDisplayName")
 06515                        .HasMaxLength(200)
 06516                        .HasColumnType("varchar(200)");
 06517
 06518                    b.Property<int?>("VisualStatusId")
 06519                        .HasColumnType("int");
 06520
 06521                    b.Property<string>("VisualStatusSysName")
 06522                        .HasMaxLength(100)
 06523                        .HasColumnType("varchar(100)");
 06524
 06525                    b.HasKey("Id");
 06526
 06527                    b.HasIndex("OrderId");
 06528
 06529                    b.HasIndex("OzonClientId");
 06530
 06531                    b.HasIndex("OzonReturnId")
 06532                        .IsUnique();
 06533
 06534                    b.HasIndex("PostingNumber");
 06535
 06536                    b.HasIndex("UpdatedAt");
 06537
 06538                    b.HasIndex("VisualStatusChangeMoment");
 06539
 06540                    b.HasIndex("VisualStatusSysName");
 06541
 06542                    b.HasIndex("OzonClientId", "OrderNumber");
 06543
 06544                    b.HasIndex("OzonClientId", "PostingNumber");
 06545
 06546                    b.ToTable("OrderReturns");
 06547                });
 6548
 06549            modelBuilder.Entity("OzonDomains.Models.OrderReturnSyncRun", b =>
 06550                {
 06551                    b.Property<long>("Id")
 06552                        .ValueGeneratedOnAdd()
 06553                        .HasColumnType("bigint");
 06554
 06555                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06556
 06557                    b.Property<DateTime?>("CompletedAtUtc")
 06558                        .HasColumnType("datetime(6)");
 06559
 06560                    b.Property<long?>("DurationMs")
 06561                        .HasColumnType("bigint");
 06562
 06563                    b.Property<int>("ErrorCount")
 06564                        .HasColumnType("int");
 06565
 06566                    b.Property<string>("ErrorMessage")
 06567                        .HasColumnType("text");
 06568
 06569                    b.Property<DateTime>("FromDate")
 06570                        .HasColumnType("datetime(6)");
 06571
 06572                    b.Property<bool>("Incremental")
 06573                        .HasColumnType("tinyint(1)");
 06574
 06575                    b.Property<int>("Inserted")
 06576                        .HasColumnType("int");
 06577
 06578                    b.Property<int>("LinkedOrders")
 06579                        .HasColumnType("int");
 06580
 06581                    b.Property<int>("OzonClientId")
 06582                        .HasColumnType("int");
 06583
 06584                    b.Property<int>("Processed")
 06585                        .HasColumnType("int");
 06586
 06587                    b.Property<DateTime>("StartedAtUtc")
 06588                        .HasColumnType("datetime(6)");
 06589
 06590                    b.Property<string>("Status")
 06591                        .IsRequired()
 06592                        .HasMaxLength(32)
 06593                        .HasColumnType("varchar(32)");
 06594
 06595                    b.Property<int>("StatusChanged")
 06596                        .HasColumnType("int");
 06597
 06598                    b.Property<DateTime>("ToDate")
 06599                        .HasColumnType("datetime(6)");
 06600
 06601                    b.Property<string>("TriggerType")
 06602                        .IsRequired()
 06603                        .HasMaxLength(32)
 06604                        .HasColumnType("varchar(32)");
 06605
 06606                    b.HasKey("Id");
 06607
 06608                    b.HasIndex("StartedAtUtc");
 06609
 06610                    b.HasIndex("Status");
 06611
 06612                    b.ToTable("OrderReturnSyncRuns");
 06613                });
 6614
 06615            modelBuilder.Entity("OzonDomains.Models.OrderSearchSyncState", b =>
 06616                {
 06617                    b.Property<int>("Id")
 06618                        .HasColumnType("int");
 06619
 06620                    b.Property<DateTime?>("LastFullReindexAt")
 06621                        .HasColumnType("datetime(6)");
 06622
 06623                    b.Property<DateTime?>("LastSyncedAt")
 06624                        .HasColumnType("datetime(6)");
 06625
 06626                    b.Property<int>("LastSyncedOrderId")
 06627                        .HasColumnType("int");
 06628
 06629                    b.HasKey("Id");
 06630
 06631                    b.ToTable("OrderSearchSyncState");
 06632                });
 6633
 06634            modelBuilder.Entity("OzonDomains.Models.OrderShipmentTotals", b =>
 06635                {
 06636                    b.Property<long>("Id")
 06637                        .ValueGeneratedOnAdd()
 06638                        .HasColumnType("bigint");
 06639
 06640                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06641
 06642                    b.Property<double>("AccrualsForSale")
 06643                        .HasColumnType("double");
 06644
 06645                    b.Property<double>("CompensationAmount")
 06646                        .HasColumnType("double");
 06647
 06648                    b.Property<DateTime>("CreatedAt")
 06649                        .HasColumnType("datetime");
 06650
 06651                    b.Property<double>("ListAmount")
 06652                        .HasColumnType("double");
 06653
 06654                    b.Property<double>("MoneyTransfer")
 06655                        .HasColumnType("double");
 06656
 06657                    b.Property<int>("OperationsCount")
 06658                        .HasColumnType("int");
 06659
 06660                    b.Property<string>("OperationsJson")
 06661                        .HasColumnType("longtext");
 06662
 06663                    b.Property<int>("OrderId")
 06664                        .HasColumnType("int");
 06665
 06666                    b.Property<double>("OthersAmount")
 06667                        .HasColumnType("double");
 06668
 06669                    b.Property<double>("ProcessingAndDelivery")
 06670                        .HasColumnType("double");
 06671
 06672                    b.Property<double>("RefundsAndCancellations")
 06673                        .HasColumnType("double");
 06674
 06675                    b.Property<double>("SaleCommission")
 06676                        .HasColumnType("double");
 06677
 06678                    b.Property<double>("ServicesAmount")
 06679                        .HasColumnType("double");
 06680
 06681                    b.Property<string>("ShipmentNumber")
 06682                        .HasMaxLength(50)
 06683                        .HasColumnType("varchar(50)");
 06684
 06685                    b.Property<DateTime>("UpdatedAt")
 06686                        .HasColumnType("datetime");
 06687
 06688                    b.HasKey("Id");
 06689
 06690                    b.HasIndex("OrderId");
 06691
 06692                    b.ToTable("OrderShipmentTotals");
 06693                });
 6694
 06695            modelBuilder.Entity("OzonDomains.Models.OrdersFileMetadata", b =>
 06696                {
 06697                    b.Property<int>("Id")
 06698                        .ValueGeneratedOnAdd()
 06699                        .HasColumnType("int");
 06700
 06701                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06702
 06703                    b.Property<string>("FileName")
 06704                        .HasMaxLength(100)
 06705                        .HasColumnType("varchar(100)");
 06706
 06707                    b.Property<string>("FolderName")
 06708                        .HasMaxLength(50)
 06709                        .HasColumnType("varchar(50)");
 06710
 06711                    b.HasKey("Id");
 06712
 06713                    b.ToTable("OrdersFileMetadata");
 06714                });
 6715
 06716            modelBuilder.Entity("OzonDomains.Models.OrdersGridUserSetting", b =>
 06717                {
 06718                    b.Property<int>("Id")
 06719                        .ValueGeneratedOnAdd()
 06720                        .HasColumnType("int");
 06721
 06722                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06723
 06724                    b.Property<string>("Key")
 06725                        .IsRequired()
 06726                        .HasMaxLength(64)
 06727                        .HasColumnType("varchar(64)");
 06728
 06729                    b.Property<DateTime>("UpdatedAt")
 06730                        .HasColumnType("datetime(6)");
 06731
 06732                    b.Property<string>("UserId")
 06733                        .IsRequired()
 06734                        .HasMaxLength(255)
 06735                        .HasColumnType("varchar(255)");
 06736
 06737                    b.Property<string>("Value")
 06738                        .IsRequired()
 06739                        .HasColumnType("longtext");
 06740
 06741                    b.Property<long>("Version")
 06742                        .HasColumnType("bigint");
 06743
 06744                    b.HasKey("Id");
 06745
 06746                    b.HasIndex("UserId", "Key")
 06747                        .IsUnique();
 06748
 06749                    b.ToTable("OrdersGridUserSettings");
 06750                });
 6751
 06752            modelBuilder.Entity("OzonDomains.Models.OzonChatOrder", b =>
 06753                {
 06754                    b.Property<long>("Id")
 06755                        .ValueGeneratedOnAdd()
 06756                        .HasColumnType("bigint");
 06757
 06758                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06759
 06760                    b.Property<string>("ChatId")
 06761                        .IsRequired()
 06762                        .HasMaxLength(100)
 06763                        .HasColumnType("varchar(100)");
 06764
 06765                    b.Property<string>("ChatStatus")
 06766                        .HasMaxLength(50)
 06767                        .HasColumnType("varchar(50)");
 06768
 06769                    b.Property<string>("ChatType")
 06770                        .HasMaxLength(50)
 06771                        .HasColumnType("varchar(50)");
 06772
 06773                    b.Property<int>("ClientId")
 06774                        .HasColumnType("int");
 06775
 06776                    b.Property<DateTime>("CreatedAt")
 06777                        .ValueGeneratedOnAdd()
 06778                        .HasColumnType("datetime")
 06779                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06780
 06781                    b.Property<bool>("IsActive")
 06782                        .HasColumnType("tinyint(1)");
 06783
 06784                    b.Property<DateTime?>("LastMessageDate")
 06785                        .HasColumnType("datetime");
 06786
 06787                    b.Property<bool>("LastMessageFromCustomer")
 06788                        .HasColumnType("tinyint(1)");
 06789
 06790                    b.Property<string>("LastMessageText")
 06791                        .HasColumnType("longtext");
 06792
 06793                    b.Property<int>("OrderId")
 06794                        .HasColumnType("int");
 06795
 06796                    b.Property<string>("PostingNumber")
 06797                        .HasMaxLength(50)
 06798                        .HasColumnType("varchar(50)");
 06799
 06800                    b.Property<int>("UnreadMessagesCount")
 06801                        .HasColumnType("int");
 06802
 06803                    b.Property<DateTime>("UpdatedAt")
 06804                        .ValueGeneratedOnAdd()
 06805                        .HasColumnType("datetime")
 06806                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06807
 06808                    b.HasKey("Id");
 06809
 06810                    b.HasIndex("ChatId");
 06811
 06812                    b.HasIndex("ClientId")
 06813                        .HasDatabaseName("FK_OzonChatOrders_OzonClient");
 06814
 06815                    b.HasIndex("OrderId")
 06816                        .HasDatabaseName("FK_OzonChatOrders_Order");
 06817
 06818                    b.HasIndex("PostingNumber");
 06819
 06820                    b.HasIndex("ChatId", "OrderId");
 06821
 06822                    b.HasIndex("IsActive", "ClientId");
 06823
 06824                    b.ToTable("OzonChatOrders");
 06825                });
 6826
 06827            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseStatistic", b =>
 06828                {
 06829                    b.Property<long>("Id")
 06830                        .ValueGeneratedOnAdd()
 06831                        .HasColumnType("bigint");
 06832
 06833                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06834
 06835                    b.Property<string>("ChatId")
 06836                        .IsRequired()
 06837                        .HasMaxLength(100)
 06838                        .HasColumnType("varchar(100)");
 06839
 06840                    b.Property<string>("ChatStatus")
 06841                        .HasMaxLength(50)
 06842                        .HasColumnType("varchar(50)");
 06843
 06844                    b.Property<string>("ChatType")
 06845                        .HasMaxLength(50)
 06846                        .HasColumnType("varchar(50)");
 06847
 06848                    b.Property<int>("ClientId")
 06849                        .HasColumnType("int");
 06850
 06851                    b.Property<DateTime>("ClientMessageDate")
 06852                        .HasColumnType("datetime(6)");
 06853
 06854                    b.Property<long>("ClientMessageId")
 06855                        .HasColumnType("bigint");
 06856
 06857                    b.Property<string>("ClientMessageText")
 06858                        .HasColumnType("longtext");
 06859
 06860                    b.Property<DateTime>("CreatedAt")
 06861                        .HasColumnType("datetime(6)");
 06862
 06863                    b.Property<bool>("IsAnswered")
 06864                        .HasColumnType("tinyint(1)");
 06865
 06866                    b.Property<int?>("OrderId")
 06867                        .HasColumnType("int");
 06868
 06869                    b.Property<string>("PostingNumber")
 06870                        .HasMaxLength(50)
 06871                        .HasColumnType("varchar(50)");
 06872
 06873                    b.Property<string>("ResponderName")
 06874                        .HasMaxLength(200)
 06875                        .HasColumnType("varchar(200)");
 06876
 06877                    b.Property<int?>("ResponseTimeSeconds")
 06878                        .HasColumnType("int");
 06879
 06880                    b.Property<DateTime?>("SellerResponseDate")
 06881                        .HasColumnType("datetime(6)");
 06882
 06883                    b.Property<long?>("SellerResponseMessageId")
 06884                        .HasColumnType("bigint");
 06885
 06886                    b.Property<string>("SellerResponseText")
 06887                        .HasColumnType("longtext");
 06888
 06889                    b.Property<DateTime>("UpdatedAt")
 06890                        .HasColumnType("datetime(6)");
 06891
 06892                    b.HasKey("Id");
 06893
 06894                    b.HasIndex("ChatId")
 06895                        .HasDatabaseName("IX_OzonChatResponseStatistics_ChatId");
 06896
 06897                    b.HasIndex("OrderId")
 06898                        .HasDatabaseName("FK_OzonChatResponseStatistics_Order");
 06899
 06900                    b.HasIndex("ClientId", "ClientMessageDate")
 06901                        .HasDatabaseName("IX_OzonChatResponseStatistics_ClientId_Date");
 06902
 06903                    b.ToTable("OzonChatResponseStatistics");
 06904                });
 6905
 06906            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseTime", b =>
 06907                {
 06908                    b.Property<long>("Id")
 06909                        .ValueGeneratedOnAdd()
 06910                        .HasColumnType("bigint");
 06911
 06912                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06913
 06914                    b.Property<string>("ChatId")
 06915                        .IsRequired()
 06916                        .HasMaxLength(100)
 06917                        .HasColumnType("varchar(100)");
 06918
 06919                    b.Property<int>("ClientId")
 06920                        .HasColumnType("int");
 06921
 06922                    b.Property<DateTime>("CreatedAt")
 06923                        .HasColumnType("datetime");
 06924
 06925                    b.Property<int>("Minutes")
 06926                        .HasColumnType("int");
 06927
 06928                    b.Property<DateTime>("RecordedAt")
 06929                        .HasColumnType("datetime");
 06930
 06931                    b.Property<string>("UserName")
 06932                        .IsRequired()
 06933                        .HasMaxLength(200)
 06934                        .HasColumnType("varchar(200)");
 06935
 06936                    b.HasKey("Id");
 06937
 06938                    b.HasIndex("ChatId")
 06939                        .HasDatabaseName("IX_OzonChatResponseTimes_ChatId");
 06940
 06941                    b.HasIndex("ClientId");
 06942
 06943                    b.HasIndex("UserName")
 06944                        .HasDatabaseName("IX_OzonChatResponseTimes_UserName");
 06945
 06946                    b.ToTable("OzonChatResponseTimes");
 06947                });
 6948
 06949            modelBuilder.Entity("OzonDomains.Models.OzonClient", b =>
 06950                {
 06951                    b.Property<int>("Id")
 06952                        .ValueGeneratedOnAdd()
 06953                        .HasColumnType("int");
 06954
 06955                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06956
 06957                    b.Property<string>("ApiKey")
 06958                        .HasMaxLength(500)
 06959                        .HasColumnType("varchar(500)");
 06960
 06961                    b.Property<string>("ClientId")
 06962                        .HasMaxLength(100)
 06963                        .HasColumnType("varchar(100)");
 06964
 06965                    b.Property<int>("ClientType")
 06966                        .HasColumnType("int");
 06967
 06968                    b.Property<int>("CurrencyCode")
 06969                        .HasColumnType("int");
 06970
 06971                    b.Property<string>("INNCode")
 06972                        .HasMaxLength(20)
 06973                        .HasColumnType("varchar(20)");
 06974
 06975                    b.Property<string>("Name")
 06976                        .IsRequired()
 06977                        .HasMaxLength(50)
 06978                        .HasColumnType("varchar(50)");
 06979
 06980                    b.Property<string>("WarehouseName")
 06981                        .HasMaxLength(100)
 06982                        .HasColumnType("varchar(100)");
 06983
 06984                    b.HasKey("Id");
 06985
 06986                    b.ToTable("OzonClients");
 06987                });
 6988
 06989            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 06990                {
 06991                    b.Property<int>("Id")
 06992                        .ValueGeneratedOnAdd()
 06993                        .HasColumnType("int");
 06994
 06995                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06996
 06997                    b.Property<int>("AcceptedCount")
 06998                        .HasColumnType("int");
 06999
 07000                    b.Property<string>("AccountLabel")
 07001                        .HasMaxLength(50)
 07002                        .HasColumnType("varchar(50)");
 07003
 07004                    b.Property<DateTime>("ActDate")
 07005                        .HasColumnType("datetime(6)");
 07006
 07007                    b.Property<string>("ActNo")
 07008                        .HasMaxLength(100)
 07009                        .HasColumnType("varchar(100)");
 07010
 07011                    b.Property<string>("ActType")
 07012                        .HasMaxLength(100)
 07013                        .HasColumnType("varchar(100)");
 07014
 07015                    b.Property<int>("BatchId")
 07016                        .HasColumnType("int");
 07017
 07018                    b.Property<string>("BoxBarcode")
 07019                        .HasMaxLength(100)
 07020                        .HasColumnType("varchar(100)");
 07021
 07022                    b.Property<int>("DefectCount")
 07023                        .HasColumnType("int");
 07024
 07025                    b.Property<string>("GroupKey")
 07026                        .HasMaxLength(50)
 07027                        .HasColumnType("varchar(50)");
 07028
 07029                    b.Property<string>("GroupName")
 07030                        .HasMaxLength(100)
 07031                        .HasColumnType("varchar(100)");
 07032
 07033                    b.Property<int>("ItemsCount")
 07034                        .HasColumnType("int");
 07035
 07036                    b.Property<int>("MissortCount")
 07037                        .HasColumnType("int");
 07038
 07039                    b.Property<int>("PendingCount")
 07040                        .HasColumnType("int");
 07041
 07042                    b.Property<string>("Pvz")
 07043                        .HasMaxLength(100)
 07044                        .HasColumnType("varchar(100)");
 07045
 07046                    b.Property<int>("RejectedCount")
 07047                        .HasColumnType("int");
 07048
 07049                    b.Property<long?>("ReturnId")
 07050                        .HasColumnType("bigint");
 07051
 07052                    b.Property<string>("ReturnType")
 07053                        .HasMaxLength(20)
 07054                        .HasColumnType("varchar(20)");
 07055
 07056                    b.Property<string>("Source")
 07057                        .HasMaxLength(500)
 07058                        .HasColumnType("varchar(500)");
 07059
 07060                    b.Property<string>("Status")
 07061                        .HasMaxLength(30)
 07062                        .HasColumnType("varchar(30)");
 07063
 07064                    b.Property<decimal>("TotalValue")
 07065                        .HasColumnType("decimal(65,30)");
 07066
 07067                    b.HasKey("Id");
 07068
 07069                    b.HasIndex("BatchId");
 07070
 07071                    b.ToTable("OzonHandoverActs");
 07072                });
 7073
 07074            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 07075                {
 07076                    b.Property<long>("Id")
 07077                        .ValueGeneratedOnAdd()
 07078                        .HasColumnType("bigint");
 07079
 07080                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07081
 07082                    b.Property<string>("AccountLabel")
 07083                        .HasMaxLength(50)
 07084                        .HasColumnType("varchar(50)");
 07085
 07086                    b.Property<int>("ActId")
 07087                        .HasColumnType("int");
 07088
 07089                    b.Property<string>("Barcode")
 07090                        .HasMaxLength(100)
 07091                        .HasColumnType("varchar(100)");
 07092
 07093                    b.Property<string>("BoxBarcode")
 07094                        .HasMaxLength(100)
 07095                        .HasColumnType("varchar(100)");
 07096
 07097                    b.Property<string>("ClientComment")
 07098                        .HasColumnType("text");
 07099
 07100                    b.Property<DateTime?>("ClientPhotosExpiresAt")
 07101                        .HasColumnType("datetime(6)");
 07102
 07103                    b.Property<string>("ClientReturnMethod")
 07104                        .HasMaxLength(100)
 07105                        .HasColumnType("varchar(100)");
 07106
 07107                    b.Property<string>("Comment")
 07108                        .HasMaxLength(1000)
 07109                        .HasColumnType("varchar(1000)");
 07110
 07111                    b.Property<bool>("Defect")
 07112                        .HasColumnType("tinyint(1)");
 07113
 07114                    b.Property<string>("ItemNo")
 07115                        .HasMaxLength(50)
 07116                        .HasColumnType("varchar(50)");
 07117
 07118                    b.Property<DateTime?>("MarkedAt")
 07119                        .HasColumnType("datetime(6)");
 07120
 07121                    b.Property<bool>("Missort")
 07122                        .HasColumnType("tinyint(1)");
 07123
 07124                    b.Property<string>("OfferId")
 07125                        .HasMaxLength(100)
 07126                        .HasColumnType("varchar(100)");
 07127
 07128                    b.Property<int?>("OrderId")
 07129                        .HasColumnType("int");
 07130
 07131                    b.Property<string>("OrderNumber")
 07132                        .HasMaxLength(100)
 07133                        .HasColumnType("varchar(100)");
 07134
 07135                    b.Property<string>("OzonStatus")
 07136                        .HasMaxLength(50)
 07137                        .HasColumnType("varchar(50)");
 07138
 07139                    b.Property<string>("OzonStatusName")
 07140                        .HasMaxLength(200)
 07141                        .HasColumnType("varchar(200)");
 07142
 07143                    b.Property<int>("PhotosCount")
 07144                        .HasColumnType("int");
 07145
 07146                    b.Property<string>("PhotosError")
 07147                        .HasColumnType("text");
 07148
 07149                    b.Property<string>("ProductName")
 07150                        .HasMaxLength(500)
 07151                        .HasColumnType("varchar(500)");
 07152
 07153                    b.Property<string>("Reason")
 07154                        .HasMaxLength(1000)
 07155                        .HasColumnType("varchar(1000)");
 07156
 07157                    b.Property<bool>("ReasonIsDefect")
 07158                        .HasColumnType("tinyint(1)");
 07159
 07160                    b.Property<string>("RejectionComment")
 07161                        .HasColumnType("text");
 07162
 07163                    b.Property<string>("RejectionReason")
 07164                        .HasMaxLength(1000)
 07165                        .HasColumnType("varchar(1000)");
 07166
 07167                    b.Property<long?>("ReturnId")
 07168                        .HasColumnType("bigint");
 07169
 07170                    b.Property<string>("ReturnNumber")
 07171                        .HasMaxLength(100)
 07172                        .HasColumnType("varchar(100)");
 07173
 07174                    b.Property<string>("ReturnType")
 07175                        .HasMaxLength(20)
 07176                        .HasColumnType("varchar(20)");
 07177
 07178                    b.Property<int>("RowNo")
 07179                        .HasColumnType("int");
 07180
 07181                    b.Property<string>("RuPostTracking")
 07182                        .HasMaxLength(100)
 07183                        .HasColumnType("varchar(100)");
 07184
 07185                    b.Property<long?>("Sku")
 07186                        .HasColumnType("bigint");
 07187
 07188                    b.Property<string>("Status")
 07189                        .HasMaxLength(30)
 07190                        .HasColumnType("varchar(30)");
 07191
 07192                    b.Property<decimal>("Value")
 07193                        .HasColumnType("decimal(65,30)");
 07194
 07195                    b.Property<decimal?>("ValueApi")
 07196                        .HasColumnType("decimal(65,30)");
 07197
 07198                    b.Property<long?>("WarehouseId")
 07199                        .HasColumnType("bigint");
 07200
 07201                    b.Property<int?>("WeightG")
 07202                        .HasColumnType("int");
 07203
 07204                    b.HasKey("Id");
 07205
 07206                    b.HasIndex("ActId");
 07207
 07208                    b.HasIndex("ItemNo");
 07209
 07210                    b.HasIndex("OrderId");
 07211
 07212                    b.ToTable("OzonHandoverActItems");
 07213                });
 7214
 07215            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItemPhoto", b =>
 07216                {
 07217                    b.Property<long>("Id")
 07218                        .ValueGeneratedOnAdd()
 07219                        .HasColumnType("bigint");
 07220
 07221                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07222
 07223                    b.Property<long>("ActItemId")
 07224                        .HasColumnType("bigint");
 07225
 07226                    b.Property<string>("ContentType")
 07227                        .HasMaxLength(100)
 07228                        .HasColumnType("varchar(100)");
 07229
 07230                    b.Property<int>("Sequence")
 07231                        .HasColumnType("int");
 07232
 07233                    b.Property<string>("StoragePath")
 07234                        .IsRequired()
 07235                        .HasMaxLength(500)
 07236                        .HasColumnType("varchar(500)");
 07237
 07238                    b.HasKey("Id");
 07239
 07240                    b.HasIndex("ActItemId", "Sequence")
 07241                        .IsUnique();
 07242
 07243                    b.ToTable("OzonHandoverActItemPhotos");
 07244                });
 7245
 07246            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", b =>
 07247                {
 07248                    b.Property<int>("Id")
 07249                        .ValueGeneratedOnAdd()
 07250                        .HasColumnType("int");
 07251
 07252                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07253
 07254                    b.Property<string>("ClosedId")
 07255                        .HasMaxLength(300)
 07256                        .HasColumnType("varchar(300)");
 07257
 07258                    b.Property<string>("ClosedKind")
 07259                        .HasMaxLength(50)
 07260                        .HasColumnType("varchar(50)");
 07261
 07262                    b.Property<string>("DocumentType")
 07263                        .HasMaxLength(50)
 07264                        .HasColumnType("varchar(50)");
 07265
 07266                    b.Property<DateTime>("GeneratedAt")
 07267                        .HasColumnType("datetime(6)");
 07268
 07269                    b.Property<DateTime>("ImportedAt")
 07270                        .HasColumnType("datetime(6)");
 07271
 07272                    b.Property<int>("MatchedItemsCount")
 07273                        .HasColumnType("int");
 07274
 07275                    b.Property<string>("RawJson")
 07276                        .HasColumnType("longtext");
 07277
 07278                    b.Property<string>("ReturnType")
 07279                        .HasMaxLength(20)
 07280                        .HasColumnType("varchar(20)");
 07281
 07282                    b.Property<int>("SummaryAcceptedItemsCount")
 07283                        .HasColumnType("int");
 07284
 07285                    b.Property<decimal>("SummaryAcceptedValue")
 07286                        .HasColumnType("decimal(65,30)");
 07287
 07288                    b.Property<int>("SummaryActsCount")
 07289                        .HasColumnType("int");
 07290
 07291                    b.Property<int>("SummaryDefectCount")
 07292                        .HasColumnType("int");
 07293
 07294                    b.Property<int>("SummaryItemsCount")
 07295                        .HasColumnType("int");
 07296
 07297                    b.Property<int>("SummaryMissortCount")
 07298                        .HasColumnType("int");
 07299
 07300                    b.Property<int>("SummaryPendingItemsCount")
 07301                        .HasColumnType("int");
 07302
 07303                    b.Property<decimal>("SummaryPendingValue")
 07304                        .HasColumnType("decimal(65,30)");
 07305
 07306                    b.Property<int>("SummaryRejectedItemsCount")
 07307                        .HasColumnType("int");
 07308
 07309                    b.Property<decimal>("SummaryRejectedValue")
 07310                        .HasColumnType("decimal(65,30)");
 07311
 07312                    b.Property<decimal>("SummaryTotalValue")
 07313                        .HasColumnType("decimal(65,30)");
 07314
 07315                    b.Property<int>("UnmatchedItemsCount")
 07316                        .HasColumnType("int");
 07317
 07318                    b.Property<DateTime>("UpdatedAt")
 07319                        .HasColumnType("datetime(6)");
 07320
 07321                    b.HasKey("Id");
 07322
 07323                    b.HasIndex("ClosedId")
 07324                        .IsUnique();
 07325
 07326                    b.ToTable("OzonHandoverImportBatches");
 07327                });
 7328
 07329            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 07330                {
 07331                    b.Property<long>("Id")
 07332                        .ValueGeneratedOnAdd()
 07333                        .HasColumnType("bigint");
 07334
 07335                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07336
 07337                    b.Property<DateTime>("CreatedAt")
 07338                        .HasColumnType("datetime(6)");
 07339
 07340                    b.Property<string>("EventFingerprint")
 07341                        .IsRequired()
 07342                        .HasMaxLength(64)
 07343                        .HasColumnType("varchar(64)");
 07344
 07345                    b.Property<DateTime>("OccurredAt")
 07346                        .HasColumnType("datetime(6)");
 07347
 07348                    b.Property<int>("OzonClientId")
 07349                        .HasColumnType("int");
 07350
 07351                    b.Property<string>("PostingNumber")
 07352                        .IsRequired()
 07353                        .HasMaxLength(100)
 07354                        .HasColumnType("varchar(100)");
 07355
 07356                    b.Property<long?>("ReasonId")
 07357                        .HasColumnType("bigint");
 07358
 07359                    b.Property<string>("ReasonMessage")
 07360                        .HasColumnType("text");
 07361
 07362                    b.Property<string>("ReasonTitle")
 07363                        .HasMaxLength(500)
 07364                        .HasColumnType("varchar(500)");
 07365
 07366                    b.Property<string>("ReasonTypeId")
 07367                        .HasMaxLength(32)
 07368                        .HasColumnType("varchar(32)");
 07369
 07370                    b.Property<string>("Source")
 07371                        .IsRequired()
 07372                        .HasMaxLength(20)
 07373                        .HasColumnType("varchar(20)");
 07374
 07375                    b.HasKey("Id");
 07376
 07377                    b.HasIndex("EventFingerprint")
 07378                        .IsUnique()
 07379                        .HasDatabaseName("UX_OzonPostingCancellations_EventFingerprint");
 07380
 07381                    b.HasIndex("OzonClientId", "PostingNumber")
 07382                        .HasDatabaseName("IX_OzonPostingCancellations_Client_Posting");
 07383
 07384                    b.ToTable("OzonPostingCancellations");
 07385                });
 7386
 07387            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellationOrder", b =>
 07388                {
 07389                    b.Property<long>("CancellationId")
 07390                        .HasColumnType("bigint");
 07391
 07392                    b.Property<int>("OrderId")
 07393                        .HasColumnType("int");
 07394
 07395                    b.HasKey("CancellationId", "OrderId");
 07396
 07397                    b.HasIndex("OrderId");
 07398
 07399                    b.ToTable("OzonPostingCancellationOrders");
 07400                });
 7401
 07402            modelBuilder.Entity("OzonDomains.Models.OzonPushNotification", b =>
 07403                {
 07404                    b.Property<long>("Id")
 07405                        .ValueGeneratedOnAdd()
 07406                        .HasColumnType("bigint");
 07407
 07408                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07409
 07410                    b.Property<string>("ActionDetails")
 07411                        .HasColumnType("text");
 07412
 07413                    b.Property<string>("ErrorMessage")
 07414                        .HasColumnType("text");
 07415
 07416                    b.Property<string>("MessageType")
 07417                        .IsRequired()
 07418                        .HasMaxLength(50)
 07419                        .HasColumnType("varchar(50)");
 07420
 07421                    b.Property<string>("PostingNumber")
 07422                        .HasMaxLength(100)
 07423                        .HasColumnType("varchar(100)");
 07424
 07425                    b.Property<DateTime?>("ProcessedAt")
 07426                        .HasColumnType("datetime(6)");
 07427
 07428                    b.Property<string>("ProcessingStatus")
 07429                        .IsRequired()
 07430                        .HasMaxLength(20)
 07431                        .HasColumnType("varchar(20)");
 07432
 07433                    b.Property<string>("RawPayload")
 07434                        .IsRequired()
 07435                        .HasColumnType("longtext");
 07436
 07437                    b.Property<DateTime>("ReceivedAt")
 07438                        .HasColumnType("datetime(6)");
 07439
 07440                    b.Property<long?>("SellerId")
 07441                        .HasColumnType("bigint");
 07442
 07443                    b.Property<string>("SourceIpAddress")
 07444                        .HasMaxLength(50)
 07445                        .HasColumnType("varchar(50)");
 07446
 07447                    b.Property<long?>("WarehouseId")
 07448                        .HasColumnType("bigint");
 07449
 07450                    b.HasKey("Id");
 07451
 07452                    b.HasIndex("MessageType")
 07453                        .HasDatabaseName("IX_OzonPushNotifications_MessageType");
 07454
 07455                    b.HasIndex("PostingNumber")
 07456                        .HasDatabaseName("IX_OzonPushNotifications_PostingNumber");
 07457
 07458                    b.HasIndex("ReceivedAt")
 07459                        .HasDatabaseName("IX_OzonPushNotifications_ReceivedAt");
 07460
 07461                    b.HasIndex("SellerId")
 07462                        .HasDatabaseName("IX_OzonPushNotifications_SellerId");
 07463
 07464                    b.ToTable("OzonPushNotifications");
 07465                });
 7466
 07467            modelBuilder.Entity("OzonDomains.Models.Partners.Partner", b =>
 07468                {
 07469                    b.Property<long>("Id")
 07470                        .ValueGeneratedOnAdd()
 07471                        .HasColumnType("bigint");
 07472
 07473                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07474
 07475                    b.Property<DateTime>("CreatedAtUtc")
 07476                        .HasColumnType("datetime(6)");
 07477
 07478                    b.Property<string>("Email")
 07479                        .HasMaxLength(320)
 07480                        .HasColumnType("varchar(320)");
 07481
 07482                    b.Property<int>("FailedLoginCount")
 07483                        .HasColumnType("int");
 07484
 07485                    b.Property<string>("GoogleEmail")
 07486                        .HasMaxLength(320)
 07487                        .HasColumnType("varchar(320)");
 07488
 07489                    b.Property<bool>("IsActive")
 07490                        .HasColumnType("tinyint(1)");
 07491
 07492                    b.Property<DateTime?>("LastLoginAtUtc")
 07493                        .HasColumnType("datetime(6)");
 07494
 07495                    b.Property<DateTime?>("LockoutUntilUtc")
 07496                        .HasColumnType("datetime(6)");
 07497
 07498                    b.Property<string>("Login")
 07499                        .IsRequired()
 07500                        .HasMaxLength(100)
 07501                        .HasColumnType("varchar(100)");
 07502
 07503                    b.Property<string>("Name")
 07504                        .IsRequired()
 07505                        .HasMaxLength(200)
 07506                        .HasColumnType("varchar(200)");
 07507
 07508                    b.Property<int>("NotificationChannels")
 07509                        .HasColumnType("int");
 07510
 07511                    b.Property<string>("NotificationEmail")
 07512                        .HasMaxLength(320)
 07513                        .HasColumnType("varchar(320)");
 07514
 07515                    b.Property<string>("PasswordHash")
 07516                        .IsRequired()
 07517                        .HasMaxLength(500)
 07518                        .HasColumnType("varchar(500)");
 07519
 07520                    b.Property<string>("SecurityStamp")
 07521                        .IsRequired()
 07522                        .HasMaxLength(64)
 07523                        .HasColumnType("varchar(64)");
 07524
 07525                    b.Property<string>("TelegramChatId")
 07526                        .HasMaxLength(64)
 07527                        .HasColumnType("varchar(64)");
 07528
 07529                    b.HasKey("Id");
 07530
 07531                    b.HasIndex("Email")
 07532                        .IsUnique();
 07533
 07534                    b.HasIndex("GoogleEmail");
 07535
 07536                    b.HasIndex("Login")
 07537                        .IsUnique();
 07538
 07539                    b.ToTable("Partners");
 07540                });
 7541
 07542            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerAuditLog", b =>
 07543                {
 07544                    b.Property<long>("Id")
 07545                        .ValueGeneratedOnAdd()
 07546                        .HasColumnType("bigint");
 07547
 07548                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07549
 07550                    b.Property<string>("Action")
 07551                        .IsRequired()
 07552                        .HasMaxLength(64)
 07553                        .HasColumnType("varchar(64)");
 07554
 07555                    b.Property<string>("Actor")
 07556                        .IsRequired()
 07557                        .HasMaxLength(200)
 07558                        .HasColumnType("varchar(200)");
 07559
 07560                    b.Property<int>("ActorKind")
 07561                        .HasColumnType("int");
 07562
 07563                    b.Property<string>("Details")
 07564                        .HasMaxLength(2000)
 07565                        .HasColumnType("varchar(2000)");
 07566
 07567                    b.Property<string>("IpAddress")
 07568                        .HasMaxLength(64)
 07569                        .HasColumnType("varchar(64)");
 07570
 07571                    b.Property<DateTime>("OccurredAtUtc")
 07572                        .HasColumnType("datetime(6)");
 07573
 07574                    b.Property<string>("OrderNumber")
 07575                        .HasMaxLength(100)
 07576                        .HasColumnType("varchar(100)");
 07577
 07578                    b.Property<long?>("PartnerId")
 07579                        .HasColumnType("bigint");
 07580
 07581                    b.Property<bool>("Success")
 07582                        .HasColumnType("tinyint(1)");
 07583
 07584                    b.HasKey("Id");
 07585
 07586                    b.HasIndex("OccurredAtUtc");
 07587
 07588                    b.HasIndex("PartnerId", "OccurredAtUtc");
 07589
 07590                    b.ToTable("PartnerAuditLogs");
 07591                });
 7592
 07593            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerLoginCode", b =>
 07594                {
 07595                    b.Property<long>("Id")
 07596                        .ValueGeneratedOnAdd()
 07597                        .HasColumnType("bigint");
 07598
 07599                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07600
 07601                    b.Property<int>("Attempts")
 07602                        .HasColumnType("int");
 07603
 07604                    b.Property<string>("CodeHash")
 07605                        .IsRequired()
 07606                        .HasMaxLength(200)
 07607                        .HasColumnType("varchar(200)");
 07608
 07609                    b.Property<DateTime?>("ConsumedAtUtc")
 07610                        .HasColumnType("datetime(6)");
 07611
 07612                    b.Property<DateTime>("CreatedAtUtc")
 07613                        .HasColumnType("datetime(6)");
 07614
 07615                    b.Property<DateTime>("ExpiresAtUtc")
 07616                        .HasColumnType("datetime(6)");
 07617
 07618                    b.Property<int>("Kind")
 07619                        .HasColumnType("int");
 07620
 07621                    b.Property<long>("PartnerId")
 07622                        .HasColumnType("bigint");
 07623
 07624                    b.Property<string>("RequestIp")
 07625                        .HasMaxLength(64)
 07626                        .HasColumnType("varchar(64)");
 07627
 07628                    b.HasKey("Id");
 07629
 07630                    b.HasIndex("PartnerId", "CreatedAtUtc");
 07631
 07632                    b.ToTable("PartnerLoginCodes");
 07633                });
 7634
 07635            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerPermission", b =>
 07636                {
 07637                    b.Property<long>("Id")
 07638                        .ValueGeneratedOnAdd()
 07639                        .HasColumnType("bigint");
 07640
 07641                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07642
 07643                    b.Property<int>("Code")
 07644                        .HasColumnType("int");
 07645
 07646                    b.Property<long>("PartnerId")
 07647                        .HasColumnType("bigint");
 07648
 07649                    b.HasKey("Id");
 07650
 07651                    b.HasIndex("PartnerId", "Code")
 07652                        .IsUnique();
 07653
 07654                    b.ToTable("PartnerPermissions");
 07655                });
 7656
 07657            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerRule", b =>
 07658                {
 07659                    b.Property<long>("Id")
 07660                        .ValueGeneratedOnAdd()
 07661                        .HasColumnType("bigint");
 07662
 07663                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07664
 07665                    b.Property<bool>("IsActive")
 07666                        .HasColumnType("tinyint(1)");
 07667
 07668                    b.Property<string>("Name")
 07669                        .IsRequired()
 07670                        .HasMaxLength(200)
 07671                        .HasColumnType("varchar(200)");
 07672
 07673                    b.Property<long>("PartnerId")
 07674                        .HasColumnType("bigint");
 07675
 07676                    b.HasKey("Id");
 07677
 07678                    b.HasIndex("PartnerId");
 07679
 07680                    b.ToTable("PartnerRules");
 07681                });
 7682
 07683            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerRuleCondition", b =>
 07684                {
 07685                    b.Property<long>("Id")
 07686                        .ValueGeneratedOnAdd()
 07687                        .HasColumnType("bigint");
 07688
 07689                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07690
 07691                    b.Property<int>("Field")
 07692                        .HasColumnType("int");
 07693
 07694                    b.Property<long>("RuleId")
 07695                        .HasColumnType("bigint");
 07696
 07697                    b.Property<string>("ValuesJson")
 07698                        .IsRequired()
 07699                        .HasColumnType("longtext");
 07700
 07701                    b.HasKey("Id");
 07702
 07703                    b.HasIndex("RuleId");
 07704
 07705                    b.ToTable("PartnerRuleConditions");
 07706                });
 7707
 07708            modelBuilder.Entity("OzonDomains.Models.PriceIndexes", b =>
 07709                {
 07710                    b.Property<int>("Id")
 07711                        .ValueGeneratedOnAdd()
 07712                        .HasColumnType("int");
 07713
 07714                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07715
 07716                    b.Property<string>("ColorIndex")
 07717                        .IsRequired()
 07718                        .HasMaxLength(20)
 07719                        .HasColumnType("varchar(20)");
 07720
 07721                    b.Property<decimal>("ExternalMinPrice")
 07722                        .HasColumnType("decimal(18,2)");
 07723
 07724                    b.Property<string>("ExternalMinPriceCurrency")
 07725                        .IsRequired()
 07726                        .HasMaxLength(10)
 07727                        .HasColumnType("varchar(10)");
 07728
 07729                    b.Property<decimal>("ExternalPriceIndexValue")
 07730                        .HasColumnType("decimal(18,4)");
 07731
 07732                    b.Property<int>("OrderPriceId")
 07733                        .HasColumnType("int");
 07734
 07735                    b.Property<decimal>("OzonMinPrice")
 07736                        .HasColumnType("decimal(18,2)");
 07737
 07738                    b.Property<string>("OzonMinPriceCurrency")
 07739                        .IsRequired()
 07740                        .HasMaxLength(10)
 07741                        .HasColumnType("varchar(10)");
 07742
 07743                    b.Property<decimal>("OzonPriceIndexValue")
 07744                        .HasColumnType("decimal(18,4)");
 07745
 07746                    b.Property<decimal>("SelfMarketplacesMinPrice")
 07747                        .HasColumnType("decimal(18,2)");
 07748
 07749                    b.Property<string>("SelfMarketplacesMinPriceCurrency")
 07750                        .IsRequired()
 07751                        .HasMaxLength(10)
 07752                        .HasColumnType("varchar(10)");
 07753
 07754                    b.Property<decimal>("SelfMarketplacesPriceIndexValue")
 07755                        .HasColumnType("decimal(18,4)");
 07756
 07757                    b.HasKey("Id");
 07758
 07759                    b.HasIndex("OrderPriceId");
 07760
 07761                    b.ToTable("PriceIndexes");
 07762                });
 7763
 07764            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 07765                {
 07766                    b.Property<int>("Id")
 07767                        .ValueGeneratedOnAdd()
 07768                        .HasColumnType("int");
 07769
 07770                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07771
 07772                    b.Property<string>("Article")
 07773                        .HasMaxLength(255)
 07774                        .HasColumnType("varchar(255)");
 07775
 07776                    b.Property<string>("Barcode")
 07777                        .HasMaxLength(255)
 07778                        .HasColumnType("varchar(255)");
 07779
 07780                    b.Property<string>("CommercialCategory")
 07781                        .HasMaxLength(255)
 07782                        .HasColumnType("varchar(255)");
 07783
 07784                    b.Property<decimal?>("CurrentPriceWithDiscount")
 07785                        .HasColumnType("decimal(65,30)");
 07786
 07787                    b.Property<string>("FboOzonSkuId")
 07788                        .HasMaxLength(50)
 07789                        .HasColumnType("varchar(50)");
 07790
 07791                    b.Property<string>("FbsOzonSkuId")
 07792                        .HasMaxLength(50)
 07793                        .HasColumnType("varchar(50)");
 07794
 07795                    b.Property<string>("ImageUrl")
 07796                        .HasMaxLength(2048)
 07797                        .HasColumnType("varchar(2048)");
 07798
 07799                    b.Property<string>("OzonProductId")
 07800                        .HasMaxLength(50)
 07801                        .HasColumnType("varchar(50)");
 07802
 07803                    b.Property<int?>("ReplacementProductId")
 07804                        .HasColumnType("int");
 07805
 07806                    b.Property<double?>("Volume")
 07807                        .HasColumnType("double");
 07808
 07809                    b.Property<double?>("VolumetricWeight")
 07810                        .HasColumnType("double");
 07811
 07812                    b.Property<decimal?>("Weight")
 07813                        .HasColumnType("decimal(65,30)");
 07814
 07815                    b.HasKey("Id");
 07816
 07817                    b.HasIndex("ReplacementProductId");
 07818
 07819                    b.ToTable("Products");
 07820                });
 7821
 07822            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 07823                {
 07824                    b.Property<long>("Id")
 07825                        .ValueGeneratedOnAdd()
 07826                        .HasColumnType("bigint");
 07827
 07828                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07829
 07830                    b.Property<int?>("ActiveStudioOrderId")
 07831                        .HasColumnType("int");
 07832
 07833                    b.Property<string>("Article")
 07834                        .IsRequired()
 07835                        .HasMaxLength(60)
 07836                        .HasColumnType("varchar(60)");
 07837
 07838                    b.Property<string>("ArticleId")
 07839                        .IsRequired()
 07840                        .HasMaxLength(40)
 07841                        .HasColumnType("varchar(40)");
 07842
 07843                    b.Property<string>("Brand")
 07844                        .IsRequired()
 07845                        .HasMaxLength(100)
 07846                        .HasColumnType("varchar(100)");
 07847
 07848                    b.Property<DateTime>("CreatedAtUtc")
 07849                        .HasColumnType("datetime(6)");
 07850
 07851                    b.Property<string>("CreatedBy")
 07852                        .HasMaxLength(450)
 07853                        .HasColumnType("varchar(450)");
 07854
 07855                    b.Property<string>("CurrencyCode")
 07856                        .IsRequired()
 07857                        .HasMaxLength(8)
 07858                        .HasColumnType("varchar(8)");
 07859
 07860                    b.Property<DateTime?>("DeliveryAtUtc")
 07861                        .HasColumnType("datetime(6)");
 07862
 07863                    b.Property<string>("LastError")
 07864                        .HasMaxLength(1000)
 07865                        .HasColumnType("varchar(1000)");
 07866
 07867                    b.Property<int>("Multi")
 07868                        .HasColumnType("int");
 07869
 07870                    b.Property<string>("PointCode")
 07871                        .HasMaxLength(120)
 07872                        .HasColumnType("varchar(120)");
 07873
 07874                    b.Property<string>("PointName")
 07875                        .HasMaxLength(300)
 07876                        .HasColumnType("varchar(300)");
 07877
 07878                    b.Property<string>("ProductCode")
 07879                        .HasMaxLength(120)
 07880                        .HasColumnType("varchar(120)");
 07881
 07882                    b.Property<string>("ProductName")
 07883                        .HasMaxLength(200)
 07884                        .HasColumnType("varchar(200)");
 07885
 07886                    b.Property<decimal>("Quantity")
 07887                        .HasPrecision(18, 3)
 07888                        .HasColumnType("decimal(18,3)");
 07889
 07890                    b.Property<decimal?>("SourcePrice")
 07891                        .HasPrecision(18, 4)
 07892                        .HasColumnType("decimal(18,4)");
 07893
 07894                    b.Property<string>("Status")
 07895                        .IsRequired()
 07896                        .HasMaxLength(30)
 07897                        .HasColumnType("varchar(30)");
 07898
 07899                    b.Property<int>("StudioOrderId")
 07900                        .HasColumnType("int");
 07901
 07902                    b.Property<string>("TestResultJson")
 07903                        .HasColumnType("longtext");
 07904
 07905                    b.Property<DateTime?>("TestedAtUtc")
 07906                        .HasColumnType("datetime(6)");
 07907
 07908                    b.Property<DateTime>("UpdatedAtUtc")
 07909                        .HasColumnType("datetime(6)");
 07910
 07911                    b.Property<string>("WarehouseId")
 07912                        .IsRequired()
 07913                        .HasMaxLength(40)
 07914                        .HasColumnType("varchar(40)");
 07915
 07916                    b.Property<string>("WarehouseName")
 07917                        .HasMaxLength(160)
 07918                        .HasColumnType("varchar(160)");
 07919
 07920                    b.HasKey("Id");
 07921
 07922                    b.HasIndex("ActiveStudioOrderId")
 07923                        .IsUnique()
 07924                        .HasDatabaseName("UX_ProfitLigaCartItems_ActiveOrder");
 07925
 07926                    b.HasIndex("CreatedAtUtc")
 07927                        .HasDatabaseName("IX_ProfitLigaCartItems_Created");
 07928
 07929                    b.HasIndex("StudioOrderId", "Status")
 07930                        .HasDatabaseName("IX_ProfitLigaCartItems_Order_Status");
 07931
 07932                    b.ToTable("ProfitLigaCartItems");
 07933                });
 7934
 07935            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 07936                {
 07937                    b.Property<long>("Id")
 07938                        .ValueGeneratedOnAdd()
 07939                        .HasColumnType("bigint");
 07940
 07941                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07942
 07943                    b.Property<DateTime>("CreatedAtUtc")
 07944                        .HasColumnType("datetime(6)");
 07945
 07946                    b.Property<string>("CreatedBy")
 07947                        .HasMaxLength(450)
 07948                        .HasColumnType("varchar(450)");
 07949
 07950                    b.Property<string>("DeliveryMethodId")
 07951                        .HasMaxLength(20)
 07952                        .HasColumnType("varchar(20)");
 07953
 07954                    b.Property<string>("DeliveryMethodName")
 07955                        .HasMaxLength(100)
 07956                        .HasColumnType("varchar(100)");
 07957
 07958                    b.Property<string>("OrderNumber")
 07959                        .IsRequired()
 07960                        .HasMaxLength(50)
 07961                        .HasColumnType("varchar(50)");
 07962
 07963                    b.Property<string>("PaymentId")
 07964                        .HasMaxLength(20)
 07965                        .HasColumnType("varchar(20)");
 07966
 07967                    b.Property<string>("PaymentName")
 07968                        .HasMaxLength(100)
 07969                        .HasColumnType("varchar(100)");
 07970
 07971                    b.Property<string>("PointCode")
 07972                        .HasMaxLength(120)
 07973                        .HasColumnType("varchar(120)");
 07974
 07975                    b.Property<string>("PointName")
 07976                        .HasMaxLength(300)
 07977                        .HasColumnType("varchar(300)");
 07978
 07979                    b.Property<string>("RequestJson")
 07980                        .HasColumnType("longtext");
 07981
 07982                    b.Property<string>("ResponseJson")
 07983                        .HasColumnType("longtext");
 07984
 07985                    b.Property<string>("Status")
 07986                        .IsRequired()
 07987                        .HasMaxLength(50)
 07988                        .HasColumnType("varchar(50)");
 07989
 07990                    b.HasKey("Id");
 07991
 07992                    b.HasIndex("OrderNumber")
 07993                        .IsUnique()
 07994                        .HasDatabaseName("UX_ProfitLigaOrders_Number");
 07995
 07996                    b.ToTable("ProfitLigaOrders");
 07997                });
 7998
 07999            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 08000                {
 08001                    b.Property<long>("Id")
 08002                        .ValueGeneratedOnAdd()
 08003                        .HasColumnType("bigint");
 08004
 08005                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08006
 08007                    b.Property<string>("Article")
 08008                        .IsRequired()
 08009                        .HasMaxLength(60)
 08010                        .HasColumnType("varchar(60)");
 08011
 08012                    b.Property<string>("ArticleId")
 08013                        .HasMaxLength(40)
 08014                        .HasColumnType("varchar(40)");
 08015
 08016                    b.Property<string>("Brand")
 08017                        .IsRequired()
 08018                        .HasMaxLength(100)
 08019                        .HasColumnType("varchar(100)");
 08020
 08021                    b.Property<string>("CurrencyCode")
 08022                        .HasMaxLength(8)
 08023                        .HasColumnType("varchar(8)");
 08024
 08025                    b.Property<string>("Error")
 08026                        .HasMaxLength(1000)
 08027                        .HasColumnType("varchar(1000)");
 08028
 08029                    b.Property<string>("ExternalLineId")
 08030                        .HasMaxLength(50)
 08031                        .HasColumnType("varchar(50)");
 08032
 08033                    b.Property<decimal?>("Price")
 08034                        .HasPrecision(18, 4)
 08035                        .HasColumnType("decimal(18,4)");
 08036
 08037                    b.Property<string>("ProductCode")
 08038                        .HasMaxLength(120)
 08039                        .HasColumnType("varchar(120)");
 08040
 08041                    b.Property<long?>("ProfitLigaCartItemId")
 08042                        .HasColumnType("bigint");
 08043
 08044                    b.Property<long>("ProfitLigaOrderId")
 08045                        .HasColumnType("bigint");
 08046
 08047                    b.Property<decimal>("Quantity")
 08048                        .HasPrecision(18, 3)
 08049                        .HasColumnType("decimal(18,3)");
 08050
 08051                    b.Property<int>("StudioOrderId")
 08052                        .HasColumnType("int");
 08053
 08054                    b.HasKey("Id");
 08055
 08056                    b.HasIndex("ProfitLigaCartItemId")
 08057                        .HasDatabaseName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 08058
 08059                    b.HasIndex("ProfitLigaOrderId")
 08060                        .HasDatabaseName("IX_ProfitLigaOrderItems_Order");
 08061
 08062                    b.HasIndex("StudioOrderId")
 08063                        .HasDatabaseName("FK_ProfitLigaOrderItems_Orders_StudioOrderId");
 08064
 08065                    b.ToTable("ProfitLigaOrderItems");
 08066                });
 8067
 08068            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 08069                {
 08070                    b.Property<long>("Id")
 08071                        .ValueGeneratedOnAdd()
 08072                        .HasColumnType("bigint");
 08073
 08074                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08075
 08076                    b.Property<string>("PointCode")
 08077                        .IsRequired()
 08078                        .HasMaxLength(120)
 08079                        .HasColumnType("varchar(120)");
 08080
 08081                    b.Property<string>("PointName")
 08082                        .HasMaxLength(300)
 08083                        .HasColumnType("varchar(300)");
 08084
 08085                    b.Property<int>("ShipmentWarehouseId")
 08086                        .HasColumnType("int");
 08087
 08088                    b.HasKey("Id");
 08089
 08090                    b.HasIndex("ShipmentWarehouseId")
 08091                        .IsUnique()
 08092                        .HasDatabaseName("UX_ProfitLigaPointMappings_Warehouse");
 08093
 08094                    b.ToTable("ProfitLigaPointMappings");
 08095                });
 8096
 08097            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 08098                {
 08099                    b.Property<long>("Id")
 08100                        .ValueGeneratedOnAdd()
 08101                        .HasColumnType("bigint");
 08102
 08103                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08104
 08105                    b.Property<int?>("ActiveStudioOrderId")
 08106                        .HasColumnType("int");
 08107
 08108                    b.Property<string>("AgreementCode")
 08109                        .HasMaxLength(80)
 08110                        .HasColumnType("varchar(80)");
 08111
 08112                    b.Property<string>("Article")
 08113                        .IsRequired()
 08114                        .HasMaxLength(120)
 08115                        .HasColumnType("varchar(120)");
 08116
 08117                    b.Property<string>("Brand")
 08118                        .IsRequired()
 08119                        .HasMaxLength(256)
 08120                        .HasColumnType("varchar(256)");
 08121
 08122                    b.Property<DateTime>("CreatedAtUtc")
 08123                        .HasColumnType("datetime(6)");
 08124
 08125                    b.Property<string>("CreatedBy")
 08126                        .HasMaxLength(450)
 08127                        .HasColumnType("varchar(450)");
 08128
 08129                    b.Property<string>("CurrencyCode")
 08130                        .IsRequired()
 08131                        .HasMaxLength(8)
 08132                        .HasColumnType("varchar(8)");
 08133
 08134                    b.Property<string>("DeliveryAddressCode")
 08135                        .HasMaxLength(80)
 08136                        .HasColumnType("varchar(80)");
 08137
 08138                    b.Property<DateTime?>("DeliveryAtUtc")
 08139                        .HasColumnType("datetime(6)");
 08140
 08141                    b.Property<string>("DeliveryType")
 08142                        .HasMaxLength(40)
 08143                        .HasColumnType("varchar(40)");
 08144
 08145                    b.Property<string>("Direction")
 08146                        .HasMaxLength(120)
 08147                        .HasColumnType("varchar(120)");
 08148
 08149                    b.Property<string>("ExternalBasketItemId")
 08150                        .HasMaxLength(120)
 08151                        .HasColumnType("varchar(120)");
 08152
 08153                    b.Property<string>("LastError")
 08154                        .HasMaxLength(1000)
 08155                        .HasColumnType("varchar(1000)");
 08156
 08157                    b.Property<string>("LocationCode")
 08158                        .HasMaxLength(80)
 08159                        .HasColumnType("varchar(80)");
 08160
 08161                    b.Property<string>("PriceId")
 08162                        .IsRequired()
 08163                        .HasMaxLength(512)
 08164                        .HasColumnType("varchar(512)");
 08165
 08166                    b.Property<string>("ProductName")
 08167                        .HasMaxLength(200)
 08168                        .HasColumnType("varchar(200)");
 08169
 08170                    b.Property<decimal>("Quantity")
 08171                        .HasPrecision(18, 3)
 08172                        .HasColumnType("decimal(18,3)");
 08173
 08174                    b.Property<decimal?>("SourcePrice")
 08175                        .HasPrecision(18, 4)
 08176                        .HasColumnType("decimal(18,4)");
 08177
 08178                    b.Property<string>("Status")
 08179                        .IsRequired()
 08180                        .HasMaxLength(30)
 08181                        .HasColumnType("varchar(30)");
 08182
 08183                    b.Property<int>("StudioOrderId")
 08184                        .HasColumnType("int");
 08185
 08186                    b.Property<DateTime>("UpdatedAtUtc")
 08187                        .HasColumnType("datetime(6)");
 08188
 08189                    b.HasKey("Id");
 08190
 08191                    b.HasIndex("ActiveStudioOrderId")
 08192                        .IsUnique()
 08193                        .HasDatabaseName("UX_ShateMCartItems_ActiveStudioOrderId");
 08194
 08195                    b.HasIndex("StudioOrderId")
 08196                        .HasDatabaseName("FK_ShateMCartItems_Orders_StudioOrderId");
 08197
 08198                    b.HasIndex("ExternalBasketItemId", "Status");
 08199
 08200                    b.ToTable("ShateMCartItems");
 08201                });
 8202
 08203            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 08204                {
 08205                    b.Property<long>("Id")
 08206                        .ValueGeneratedOnAdd()
 08207                        .HasColumnType("bigint");
 08208
 08209                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08210
 08211                    b.Property<string>("AgreementCode")
 08212                        .IsRequired()
 08213                        .HasMaxLength(80)
 08214                        .HasColumnType("varchar(80)");
 08215
 08216                    b.Property<DateTime>("CreatedAtUtc")
 08217                        .HasColumnType("datetime(6)");
 08218
 08219                    b.Property<string>("CreatedBy")
 08220                        .HasMaxLength(450)
 08221                        .HasColumnType("varchar(450)");
 08222
 08223                    b.Property<string>("DeliveryAddressCode")
 08224                        .HasMaxLength(80)
 08225                        .HasColumnType("varchar(80)");
 08226
 08227                    b.Property<string>("DeliveryType")
 08228                        .HasMaxLength(40)
 08229                        .HasColumnType("varchar(40)");
 08230
 08231                    b.Property<string>("ExternalOrderId")
 08232                        .HasMaxLength(120)
 08233                        .HasColumnType("varchar(120)");
 08234
 08235                    b.Property<string>("RequestJson")
 08236                        .HasColumnType("longtext");
 08237
 08238                    b.Property<string>("ResponseJson")
 08239                        .HasColumnType("longtext");
 08240
 08241                    b.Property<string>("Status")
 08242                        .IsRequired()
 08243                        .HasMaxLength(50)
 08244                        .HasColumnType("varchar(50)");
 08245
 08246                    b.HasKey("Id");
 08247
 08248                    b.HasIndex("ExternalOrderId")
 08249                        .IsUnique()
 08250                        .HasDatabaseName("UX_ShateMOrders_ExternalOrderId");
 08251
 08252                    b.ToTable("ShateMOrders");
 08253                });
 8254
 08255            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 08256                {
 08257                    b.Property<long>("Id")
 08258                        .ValueGeneratedOnAdd()
 08259                        .HasColumnType("bigint");
 08260
 08261                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08262
 08263                    b.Property<string>("CurrencyCode")
 08264                        .HasMaxLength(8)
 08265                        .HasColumnType("varchar(8)");
 08266
 08267                    b.Property<string>("Error")
 08268                        .HasMaxLength(1000)
 08269                        .HasColumnType("varchar(1000)");
 08270
 08271                    b.Property<string>("ExternalLineId")
 08272                        .HasMaxLength(120)
 08273                        .HasColumnType("varchar(120)");
 08274
 08275                    b.Property<decimal?>("Price")
 08276                        .HasPrecision(18, 4)
 08277                        .HasColumnType("decimal(18,4)");
 08278
 08279                    b.Property<string>("PriceId")
 08280                        .IsRequired()
 08281                        .HasMaxLength(512)
 08282                        .HasColumnType("varchar(512)");
 08283
 08284                    b.Property<decimal>("Quantity")
 08285                        .HasPrecision(18, 3)
 08286                        .HasColumnType("decimal(18,3)");
 08287
 08288                    b.Property<long?>("ShateMCartItemId")
 08289                        .HasColumnType("bigint");
 08290
 08291                    b.Property<long>("ShateMOrderId")
 08292                        .HasColumnType("bigint");
 08293
 08294                    b.Property<int>("StudioOrderId")
 08295                        .HasColumnType("int");
 08296
 08297                    b.HasKey("Id");
 08298
 08299                    b.HasIndex("ShateMOrderId", "StudioOrderId", "PriceId")
 08300                        .IsUnique()
 08301                        .HasDatabaseName("UX_ShateMOrderItems_Order_StudioOrder_Price");
 08302
 08303                    b.ToTable("ShateMOrderItems");
 08304                });
 8305
 08306            modelBuilder.Entity("OzonDomains.Models.Shipment", b =>
 08307                {
 08308                    b.Property<int>("Id")
 08309                        .ValueGeneratedOnAdd()
 08310                        .HasColumnType("int");
 08311
 08312                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08313
 08314                    b.Property<string>("ShipmentNumber")
 08315                        .IsRequired()
 08316                        .HasMaxLength(50)
 08317                        .HasColumnType("varchar(50)");
 08318
 08319                    b.HasKey("Id");
 08320
 08321                    b.HasIndex("ShipmentNumber")
 08322                        .IsUnique()
 08323                        .HasDatabaseName("UX_Shipments_ShipmentNumber");
 08324
 08325                    b.ToTable("Shipments");
 08326                });
 8327
 08328            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 08329                {
 08330                    b.Property<int>("Id")
 08331                        .ValueGeneratedOnAdd()
 08332                        .HasColumnType("int");
 08333
 08334                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08335
 08336                    b.Property<string>("Conditions")
 08337                        .HasMaxLength(1000)
 08338                        .HasColumnType("text");
 08339
 08340                    b.Property<DateTime>("CreatedAt")
 08341                        .HasColumnType("datetime(6)");
 08342
 08343                    b.Property<string>("Description")
 08344                        .HasMaxLength(500)
 08345                        .HasColumnType("varchar(500)");
 08346
 08347                    b.Property<string>("DisplayName")
 08348                        .HasMaxLength(100)
 08349                        .HasColumnType("varchar(100)");
 08350
 08351                    b.Property<int?>("DisplayOrder")
 08352                        .HasColumnType("int");
 08353
 08354                    b.Property<int>("FromStatusId")
 08355                        .HasColumnType("int");
 08356
 08357                    b.Property<bool>("IsActive")
 08358                        .HasColumnType("tinyint(1)");
 08359
 08360                    b.Property<bool>("IsRepeatable")
 08361                        .HasColumnType("tinyint(1)");
 08362
 08363                    b.Property<string>("SystemName")
 08364                        .HasMaxLength(50)
 08365                        .HasColumnType("varchar(50)");
 08366
 08367                    b.Property<int>("ToStatusId")
 08368                        .HasColumnType("int");
 08369
 08370                    b.Property<int>("TransactionType")
 08371                        .HasColumnType("int");
 08372
 08373                    b.Property<DateTime?>("UpdatedAt")
 08374                        .HasColumnType("datetime(6)");
 08375
 08376                    b.HasKey("Id");
 08377
 08378                    b.HasIndex("DisplayOrder")
 08379                        .HasDatabaseName("IX_StatusTransitions_DisplayOrder");
 08380
 08381                    b.HasIndex("FromStatusId")
 08382                        .HasDatabaseName("IX_StatusTransitions_FromStatusId");
 08383
 08384                    b.HasIndex("IsActive")
 08385                        .HasDatabaseName("IX_StatusTransitions_IsActive");
 08386
 08387                    b.HasIndex("ToStatusId");
 08388
 08389                    b.HasIndex("FromStatusId", "ToStatusId", "TransactionType")
 08390                        .IsUnique()
 08391                        .HasDatabaseName("UQ_StatusTransitions_UniqueTransition");
 08392
 08393                    b.ToTable("StatusTransitions", t =>
 08394                        {
 08395                            t.HasCheckConstraint("CHK_StatusTransitions_DifferentStatuses", "`FromStatusId` <> `ToStatus
 08396                        });
 08397                });
 8398
 08399            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 08400                {
 08401                    b.Property<long>("Id")
 08402                        .ValueGeneratedOnAdd()
 08403                        .HasColumnType("bigint");
 08404
 08405                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08406
 08407                    b.Property<string>("Comment")
 08408                        .HasMaxLength(500)
 08409                        .HasColumnType("text");
 08410
 08411                    b.Property<int>("EntityId")
 08412                        .HasColumnType("int");
 08413
 08414                    b.Property<string>("EntityType")
 08415                        .IsRequired()
 08416                        .HasMaxLength(50)
 08417                        .HasColumnType("varchar(50)");
 08418
 08419                    b.Property<int>("FromStatusId")
 08420                        .HasColumnType("int");
 08421
 08422                    b.Property<string>("Metadata")
 08423                        .HasColumnType("longtext");
 08424
 08425                    b.Property<DateTime>("PerformedAt")
 08426                        .HasColumnType("datetime(6)");
 08427
 08428                    b.Property<int?>("PerformedByUserId")
 08429                        .HasColumnType("int");
 08430
 08431                    b.Property<int?>("StatusTransitionId")
 08432                        .HasColumnType("int");
 08433
 08434                    b.Property<int>("ToStatusId")
 08435                        .HasColumnType("int");
 08436
 08437                    b.Property<int?>("TransactionType")
 08438                        .HasColumnType("int");
 08439
 08440                    b.HasKey("Id");
 08441
 08442                    b.HasIndex("FromStatusId")
 08443                        .HasDatabaseName("IX_FromStatusId");
 08444
 08445                    b.HasIndex("PerformedAt")
 08446                        .HasDatabaseName("IX_PerformedAt");
 08447
 08448                    b.HasIndex("StatusTransitionId")
 08449                        .HasDatabaseName("IX_StatusTransitionId");
 08450
 08451                    b.HasIndex("ToStatusId")
 08452                        .HasDatabaseName("IX_ToStatusId");
 08453
 08454                    b.HasIndex("TransactionType")
 08455                        .HasDatabaseName("IX_TransactionType");
 08456
 08457                    b.HasIndex("EntityType", "EntityId")
 08458                        .HasDatabaseName("IX_Entity");
 08459
 08460                    b.ToTable("StatusTransitionHistory");
 08461                });
 8462
 08463            modelBuilder.Entity("OzonDomains.Models.Supplier", b =>
 08464                {
 08465                    b.Property<int>("Id")
 08466                        .ValueGeneratedOnAdd()
 08467                        .HasColumnType("int");
 08468
 08469                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08470
 08471                    b.Property<int?>("AdditionalTerm")
 08472                        .HasColumnType("int");
 08473
 08474                    b.Property<decimal?>("CostFactor")
 08475                        .HasColumnType("decimal(65,30)");
 08476
 08477                    b.Property<string>("CsvUrl")
 08478                        .HasMaxLength(500)
 08479                        .HasColumnType("varchar(250)");
 08480
 08481                    b.Property<int>("CurrencyCode")
 08482                        .HasColumnType("int");
 08483
 08484                    b.Property<int?>("ExpectedDeliveryHours")
 08485                        .HasColumnType("int");
 08486
 08487                    b.Property<string>("INNCode")
 08488                        .HasMaxLength(20)
 08489                        .HasColumnType("varchar(20)");
 08490
 08491                    b.Property<bool>("IsReSeller")
 08492                        .HasColumnType("tinyint(1)");
 08493
 08494                    b.Property<bool>("IsVatApplicable")
 08495                        .HasColumnType("tinyint(1)");
 08496
 08497                    b.Property<string>("Name")
 08498                        .HasMaxLength(50)
 08499                        .HasColumnType("varchar(50)");
 08500
 08501                    b.Property<string>("Site")
 08502                        .HasMaxLength(500)
 08503                        .HasColumnType("varchar(500)");
 08504
 08505                    b.Property<decimal?>("WeightFactor")
 08506                        .HasColumnType("decimal(65,30)");
 08507
 08508                    b.Property<int>("WeightFactorCurrencyCode")
 08509                        .HasColumnType("int");
 08510
 08511                    b.HasKey("Id");
 08512
 08513                    b.ToTable("Suppliers");
 08514                });
 8515
 08516            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 08517                {
 08518                    b.Property<long>("Id")
 08519                        .ValueGeneratedOnAdd()
 08520                        .HasColumnType("bigint");
 08521
 08522                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08523
 08524                    b.Property<string>("Caption")
 08525                        .HasMaxLength(255)
 08526                        .HasColumnType("varchar(255)");
 08527
 08528                    b.Property<string>("Code")
 08529                        .HasMaxLength(255)
 08530                        .HasColumnType("varchar(255)");
 08531
 08532                    b.Property<string>("CostPrice")
 08533                        .HasMaxLength(80)
 08534                        .HasColumnType("varchar(80)");
 08535
 08536                    b.Property<string>("CostPriceFormatted")
 08537                        .HasMaxLength(80)
 08538                        .HasColumnType("varchar(80)");
 08539
 08540                    b.Property<string>("CurrencyCode")
 08541                        .HasMaxLength(32)
 08542                        .HasColumnType("varchar(32)");
 08543
 08544                    b.Property<string>("DeliveryDays")
 08545                        .HasMaxLength(80)
 08546                        .HasColumnType("varchar(80)");
 08547
 08548                    b.Property<int>("DeliveryDaysMax")
 08549                        .HasColumnType("int");
 08550
 08551                    b.Property<int>("DeliveryDaysMin")
 08552                        .HasColumnType("int");
 08553
 08554                    b.Property<string>("Description")
 08555                        .HasColumnType("longtext");
 08556
 08557                    b.Property<string>("Direction")
 08558                        .HasMaxLength(255)
 08559                        .HasColumnType("varchar(255)");
 08560
 08561                    b.Property<int>("ExtraDeliveryHours")
 08562                        .HasColumnType("int");
 08563
 08564                    b.Property<string>("ItemHash")
 08565                        .HasMaxLength(255)
 08566                        .HasColumnType("varchar(255)");
 08567
 08568                    b.Property<string>("ItemId")
 08569                        .HasMaxLength(255)
 08570                        .HasColumnType("varchar(255)");
 08571
 08572                    b.Property<int>("MinQuantity")
 08573                        .HasColumnType("int");
 08574
 08575                    b.Property<string>("Price")
 08576                        .HasMaxLength(80)
 08577                        .HasColumnType("varchar(80)");
 08578
 08579                    b.Property<string>("PriceDescription")
 08580                        .HasColumnType("longtext");
 08581
 08582                    b.Property<string>("Producer")
 08583                        .HasMaxLength(255)
 08584                        .HasColumnType("varchar(255)");
 08585
 08586                    b.Property<string>("ProviderDataJson")
 08587                        .HasColumnType("longtext");
 08588
 08589                    b.Property<long>("RequestId")
 08590                        .HasColumnType("bigint");
 08591
 08592                    b.Property<string>("Rest")
 08593                        .HasMaxLength(80)
 08594                        .HasColumnType("varchar(80)");
 08595
 08596                    b.Property<string>("SiteUrl")
 08597                        .HasMaxLength(1000)
 08598                        .HasColumnType("varchar(1000)");
 08599
 08600                    b.Property<string>("SourceCurrencyCode")
 08601                        .HasMaxLength(32)
 08602                        .HasColumnType("varchar(32)");
 08603
 08604                    b.Property<decimal?>("SourcePrice")
 08605                        .HasColumnType("decimal(18,4)");
 08606
 08607                    b.Property<string>("Title")
 08608                        .HasMaxLength(255)
 08609                        .HasColumnType("varchar(255)");
 08610
 08611                    b.HasKey("Id");
 08612
 08613                    b.HasIndex("RequestId");
 08614
 08615                    b.ToTable("SupplierQuotationOffers");
 08616                });
 8617
 08618            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 08619                {
 08620                    b.Property<long>("Id")
 08621                        .ValueGeneratedOnAdd()
 08622                        .HasColumnType("bigint");
 08623
 08624                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08625
 08626                    b.Property<string>("Article")
 08627                        .IsRequired()
 08628                        .HasMaxLength(255)
 08629                        .HasColumnType("varchar(255)");
 08630
 08631                    b.Property<string>("Brand")
 08632                        .HasMaxLength(255)
 08633                        .HasColumnType("varchar(255)");
 08634
 08635                    b.Property<DateTime>("CompletedAtUtc")
 08636                        .HasColumnType("datetime(6)");
 08637
 08638                    b.Property<long>("DurationMs")
 08639                        .HasColumnType("bigint");
 08640
 08641                    b.Property<string>("ErrorMessage")
 08642                        .HasMaxLength(2000)
 08643                        .HasColumnType("varchar(2000)");
 08644
 08645                    b.Property<int>("OffersCount")
 08646                        .HasColumnType("int");
 08647
 08648                    b.Property<int>("OrderId")
 08649                        .HasColumnType("int");
 08650
 08651                    b.Property<int>("ProductId")
 08652                        .HasColumnType("int");
 08653
 08654                    b.Property<string>("ProviderKey")
 08655                        .IsRequired()
 08656                        .HasMaxLength(64)
 08657                        .HasColumnType("varchar(64)");
 08658
 08659                    b.Property<string>("RequestParametersJson")
 08660                        .HasColumnType("longtext");
 08661
 08662                    b.Property<DateTime>("RequestedAtUtc")
 08663                        .HasColumnType("datetime(6)");
 08664
 08665                    b.Property<string>("Status")
 08666                        .IsRequired()
 08667                        .HasMaxLength(16)
 08668                        .HasColumnType("varchar(16)");
 08669
 08670                    b.Property<int?>("SupplierId")
 08671                        .HasColumnType("int");
 08672
 08673                    b.HasKey("Id");
 08674
 08675                    b.HasIndex("SupplierId");
 08676
 08677                    b.HasIndex("OrderId", "RequestedAtUtc")
 08678                        .HasDatabaseName("IX_SupplierQuotationRequests_Order_RequestedAtUtc");
 08679
 08680                    b.HasIndex("ProductId", "RequestedAtUtc")
 08681                        .HasDatabaseName("IX_SupplierQuotationRequests_Product_RequestedAtUtc");
 08682
 08683                    b.ToTable("SupplierQuotationRequests");
 08684                });
 8685
 08686            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 08687                {
 08688                    b.Property<long>("Id")
 08689                        .ValueGeneratedOnAdd()
 08690                        .HasColumnType("bigint");
 08691
 08692                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08693
 08694                    b.Property<int?>("ActiveOrderId")
 08695                        .HasColumnType("int");
 08696
 08697                    b.Property<long?>("CartItemId")
 08698                        .HasColumnType("bigint");
 08699
 08700                    b.Property<DateTime>("CreatedAt")
 08701                        .HasColumnType("datetime(6)");
 08702
 08703                    b.Property<string>("CreatedBy")
 08704                        .HasMaxLength(450)
 08705                        .HasColumnType("varchar(450)");
 08706
 08707                    b.Property<int?>("DeliveryDaysMax")
 08708                        .HasColumnType("int");
 08709
 08710                    b.Property<int?>("DeliveryDaysMin")
 08711                        .HasColumnType("int");
 08712
 08713                    b.Property<string>("Direction")
 08714                        .HasMaxLength(255)
 08715                        .HasColumnType("varchar(255)");
 08716
 08717                    b.Property<DateTime?>("ExpectedDeliveryAt")
 08718                        .HasColumnType("datetime(6)");
 08719
 08720                    b.Property<string>("ExternalBasketItemId")
 08721                        .HasMaxLength(50)
 08722                        .HasColumnType("varchar(50)");
 08723
 08724                    b.Property<string>("ExternalLineId")
 08725                        .HasMaxLength(50)
 08726                        .HasColumnType("varchar(50)");
 08727
 08728                    b.Property<string>("ExternalOrderId")
 08729                        .HasMaxLength(50)
 08730                        .HasColumnType("varchar(50)");
 08731
 08732                    b.Property<string>("ExternalOrderNumber")
 08733                        .HasMaxLength(50)
 08734                        .HasColumnType("varchar(50)");
 08735
 08736                    b.Property<DateTime?>("LastStatusChangeAt")
 08737                        .HasColumnType("datetime(6)");
 08738
 08739                    b.Property<DateTime?>("LastSyncedAt")
 08740                        .HasColumnType("datetime(6)");
 08741
 08742                    b.Property<int>("OrderId")
 08743                        .HasColumnType("int");
 08744
 08745                    b.Property<DateTime?>("OrderedAt")
 08746                        .HasColumnType("datetime(6)");
 08747
 08748                    b.Property<string>("ProviderKey")
 08749                        .IsRequired()
 08750                        .HasMaxLength(64)
 08751                        .HasColumnType("varchar(64)");
 08752
 08753                    b.Property<decimal?>("QuantityConfirmed")
 08754                        .HasPrecision(18, 3)
 08755                        .HasColumnType("decimal(18,3)");
 08756
 08757                    b.Property<decimal?>("QuantityOrdered")
 08758                        .HasPrecision(18, 3)
 08759                        .HasColumnType("decimal(18,3)");
 08760
 08761                    b.Property<decimal?>("QuantityRejected")
 08762                        .HasPrecision(18, 3)
 08763                        .HasColumnType("decimal(18,3)");
 08764
 08765                    b.Property<decimal?>("QuantityShipped")
 08766                        .HasPrecision(18, 3)
 08767                        .HasColumnType("decimal(18,3)");
 08768
 08769                    b.Property<string>("Stage")
 08770                        .IsRequired()
 08771                        .HasMaxLength(20)
 08772                        .HasColumnType("varchar(20)");
 08773
 08774                    b.Property<int?>("SupplierId")
 08775                        .HasColumnType("int");
 08776
 08777                    b.Property<int?>("SupplierStatusId")
 08778                        .HasColumnType("int");
 08779
 08780                    b.Property<string>("SyncError")
 08781                        .HasMaxLength(1000)
 08782                        .HasColumnType("varchar(1000)");
 08783
 08784                    b.Property<DateTime>("UpdatedAt")
 08785                        .HasColumnType("datetime(6)");
 08786
 08787                    b.HasKey("Id");
 08788
 08789                    b.HasIndex("ExternalOrderNumber");
 08790
 08791                    b.HasIndex("OrderId");
 08792
 08793                    b.HasIndex("SupplierStatusId");
 08794
 08795                    b.HasIndex("ProviderKey", "ActiveOrderId")
 08796                        .IsUnique()
 08797                        .HasDatabaseName("UX_OrderSupplierStates_Provider_ActiveOrderId");
 08798
 08799                    b.HasIndex("ProviderKey", "Stage", "LastSyncedAt")
 08800                        .HasDatabaseName("IX_OrderSupplierStates_Provider_Stage_LastSyncedAt");
 08801
 08802                    b.ToTable("OrderSupplierStates");
 08803                });
 8804
 08805            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 08806                {
 08807                    b.Property<long>("Id")
 08808                        .ValueGeneratedOnAdd()
 08809                        .HasColumnType("bigint");
 08810
 08811                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08812
 08813                    b.Property<string>("Comment")
 08814                        .HasMaxLength(500)
 08815                        .HasColumnType("varchar(500)");
 08816
 08817                    b.Property<string>("FromStage")
 08818                        .HasMaxLength(20)
 08819                        .HasColumnType("varchar(20)");
 08820
 08821                    b.Property<int?>("FromSupplierStatusId")
 08822                        .HasColumnType("int");
 08823
 08824                    b.Property<int?>("OrderHistoryId")
 08825                        .HasColumnType("int");
 08826
 08827                    b.Property<int>("OrderId")
 08828                        .HasColumnType("int");
 08829
 08830                    b.Property<long>("OrderSupplierStateId")
 08831                        .HasColumnType("bigint");
 08832
 08833                    b.Property<DateTime>("PerformedAt")
 08834                        .HasColumnType("datetime(6)");
 08835
 08836                    b.Property<string>("PerformedBy")
 08837                        .HasMaxLength(450)
 08838                        .HasColumnType("varchar(450)");
 08839
 08840                    b.Property<string>("Source")
 08841                        .IsRequired()
 08842                        .HasMaxLength(30)
 08843                        .HasColumnType("varchar(30)");
 08844
 08845                    b.Property<string>("ToStage")
 08846                        .IsRequired()
 08847                        .HasMaxLength(20)
 08848                        .HasColumnType("varchar(20)");
 08849
 08850                    b.Property<int?>("ToSupplierStatusId")
 08851                        .HasColumnType("int");
 08852
 08853                    b.HasKey("Id");
 08854
 08855                    b.HasIndex("OrderHistoryId");
 08856
 08857                    b.HasIndex("OrderSupplierStateId")
 08858                        .HasDatabaseName("IX_OrderSupplierStateHistory_StateId");
 08859
 08860                    b.HasIndex("OrderId", "PerformedAt");
 08861
 08862                    b.ToTable("OrderSupplierStateHistory");
 08863                });
 8864
 08865            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 08866                {
 08867                    b.Property<int>("Id")
 08868                        .ValueGeneratedOnAdd()
 08869                        .HasColumnType("int");
 08870
 08871                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08872
 08873                    b.Property<DateTime>("CreatedAt")
 08874                        .HasColumnType("datetime(6)");
 08875
 08876                    b.Property<string>("ExternalCode")
 08877                        .HasMaxLength(64)
 08878                        .HasColumnType("varchar(64)");
 08879
 08880                    b.Property<bool>("IsFinal")
 08881                        .HasColumnType("tinyint(1)");
 08882
 08883                    b.Property<string>("Name")
 08884                        .IsRequired()
 08885                        .HasMaxLength(200)
 08886                        .HasColumnType("varchar(200)");
 08887
 08888                    b.Property<string>("ProviderKey")
 08889                        .IsRequired()
 08890                        .HasMaxLength(64)
 08891                        .HasColumnType("varchar(64)");
 08892
 08893                    b.Property<int?>("SortOrder")
 08894                        .HasColumnType("int");
 08895
 08896                    b.Property<int?>("StatusColorId")
 08897                        .HasColumnType("int");
 08898
 08899                    b.Property<string>("StatusKind")
 08900                        .IsRequired()
 08901                        .HasMaxLength(10)
 08902                        .HasColumnType("varchar(10)");
 08903
 08904                    b.Property<int?>("SupplierId")
 08905                        .HasColumnType("int");
 08906
 08907                    b.HasKey("Id");
 08908
 08909                    b.HasIndex("StatusColorId");
 08910
 08911                    b.HasIndex("SupplierId");
 08912
 08913                    b.HasIndex("ProviderKey", "StatusKind", "ExternalCode")
 08914                        .HasDatabaseName("IX_SupplierStatuses_Provider_Kind_ExternalCode");
 08915
 08916                    b.HasIndex("ProviderKey", "StatusKind", "Name")
 08917                        .IsUnique()
 08918                        .HasDatabaseName("UX_SupplierStatuses_Provider_Kind_Name");
 08919
 08920                    b.ToTable("SupplierStatuses");
 08921                });
 8922
 08923            modelBuilder.Entity("OzonDomains.Models.SystemAlertIncident", b =>
 08924                {
 08925                    b.Property<long>("Id")
 08926                        .ValueGeneratedOnAdd()
 08927                        .HasColumnType("bigint");
 08928
 08929                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08930
 08931                    b.Property<DateTime?>("AcknowledgedAtUtc")
 08932                        .HasColumnType("datetime(6)");
 08933
 08934                    b.Property<string>("AcknowledgedBy")
 08935                        .HasMaxLength(100)
 08936                        .HasColumnType("varchar(100)");
 08937
 08938                    b.Property<DateTime?>("ConfirmedAtUtc")
 08939                        .HasColumnType("datetime(6)");
 08940
 08941                    b.Property<int>("ConsecutiveObservations")
 08942                        .HasColumnType("int");
 08943
 08944                    b.Property<string>("Details")
 08945                        .HasMaxLength(1000)
 08946                        .HasColumnType("varchar(1000)");
 08947
 08948                    b.Property<string>("Domain")
 08949                        .IsRequired()
 08950                        .HasMaxLength(64)
 08951                        .HasColumnType("varchar(64)");
 08952
 08953                    b.Property<DateTime>("FirstObservedAtUtc")
 08954                        .HasColumnType("datetime(6)");
 08955
 08956                    b.Property<bool>("IsActive")
 08957                        .HasColumnType("tinyint(1)");
 08958
 08959                    b.Property<string>("Key")
 08960                        .IsRequired()
 08961                        .HasMaxLength(160)
 08962                        .HasColumnType("varchar(160)");
 08963
 08964                    b.Property<DateTime>("LastObservedAtUtc")
 08965                        .HasColumnType("datetime(6)");
 08966
 08967                    b.Property<string>("MutedBy")
 08968                        .HasMaxLength(100)
 08969                        .HasColumnType("varchar(100)");
 08970
 08971                    b.Property<DateTime?>("MutedUntilUtc")
 08972                        .HasColumnType("datetime(6)");
 08973
 08974                    b.Property<int>("OccurrenceCount")
 08975                        .HasColumnType("int");
 08976
 08977                    b.Property<int>("OrderCount")
 08978                        .HasColumnType("int");
 08979
 08980                    b.Property<string>("OrdersJson")
 08981                        .HasColumnType("longtext");
 08982
 08983                    b.Property<DateTime?>("ResolvedAtUtc")
 08984                        .HasColumnType("datetime(6)");
 08985
 08986                    b.Property<string>("Severity")
 08987                        .IsRequired()
 08988                        .HasMaxLength(16)
 08989                        .HasColumnType("varchar(16)");
 08990
 08991                    b.Property<string>("Title")
 08992                        .IsRequired()
 08993                        .HasMaxLength(500)
 08994                        .HasColumnType("varchar(500)");
 08995
 08996                    b.Property<string>("Url")
 08997                        .HasMaxLength(2000)
 08998                        .HasColumnType("varchar(2000)");
 08999
 09000                    b.HasKey("Id");
 09001
 09002                    b.HasIndex("LastObservedAtUtc");
 09003
 09004                    b.HasIndex("Key", "IsActive");
 09005
 09006                    b.ToTable("SystemAlertIncidents");
 09007                });
 9008
 09009            modelBuilder.Entity("OzonDomains.Models.SystemMonitoringSignal", b =>
 09010                {
 09011                    b.Property<long>("Id")
 09012                        .ValueGeneratedOnAdd()
 09013                        .HasColumnType("bigint");
 09014
 09015                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09016
 09017                    b.Property<string>("Message")
 09018                        .HasMaxLength(500)
 09019                        .HasColumnType("varchar(500)");
 09020
 09021                    b.Property<DateTime>("OccurredAtUtc")
 09022                        .HasColumnType("datetime(6)");
 09023
 09024                    b.Property<string>("Outcome")
 09025                        .IsRequired()
 09026                        .HasMaxLength(16)
 09027                        .HasColumnType("varchar(16)");
 09028
 09029                    b.Property<string>("ScopeKey")
 09030                        .HasMaxLength(120)
 09031                        .HasColumnType("varchar(120)");
 09032
 09033                    b.Property<string>("SourceKey")
 09034                        .IsRequired()
 09035                        .HasMaxLength(100)
 09036                        .HasColumnType("varchar(100)");
 09037
 09038                    b.HasKey("Id");
 09039
 09040                    b.HasIndex("SourceKey", "OccurredAtUtc");
 09041
 09042                    b.ToTable("SystemMonitoringSignals");
 09043                });
 9044
 09045            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 09046                {
 09047                    b.Property<int>("Id")
 09048                        .ValueGeneratedOnAdd()
 09049                        .HasColumnType("int");
 09050
 09051                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09052
 09053                    b.Property<string>("Comment")
 09054                        .HasColumnType("longtext");
 09055
 09056                    b.Property<string>("CreateBy")
 09057                        .HasMaxLength(50)
 09058                        .HasColumnType("varchar(50)");
 09059
 09060                    b.Property<DateTime?>("CreatedDateTime")
 09061                        .HasColumnType("datetime(6)");
 09062
 09063                    b.Property<int?>("Type")
 09064                        .HasColumnType("int");
 09065
 09066                    b.HasKey("Id");
 09067
 09068                    b.ToTable("Transactions");
 09069                });
 9070
 09071            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 09072                {
 09073                    b.Property<long>("Id")
 09074                        .ValueGeneratedOnAdd()
 09075                        .HasColumnType("bigint");
 09076
 09077                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09078
 09079                    b.Property<int?>("AccessProfileId")
 09080                        .HasColumnType("int");
 09081
 09082                    b.Property<string>("Comment")
 09083                        .HasMaxLength(1000)
 09084                        .HasColumnType("varchar(1000)");
 09085
 09086                    b.Property<DateTime>("CompletedAtUtc")
 09087                        .HasColumnType("datetime(6)");
 09088
 09089                    b.Property<DateTime>("CreatedAtUtc")
 09090                        .HasColumnType("datetime(6)");
 09091
 09092                    b.Property<int>("DurationSeconds")
 09093                        .HasColumnType("int");
 09094
 09095                    b.Property<int>("OrdersCountFinal")
 09096                        .HasColumnType("int");
 09097
 09098                    b.Property<DateTime>("StartedAtUtc")
 09099                        .HasColumnType("datetime(6)");
 09100
 09101                    b.Property<string>("TrackingKey")
 09102                        .IsRequired()
 09103                        .HasMaxLength(64)
 09104                        .HasColumnType("varchar(64)");
 09105
 09106                    b.Property<long?>("TrackingSessionId")
 09107                        .HasColumnType("bigint");
 09108
 09109                    b.Property<long>("TransactionId")
 09110                        .HasColumnType("bigint");
 09111
 09112                    b.Property<string>("TransactionType")
 09113                        .IsRequired()
 09114                        .HasMaxLength(64)
 09115                        .HasColumnType("varchar(64)");
 09116
 09117                    b.Property<string>("TransactionUrl")
 09118                        .IsRequired()
 09119                        .HasMaxLength(1000)
 09120                        .HasColumnType("varchar(1000)");
 09121
 09122                    b.Property<string>("UserName")
 09123                        .IsRequired()
 09124                        .HasMaxLength(256)
 09125                        .HasColumnType("varchar(256)");
 09126
 09127                    b.HasKey("Id");
 09128
 09129                    b.HasIndex("AccessProfileId")
 09130                        .HasDatabaseName("IX_TransactionTimeTrackingResults_AccessProfileId");
 09131
 09132                    b.HasIndex("TrackingKey")
 09133                        .IsUnique()
 09134                        .HasDatabaseName("UX_TransactionTimeTrackingResults_TrackingKey");
 09135
 09136                    b.HasIndex("TrackingSessionId")
 09137                        .HasDatabaseName("FK_TransactionTimeTrackingResults_SessionId");
 09138
 09139                    b.HasIndex("TransactionId");
 09140
 09141                    b.HasIndex("TransactionType", "CompletedAtUtc");
 09142
 09143                    b.HasIndex("UserName", "CompletedAtUtc");
 09144
 09145                    b.ToTable("TransactionTimeTrackingResults");
 09146                });
 9147
 09148            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingSession", b =>
 09149                {
 09150                    b.Property<long>("Id")
 09151                        .ValueGeneratedOnAdd()
 09152                        .HasColumnType("bigint");
 09153
 09154                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09155
 09156                    b.Property<int?>("AccessProfileId")
 09157                        .HasColumnType("int");
 09158
 09159                    b.Property<string>("ClientIp")
 09160                        .HasMaxLength(64)
 09161                        .HasColumnType("varchar(64)");
 09162
 09163                    b.Property<DateTime?>("CompletedAtUtc")
 09164                        .HasColumnType("datetime(6)");
 09165
 09166                    b.Property<DateTime>("CreatedAtUtc")
 09167                        .HasColumnType("datetime(6)");
 09168
 09169                    b.Property<bool>("IsAbandoned")
 09170                        .HasColumnType("tinyint(1)");
 09171
 09172                    b.Property<bool>("IsCompleted")
 09173                        .HasColumnType("tinyint(1)");
 09174
 09175                    b.Property<DateTime?>("LastSeenAtUtc")
 09176                        .HasColumnType("datetime(6)");
 09177
 09178                    b.Property<string>("OrderIdsJson")
 09179                        .HasColumnType("longtext");
 09180
 09181                    b.Property<int>("OrdersCountInitial")
 09182                        .HasColumnType("int");
 09183
 09184                    b.Property<string>("SourceUrl")
 09185                        .HasMaxLength(1000)
 09186                        .HasColumnType("varchar(1000)");
 09187
 09188                    b.Property<DateTime>("StartedAtUtc")
 09189                        .HasColumnType("datetime(6)");
 09190
 09191                    b.Property<string>("TrackingKey")
 09192                        .IsRequired()
 09193                        .HasMaxLength(64)
 09194                        .HasColumnType("varchar(64)");
 09195
 09196                    b.Property<string>("TransactionType")
 09197                        .IsRequired()
 09198                        .HasMaxLength(64)
 09199                        .HasColumnType("varchar(64)");
 09200
 09201                    b.Property<string>("UserAgent")
 09202                        .HasMaxLength(512)
 09203                        .HasColumnType("varchar(512)");
 09204
 09205                    b.Property<string>("UserName")
 09206                        .IsRequired()
 09207                        .HasMaxLength(256)
 09208                        .HasColumnType("varchar(256)");
 09209
 09210                    b.HasKey("Id");
 09211
 09212                    b.HasIndex("AccessProfileId")
 09213                        .HasDatabaseName("IX_TransactionTimeTrackingSessions_AccessProfileId");
 09214
 09215                    b.HasIndex("TrackingKey")
 09216                        .IsUnique()
 09217                        .HasDatabaseName("UX_TransactionTimeTrackingSessions_TrackingKey");
 09218
 09219                    b.HasIndex("TransactionType", "StartedAtUtc");
 09220
 09221                    b.HasIndex("UserName", "StartedAtUtc");
 09222
 09223                    b.HasIndex("IsCompleted", "IsAbandoned", "StartedAtUtc")
 09224                        .HasDatabaseName("IX_TransactionTimeTrackingSessionsAbandoned_StartedAtUtc");
 09225
 09226                    b.ToTable("TransactionTimeTrackingSessions");
 09227                });
 9228
 09229            modelBuilder.Entity("OzonDomains.Models.TransactionTypeSetting", b =>
 09230                {
 09231                    b.Property<int>("TransactionType")
 09232                        .HasColumnType("int");
 09233
 09234                    b.Property<string>("Color")
 09235                        .HasMaxLength(16)
 09236                        .HasColumnType("varchar(16)");
 09237
 09238                    b.Property<string>("DefaultsJson")
 09239                        .HasColumnType("text");
 09240
 09241                    b.Property<int?>("DisplayOrder")
 09242                        .HasColumnType("int");
 09243
 09244                    b.Property<string>("Group")
 09245                        .HasMaxLength(60)
 09246                        .HasColumnType("varchar(60)");
 09247
 09248                    b.Property<string>("Hint")
 09249                        .HasMaxLength(1000)
 09250                        .HasColumnType("varchar(1000)");
 09251
 09252                    b.Property<string>("Icon")
 09253                        .HasMaxLength(80)
 09254                        .HasColumnType("varchar(80)");
 09255
 09256                    b.Property<bool>("IsEnabled")
 09257                        .HasColumnType("tinyint(1)");
 09258
 09259                    b.Property<string>("ShortName")
 09260                        .HasMaxLength(40)
 09261                        .HasColumnType("varchar(40)");
 09262
 09263                    b.Property<string>("Title")
 09264                        .HasMaxLength(100)
 09265                        .HasColumnType("varchar(100)");
 09266
 09267                    b.Property<DateTime>("UpdatedAt")
 09268                        .HasColumnType("datetime(6)");
 09269
 09270                    b.Property<string>("UpdatedBy")
 09271                        .HasMaxLength(255)
 09272                        .HasColumnType("varchar(255)");
 09273
 09274                    b.Property<bool>("UseGrid")
 09275                        .HasColumnType("tinyint(1)");
 09276
 09277                    b.HasKey("TransactionType");
 09278
 09279                    b.ToTable("TransactionTypeSettings");
 09280                });
 9281
 09282            modelBuilder.Entity("OzonDomains.Models.UserSidebarSetting", b =>
 09283                {
 09284                    b.Property<int>("Id")
 09285                        .ValueGeneratedOnAdd()
 09286                        .HasColumnType("int");
 09287
 09288                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09289
 09290                    b.Property<string>("Key")
 09291                        .IsRequired()
 09292                        .HasMaxLength(64)
 09293                        .HasColumnType("varchar(64)");
 09294
 09295                    b.Property<DateTime>("UpdatedAt")
 09296                        .HasColumnType("datetime(6)");
 09297
 09298                    b.Property<string>("UserId")
 09299                        .IsRequired()
 09300                        .HasMaxLength(255)
 09301                        .HasColumnType("varchar(255)");
 09302
 09303                    b.Property<string>("Value")
 09304                        .IsRequired()
 09305                        .HasColumnType("longtext");
 09306
 09307                    b.Property<long>("Version")
 09308                        .HasColumnType("bigint");
 09309
 09310                    b.HasKey("Id");
 09311
 09312                    b.HasIndex("UserId", "Key")
 09313                        .IsUnique();
 09314
 09315                    b.ToTable("UserSidebarSettings");
 09316                });
 9317
 09318            modelBuilder.Entity("OzonDomains.Models.Warehouse", b =>
 09319                {
 09320                    b.Property<int>("Id")
 09321                        .ValueGeneratedOnAdd()
 09322                        .HasColumnType("int");
 09323
 09324                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09325
 09326                    b.Property<string>("Name")
 09327                        .HasMaxLength(50)
 09328                        .HasColumnType("varchar(50)");
 09329
 09330                    b.HasKey("Id");
 09331
 09332                    b.ToTable("Warehouses");
 09333                });
 9334
 09335            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 09336                {
 09337                    b.Property<int>("Id")
 09338                        .ValueGeneratedOnAdd()
 09339                        .HasColumnType("int");
 09340
 09341                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09342
 09343                    b.Property<string>("BitrixWarehouseName")
 09344                        .IsRequired()
 09345                        .HasColumnType("varchar(200)");
 09346
 09347                    b.Property<string>("DeliveryType")
 09348                        .HasColumnType("varchar(100)");
 09349
 09350                    b.Property<int?>("OzonClientId")
 09351                        .HasColumnType("int");
 09352
 09353                    b.Property<string>("OzonWarehouseId")
 09354                        .HasColumnType("varchar(32)");
 09355
 09356                    b.Property<string>("OzonWarehouseName")
 09357                        .IsRequired()
 09358                        .HasColumnType("varchar(200)");
 09359
 09360                    b.Property<int>("Priority")
 09361                        .HasColumnType("int");
 09362
 09363                    b.Property<string>("ReturnBitrixWarehouseName")
 09364                        .HasColumnType("varchar(255)");
 09365
 09366                    b.Property<int?>("SupplierId")
 09367                        .HasColumnType("int");
 09368
 09369                    b.Property<string>("TransitBitrixWarehouseName")
 09370                        .HasColumnType("varchar(255)");
 09371
 09372                    b.HasKey("Id");
 09373
 09374                    b.HasIndex("OzonClientId")
 09375                        .HasDatabaseName("FK_WarehouseMapping_OzonClient");
 09376
 09377                    b.HasIndex("SupplierId");
 09378
 09379                    b.ToTable("WarehouseMapping");
 09380                });
 9381
 09382            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 09383                {
 09384                    b.Property<long>("Id")
 09385                        .ValueGeneratedOnAdd()
 09386                        .HasColumnType("bigint");
 09387
 09388                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09389
 09390                    b.Property<decimal?>("AccountingPriceUnit")
 09391                        .HasColumnType("decimal(18,4)");
 09392
 09393                    b.Property<string>("Article")
 09394                        .HasMaxLength(128)
 09395                        .HasColumnType("varchar(128)");
 09396
 09397                    b.Property<decimal?>("B1Qty")
 09398                        .HasColumnType("decimal(18,4)");
 09399
 09400                    b.Property<decimal?>("B2Qty")
 09401                        .HasColumnType("decimal(18,4)");
 09402
 09403                    b.Property<decimal?>("C0")
 09404                        .HasColumnType("decimal(18,4)");
 09405
 09406                    b.Property<decimal?>("C1ExistMinus5Percent")
 09407                        .HasColumnType("decimal(18,4)");
 09408
 09409                    b.Property<decimal?>("C1PercentToC0")
 09410                        .HasColumnType("decimal(18,4)");
 09411
 09412                    b.Property<decimal?>("ExistPrice")
 09413                        .HasColumnType("decimal(18,4)");
 09414
 09415                    b.Property<decimal?>("M1Qty")
 09416                        .HasColumnType("decimal(18,4)");
 09417
 09418                    b.Property<decimal?>("M2Qty")
 09419                        .HasColumnType("decimal(18,4)");
 09420
 09421                    b.Property<decimal?>("M3Qty")
 09422                        .HasColumnType("decimal(18,4)");
 09423
 09424                    b.Property<string>("Manufacturer")
 09425                        .HasMaxLength(255)
 09426                        .HasColumnType("varchar(255)");
 09427
 09428                    b.Property<decimal?>("PriceDiffAccountingMinusSale")
 09429                        .HasColumnType("decimal(18,4)");
 09430
 09431                    b.Property<string>("ProductName")
 09432                        .HasMaxLength(512)
 09433                        .HasColumnType("varchar(512)");
 09434
 09435                    b.Property<string>("RowKey")
 09436                        .IsRequired()
 09437                        .HasMaxLength(128)
 09438                        .HasColumnType("varchar(128)");
 09439
 09440                    b.Property<string>("SaleFlag")
 09441                        .HasMaxLength(128)
 09442                        .HasColumnType("varchar(128)");
 09443
 09444                    b.Property<decimal?>("SalePriceUnit")
 09445                        .HasColumnType("decimal(18,4)");
 09446
 09447                    b.Property<int>("SourceRowNumber")
 09448                        .HasColumnType("int");
 09449
 09450                    b.Property<string>("SourceSheetName")
 09451                        .IsRequired()
 09452                        .HasMaxLength(128)
 09453                        .HasColumnType("varchar(128)");
 09454
 09455                    b.Property<string>("SourceType")
 09456                        .IsRequired()
 09457                        .HasMaxLength(32)
 09458                        .HasColumnType("varchar(32)");
 09459
 09460                    b.Property<DateTime>("SourceUpdatedAtUtc")
 09461                        .HasColumnType("datetime(6)");
 09462
 09463                    b.Property<decimal?>("StockAmountByC0")
 09464                        .HasColumnType("decimal(18,4)");
 09465
 09466                    b.Property<long>("SyncRunId")
 09467                        .HasColumnType("bigint");
 09468
 09469                    b.Property<DateTime>("SyncedAtUtc")
 09470                        .HasColumnType("datetime(6)");
 09471
 09472                    b.Property<decimal?>("TotalCost")
 09473                        .HasColumnType("decimal(18,4)");
 09474
 09475                    b.Property<decimal?>("UnitCost")
 09476                        .HasColumnType("decimal(18,4)");
 09477
 09478                    b.Property<string>("Warehouse")
 09479                        .HasMaxLength(32)
 09480                        .HasColumnType("varchar(32)");
 09481
 09482                    b.HasKey("Id");
 09483
 09484                    b.HasIndex("Article");
 09485
 09486                    b.HasIndex("Manufacturer");
 09487
 09488                    b.HasIndex("RowKey")
 09489                        .IsUnique()
 09490                        .HasDatabaseName("UX_WarehouseStockSnapshot_RowKey");
 09491
 09492                    b.HasIndex("SyncRunId")
 09493                        .HasDatabaseName("FK_WarehouseStockSnapshot_SyncRun");
 09494
 09495                    b.HasIndex("SyncedAtUtc");
 09496
 09497                    b.HasIndex("Warehouse");
 09498
 09499                    b.ToTable("WarehouseStockSnapshot");
 09500                });
 9501
 09502            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 09503                {
 09504                    b.Property<long>("Id")
 09505                        .ValueGeneratedOnAdd()
 09506                        .HasColumnType("bigint");
 09507
 09508                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09509
 09510                    b.Property<DateTime?>("CompletedAtUtc")
 09511                        .HasColumnType("datetime(6)");
 09512
 09513                    b.Property<DateTime>("CreatedAtUtc")
 09514                        .HasColumnType("datetime(6)");
 09515
 09516                    b.Property<string>("ErrorMessage")
 09517                        .HasColumnType("text");
 09518
 09519                    b.Property<int>("RowsRead")
 09520                        .HasColumnType("int");
 09521
 09522                    b.Property<int>("RowsSaved")
 09523                        .HasColumnType("int");
 09524
 09525                    b.Property<string>("SourceFileName")
 09526                        .HasMaxLength(255)
 09527                        .HasColumnType("varchar(255)");
 09528
 09529                    b.Property<string>("SourceType")
 09530                        .IsRequired()
 09531                        .HasMaxLength(32)
 09532                        .HasColumnType("varchar(32)");
 09533
 09534                    b.Property<DateTime>("StartedAtUtc")
 09535                        .HasColumnType("datetime(6)");
 09536
 09537                    b.Property<string>("Status")
 09538                        .IsRequired()
 09539                        .HasMaxLength(32)
 09540                        .HasColumnType("varchar(32)");
 09541
 09542                    b.Property<string>("TriggeredBy")
 09543                        .HasMaxLength(255)
 09544                        .HasColumnType("varchar(255)");
 09545
 09546                    b.HasKey("Id");
 09547
 09548                    b.HasIndex("StartedAtUtc");
 09549
 09550                    b.HasIndex("Status");
 09551
 09552                    b.ToTable("WarehouseStockSyncRuns");
 09553                });
 9554
 09555            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 09556                {
 09557                    b.Property<long>("Id")
 09558                        .ValueGeneratedOnAdd()
 09559                        .HasColumnType("bigint");
 09560
 09561                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09562
 09563                    b.Property<int?>("ActiveStudioOrderId")
 09564                        .HasColumnType("int");
 09565
 09566                    b.Property<string>("Article")
 09567                        .IsRequired()
 09568                        .HasMaxLength(80)
 09569                        .HasColumnType("varchar(80)");
 09570
 09571                    b.Property<string>("Brand")
 09572                        .IsRequired()
 09573                        .HasMaxLength(120)
 09574                        .HasColumnType("varchar(120)");
 09575
 09576                    b.Property<string>("CodeDocB")
 09577                        .IsRequired()
 09578                        .HasMaxLength(40)
 09579                        .HasColumnType("varchar(40)");
 09580
 09581                    b.Property<long>("CodeOrder")
 09582                        .HasColumnType("bigint");
 09583
 09584                    b.Property<int>("CodeRegion")
 09585                        .HasColumnType("int");
 09586
 09587                    b.Property<DateTime>("CreatedAtUtc")
 09588                        .HasColumnType("datetime(6)");
 09589
 09590                    b.Property<string>("CreatedBy")
 09591                        .HasMaxLength(450)
 09592                        .HasColumnType("varchar(450)");
 09593
 09594                    b.Property<int>("DeliveryDays")
 09595                        .HasColumnType("int");
 09596
 09597                    b.Property<int?>("ExternalStatusCode")
 09598                        .HasColumnType("int");
 09599
 09600                    b.Property<string>("ExternalStatusName")
 09601                        .HasMaxLength(120)
 09602                        .HasColumnType("varchar(120)");
 09603
 09604                    b.Property<string>("LastError")
 09605                        .HasMaxLength(1000)
 09606                        .HasColumnType("varchar(1000)");
 09607
 09608                    b.Property<decimal?>("MinSumOrder")
 09609                        .HasPrecision(18, 4)
 09610                        .HasColumnType("decimal(18,4)");
 09611
 09612                    b.Property<int>("MinimumQuantity")
 09613                        .HasColumnType("int");
 09614
 09615                    b.Property<DateTime?>("OrderedAtUtc")
 09616                        .HasColumnType("datetime(6)");
 09617
 09618                    b.Property<string>("ProductName")
 09619                        .HasMaxLength(255)
 09620                        .HasColumnType("varchar(255)");
 09621
 09622                    b.Property<string>("ProviderKey")
 09623                        .IsRequired()
 09624                        .HasMaxLength(64)
 09625                        .HasColumnType("varchar(64)");
 09626
 09627                    b.Property<int?>("QtyMax")
 09628                        .HasColumnType("int");
 09629
 09630                    b.Property<int>("Quantity")
 09631                        .HasColumnType("int");
 09632
 09633                    b.Property<string>("SellerLocation")
 09634                        .HasMaxLength(200)
 09635                        .HasColumnType("varchar(200)");
 09636
 09637                    b.Property<string>("SellerName")
 09638                        .HasMaxLength(200)
 09639                        .HasColumnType("varchar(200)");
 09640
 09641                    b.Property<string>("SellerUserKey")
 09642                        .HasMaxLength(255)
 09643                        .HasColumnType("varchar(255)");
 09644
 09645                    b.Property<decimal?>("SourcePrice")
 09646                        .HasPrecision(18, 4)
 09647                        .HasColumnType("decimal(18,4)");
 09648
 09649                    b.Property<string>("Status")
 09650                        .IsRequired()
 09651                        .HasMaxLength(20)
 09652                        .HasColumnType("varchar(20)");
 09653
 09654                    b.Property<int>("StudioOrderId")
 09655                        .HasColumnType("int");
 09656
 09657                    b.Property<DateTime?>("TestedAtUtc")
 09658                        .HasColumnType("datetime(6)");
 09659
 09660                    b.Property<DateTime>("UpdatedAtUtc")
 09661                        .HasColumnType("datetime(6)");
 09662
 09663                    b.HasKey("Id");
 09664
 09665                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 09666                        .IsUnique();
 09667
 09668                    b.HasIndex("ProviderKey", "CodeOrder");
 09669
 09670                    b.HasIndex("StudioOrderId", "Status");
 09671
 09672                    b.ToTable("ZZapCartItems");
 09673                });
 9674
 09675            modelBuilder.Entity("OzonDomains.StatusColor", b =>
 09676                {
 09677                    b.Property<int>("Id")
 09678                        .ValueGeneratedOnAdd()
 09679                        .HasColumnType("int");
 09680
 09681                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09682
 09683                    b.Property<string>("ColorCode")
 09684                        .IsRequired()
 09685                        .HasMaxLength(20)
 09686                        .HasColumnType("varchar(20)");
 09687
 09688                    b.HasKey("Id");
 09689
 09690                    b.ToTable("StatusColors");
 09691                });
 9692
 09693            modelBuilder.Entity("OzonRepositories.Data.Bitrix.PriceHistory", b =>
 09694                {
 09695                    b.Property<int>("Id")
 09696                        .ValueGeneratedOnAdd()
 09697                        .HasColumnType("int");
 09698
 09699                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09700
 09701                    b.Property<string>("Article")
 09702                        .IsRequired()
 09703                        .HasColumnType("varchar(100)");
 09704
 09705                    b.Property<string>("Author")
 09706                        .HasColumnType("varchar(100)");
 09707
 09708                    b.Property<int>("BitrixId")
 09709                        .HasColumnType("int");
 09710
 09711                    b.Property<DateTime>("CreateDateTime")
 09712                        .HasColumnType("datetime");
 09713
 09714                    b.Property<string>("Currency")
 09715                        .HasColumnType("varchar(10)");
 09716
 09717                    b.Property<decimal>("PriceValue")
 09718                        .HasColumnType("decimal(18,2)");
 09719
 09720                    b.Property<decimal>("RegistrationPrice")
 09721                        .HasColumnType("decimal(18,2)");
 09722
 09723                    b.Property<string>("ValueSource")
 09724                        .HasColumnType("varchar(100)");
 09725
 09726                    b.HasKey("Id");
 09727
 09728                    b.HasIndex("Article")
 09729                        .HasDatabaseName("IX_PriceHistories_Article");
 09730
 09731                    b.HasIndex("BitrixId")
 09732                        .HasDatabaseName("IX_PriceHistories_BitrixId");
 09733
 09734                    b.HasIndex("CreateDateTime")
 09735                        .HasDatabaseName("IX_PriceHistories_CreateDateTime");
 09736
 09737                    b.HasIndex("Article", "CreateDateTime")
 09738                        .HasDatabaseName("IX_PriceHistories_Article_CreateDateTime");
 09739
 09740                    b.ToTable("PriceHistories");
 09741                });
 9742
 09743            modelBuilder.Entity("AccessProfileDataScopeSet", b =>
 09744                {
 09745                    b.HasOne("OzonDomains.Models.AccessControl.AccessProfile", null)
 09746                        .WithMany()
 09747                        .HasForeignKey("AccessProfilesId")
 09748                        .OnDelete(DeleteBehavior.Cascade)
 09749                        .IsRequired();
 09750
 09751                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", null)
 09752                        .WithMany()
 09753                        .HasForeignKey("DataScopeSetsId")
 09754                        .OnDelete(DeleteBehavior.Cascade)
 09755                        .IsRequired();
 09756                });
 9757
 09758            modelBuilder.Entity("OzonDomains.Delivery", b =>
 09759                {
 09760                    b.HasOne("OzonDomains.Models.DeliveryProvider", "Provider")
 09761                        .WithMany("Deliveries")
 09762                        .HasForeignKey("ProviderId")
 09763                        .OnDelete(DeleteBehavior.Cascade)
 09764                        .IsRequired()
 09765                        .HasConstraintName("Deliveries_ibfk_1");
 09766
 09767                    b.Navigation("Provider");
 09768                });
 9769
 09770            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSetItem", b =>
 09771                {
 09772                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", "DataScopeSet")
 09773                        .WithMany("Items")
 09774                        .HasForeignKey("DataScopeSetId")
 09775                        .OnDelete(DeleteBehavior.Cascade)
 09776                        .IsRequired()
 09777                        .HasConstraintName("FK_DataScopeSetItems_DataScopeSets");
 09778
 09779                    b.Navigation("DataScopeSet");
 09780                });
 9781
 09782            modelBuilder.Entity("OzonDomains.Models.ApiSupplierSettings", b =>
 09783                {
 09784                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 09785                        .WithMany()
 09786                        .HasForeignKey("SupplierId")
 09787                        .OnDelete(DeleteBehavior.SetNull);
 09788
 09789                    b.Navigation("Supplier");
 09790                });
 9791
 09792            modelBuilder.Entity("OzonDomains.Models.ApiSupplierWarehouse", b =>
 09793                {
 09794                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 09795                        .WithMany()
 09796                        .HasForeignKey("WarehouseId")
 09797                        .OnDelete(DeleteBehavior.Cascade)
 09798                        .IsRequired()
 09799                        .HasConstraintName("FK_ApiSupplierWarehouses_Warehouses");
 09800
 09801                    b.Navigation("Warehouse");
 09802                });
 9803
 09804            modelBuilder.Entity("OzonDomains.Models.AppStatus", b =>
 09805                {
 09806                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 09807                        .WithMany()
 09808                        .HasForeignKey("StatusColorId")
 09809                        .HasConstraintName("FK_AppStatuses_StatusColors");
 09810
 09811                    b.Navigation("StatusColor");
 09812                });
 9813
 09814            modelBuilder.Entity("OzonDomains.Models.ArmtekCartItem", b =>
 09815                {
 09816                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09817                        .WithMany()
 09818                        .HasForeignKey("StudioOrderId")
 09819                        .OnDelete(DeleteBehavior.Restrict)
 09820                        .IsRequired();
 09821
 09822                    b.Navigation("StudioOrder");
 09823                });
 9824
 09825            modelBuilder.Entity("OzonDomains.Models.ArmtekDeliveryAddressMapping", b =>
 09826                {
 09827                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09828                        .WithMany()
 09829                        .HasForeignKey("ShipmentWarehouseId")
 09830                        .OnDelete(DeleteBehavior.Restrict)
 09831                        .IsRequired();
 09832
 09833                    b.Navigation("ShipmentWarehouse");
 09834                });
 9835
 09836            modelBuilder.Entity("OzonDomains.Models.ArmtekOrderItem", b =>
 09837                {
 09838                    b.HasOne("OzonDomains.Models.ArmtekCartItem", "ArmtekCartItem")
 09839                        .WithMany()
 09840                        .HasForeignKey("ArmtekCartItemId")
 09841                        .OnDelete(DeleteBehavior.SetNull)
 09842                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekCartItems");
 09843
 09844                    b.HasOne("OzonDomains.Models.ArmtekOrder", "ArmtekOrder")
 09845                        .WithMany("Items")
 09846                        .HasForeignKey("ArmtekOrderId")
 09847                        .OnDelete(DeleteBehavior.Cascade)
 09848                        .IsRequired()
 09849                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekOrders");
 09850
 09851                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09852                        .WithMany()
 09853                        .HasForeignKey("StudioOrderId")
 09854                        .OnDelete(DeleteBehavior.Restrict)
 09855                        .IsRequired();
 09856
 09857                    b.Navigation("ArmtekCartItem");
 09858
 09859                    b.Navigation("ArmtekOrder");
 09860
 09861                    b.Navigation("StudioOrder");
 09862                });
 9863
 09864            modelBuilder.Entity("OzonDomains.Models.AssemblyListRunItem", b =>
 09865                {
 09866                    b.HasOne("OzonDomains.Models.AssemblyListRun", "Run")
 09867                        .WithMany("Items")
 09868                        .HasForeignKey("RunId")
 09869                        .OnDelete(DeleteBehavior.Cascade)
 09870                        .IsRequired();
 09871
 09872                    b.Navigation("Run");
 09873                });
 9874
 09875            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 09876                {
 09877                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Page")
 09878                        .WithMany("Fields")
 09879                        .HasForeignKey("PageId")
 09880                        .OnDelete(DeleteBehavior.SetNull);
 09881
 09882                    b.Navigation("Page");
 09883                });
 9884
 09885            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 09886                {
 09887                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Parent")
 09888                        .WithMany("Children")
 09889                        .HasForeignKey("ParentId")
 09890                        .OnDelete(DeleteBehavior.Restrict);
 09891
 09892                    b.Navigation("Parent");
 09893                });
 9894
 09895            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleDataScope", b =>
 09896                {
 09897                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09898                        .WithMany("DataScopes")
 09899                        .HasForeignKey("AppRoleId")
 09900                        .OnDelete(DeleteBehavior.Cascade)
 09901                        .IsRequired();
 09902
 09903                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09904                        .WithMany("RoleLinks")
 09905                        .HasForeignKey("DataScopeId")
 09906                        .OnDelete(DeleteBehavior.Cascade)
 09907                        .IsRequired();
 09908
 09909                    b.Navigation("AppRole");
 09910
 09911                    b.Navigation("DataScope");
 09912                });
 9913
 09914            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleFieldPermission", b =>
 09915                {
 09916                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09917                        .WithMany("RolePermissions")
 09918                        .HasForeignKey("AppFieldId")
 09919                        .OnDelete(DeleteBehavior.Cascade)
 09920                        .IsRequired();
 09921
 09922                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09923                        .WithMany("FieldPermissions")
 09924                        .HasForeignKey("AppRoleId")
 09925                        .OnDelete(DeleteBehavior.Cascade)
 09926                        .IsRequired();
 09927
 09928                    b.Navigation("AppField");
 09929
 09930                    b.Navigation("AppRole");
 09931                });
 9932
 09933            modelBuilder.Entity("OzonDomains.Models.Authorization.RolePagePermission", b =>
 09934                {
 09935                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09936                        .WithMany("RolePermissions")
 09937                        .HasForeignKey("AppPageId")
 09938                        .OnDelete(DeleteBehavior.Cascade)
 09939                        .IsRequired();
 09940
 09941                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09942                        .WithMany("PagePermissions")
 09943                        .HasForeignKey("AppRoleId")
 09944                        .OnDelete(DeleteBehavior.Cascade)
 09945                        .IsRequired();
 09946
 09947                    b.Navigation("AppPage");
 09948
 09949                    b.Navigation("AppRole");
 09950                });
 9951
 09952            modelBuilder.Entity("OzonDomains.Models.Authorization.UserAppRole", b =>
 09953                {
 09954                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09955                        .WithMany("UserLinks")
 09956                        .HasForeignKey("AppRoleId")
 09957                        .OnDelete(DeleteBehavior.Cascade)
 09958                        .IsRequired();
 09959
 09960                    b.Navigation("AppRole");
 09961                });
 9962
 09963            modelBuilder.Entity("OzonDomains.Models.Authorization.UserDataScope", b =>
 09964                {
 09965                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09966                        .WithMany("UserLinks")
 09967                        .HasForeignKey("DataScopeId")
 09968                        .OnDelete(DeleteBehavior.Cascade)
 09969                        .IsRequired();
 09970
 09971                    b.Navigation("DataScope");
 09972                });
 9973
 09974            modelBuilder.Entity("OzonDomains.Models.Authorization.UserFieldOverride", b =>
 09975                {
 09976                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09977                        .WithMany("UserOverrides")
 09978                        .HasForeignKey("AppFieldId")
 09979                        .OnDelete(DeleteBehavior.Cascade)
 09980                        .IsRequired();
 09981
 09982                    b.Navigation("AppField");
 09983                });
 9984
 09985            modelBuilder.Entity("OzonDomains.Models.Authorization.UserPageOverride", b =>
 09986                {
 09987                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09988                        .WithMany("UserOverrides")
 09989                        .HasForeignKey("AppPageId")
 09990                        .OnDelete(DeleteBehavior.Cascade)
 09991                        .IsRequired();
 09992
 09993                    b.Navigation("AppPage");
 09994                });
 9995
 09996            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 09997                {
 09998                    b.HasOne("OzonDomains.Models.BackgroundJobSchedule", "Schedule")
 09999                        .WithMany("Executions")
 010000                        .HasForeignKey("ScheduleId")
 010001                        .HasConstraintName("fk_execution_schedule");
 010002
 010003                    b.Navigation("Schedule");
 010004                });
 10005
 010006            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 010007                {
 010008                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010009                        .WithMany()
 010010                        .HasForeignKey("OzonClientId")
 010011                        .HasConstraintName("fk_schedule_ozon_client");
 010012
 010013                    b.Navigation("OzonClient");
 010014                });
 10015
 010016            modelBuilder.Entity("OzonDomains.Models.BackgroundJobStep", b =>
 010017                {
 010018                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 010019                        .WithMany("Steps")
 010020                        .HasForeignKey("ExecutionId")
 010021                        .OnDelete(DeleteBehavior.Cascade)
 010022                        .IsRequired()
 010023                        .HasConstraintName("fk_step_execution");
 010024
 010025                    b.Navigation("Execution");
 010026                });
 10027
 010028            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 010029                {
 010030                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 010031                        .WithMany("OrderMatches")
 010032                        .HasForeignKey("ExecutionId")
 010033                        .OnDelete(DeleteBehavior.Cascade)
 010034                        .IsRequired()
 010035                        .HasConstraintName("fk_match_execution");
 010036
 010037                    b.HasOne("OzonDomains.Models.Order", "Order")
 010038                        .WithMany()
 010039                        .HasForeignKey("OrderId")
 010040                        .HasConstraintName("fk_match_order");
 010041
 010042                    b.HasOne("OzonDomains.Models.BackgroundReportLoad", "ReportLoad")
 010043                        .WithMany()
 010044                        .HasForeignKey("ReportLoadId")
 010045                        .HasConstraintName("fk_match_report");
 010046
 010047                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 010048                        .WithMany()
 010049                        .HasForeignKey("StepId")
 010050                        .HasConstraintName("fk_match_step");
 010051
 010052                    b.Navigation("Execution");
 010053
 010054                    b.Navigation("Order");
 010055
 010056                    b.Navigation("ReportLoad");
 010057
 010058                    b.Navigation("Step");
 010059                });
 10060
 010061            modelBuilder.Entity("OzonDomains.Models.BackgroundReportLoad", b =>
 010062                {
 010063                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 010064                        .WithMany("ReportLoads")
 010065                        .HasForeignKey("ExecutionId")
 010066                        .OnDelete(DeleteBehavior.Cascade)
 010067                        .IsRequired()
 010068                        .HasConstraintName("fk_report_execution");
 010069
 010070                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010071                        .WithMany()
 010072                        .HasForeignKey("OzonClientId")
 010073                        .OnDelete(DeleteBehavior.Cascade)
 010074                        .IsRequired()
 010075                        .HasConstraintName("fk_report_ozon_client");
 010076
 010077                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 010078                        .WithMany()
 010079                        .HasForeignKey("StepId")
 010080                        .HasConstraintName("fk_report_step");
 010081
 010082                    b.Navigation("Execution");
 010083
 010084                    b.Navigation("OzonClient");
 010085
 010086                    b.Navigation("Step");
 010087                });
 10088
 010089            modelBuilder.Entity("OzonDomains.Models.BackgroundTransactionResult", b =>
 010090                {
 010091                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 010092                        .WithMany("TransactionResults")
 010093                        .HasForeignKey("ExecutionId")
 010094                        .OnDelete(DeleteBehavior.Cascade)
 010095                        .IsRequired()
 010096                        .HasConstraintName("fk_result_execution");
 010097
 010098                    b.HasOne("OzonDomains.Models.Order", "Order")
 010099                        .WithMany()
 010100                        .HasForeignKey("OrderId")
 010101                        .OnDelete(DeleteBehavior.Cascade)
 010102                        .IsRequired()
 010103                        .HasConstraintName("fk_result_order");
 010104
 010105                    b.HasOne("OzonDomains.Models.BackgroundOrderMatch", "OrderMatch")
 010106                        .WithMany("TransactionResults")
 010107                        .HasForeignKey("OrderMatchId")
 010108                        .HasConstraintName("fk_result_match");
 010109
 010110                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 010111                        .WithMany()
 010112                        .HasForeignKey("StepId")
 010113                        .HasConstraintName("fk_result_step");
 010114
 010115                    b.HasOne("OzonDomains.Models.Transaction", "Transaction")
 010116                        .WithMany()
 010117                        .HasForeignKey("TransactionId")
 010118                        .HasConstraintName("fk_result_transaction");
 010119
 010120                    b.Navigation("Execution");
 010121
 010122                    b.Navigation("Order");
 010123
 010124                    b.Navigation("OrderMatch");
 010125
 010126                    b.Navigation("Step");
 010127
 010128                    b.Navigation("Transaction");
 010129                });
 10130
 010131            modelBuilder.Entity("OzonDomains.Models.BergCartItem", b =>
 010132                {
 010133                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010134                        .WithMany()
 010135                        .HasForeignKey("StudioOrderId")
 010136                        .OnDelete(DeleteBehavior.Restrict)
 010137                        .IsRequired();
 010138
 010139                    b.Navigation("StudioOrder");
 010140                });
 10141
 010142            modelBuilder.Entity("OzonDomains.Models.BergDeliveryAddressMapping", b =>
 010143                {
 010144                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010145                        .WithMany()
 010146                        .HasForeignKey("ShipmentWarehouseId")
 010147                        .OnDelete(DeleteBehavior.Restrict)
 010148                        .IsRequired()
 010149                        .HasConstraintName("FK_BergDeliveryAddressMappings_Warehouses");
 010150
 010151                    b.Navigation("ShipmentWarehouse");
 010152                });
 10153
 010154            modelBuilder.Entity("OzonDomains.Models.BergOrderItem", b =>
 010155                {
 010156                    b.HasOne("OzonDomains.Models.BergCartItem", null)
 010157                        .WithMany()
 010158                        .HasForeignKey("BergCartItemId")
 010159                        .OnDelete(DeleteBehavior.SetNull)
 010160                        .HasConstraintName("FK_BergOrderItems_BergCartItems");
 010161
 010162                    b.HasOne("OzonDomains.Models.BergOrder", "BergOrder")
 010163                        .WithMany("Items")
 010164                        .HasForeignKey("BergOrderId")
 010165                        .OnDelete(DeleteBehavior.Cascade)
 010166                        .IsRequired()
 010167                        .HasConstraintName("FK_BergOrderItems_BergOrders");
 010168
 010169                    b.HasOne("OzonDomains.Models.Order", null)
 010170                        .WithMany()
 010171                        .HasForeignKey("StudioOrderId")
 010172                        .OnDelete(DeleteBehavior.Restrict)
 010173                        .IsRequired();
 010174
 010175                    b.Navigation("BergOrder");
 010176                });
 10177
 010178            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveItem", b =>
 010179                {
 010180                    b.HasOne("OzonDomains.Models.BitrixStockArchiveExecution", "Execution")
 010181                        .WithMany("Items")
 010182                        .HasForeignKey("ExecutionId")
 010183                        .OnDelete(DeleteBehavior.Cascade)
 010184                        .IsRequired()
 010185                        .HasConstraintName("fk_archive_item_execution");
 010186
 010187                    b.Navigation("Execution");
 010188                });
 10189
 010190            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 010191                {
 010192                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010193                        .WithMany()
 010194                        .HasForeignKey("OzonClientId")
 010195                        .OnDelete(DeleteBehavior.Cascade)
 010196                        .IsRequired();
 010197
 010198                    b.Navigation("OzonClient");
 010199                });
 10200
 010201            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoScheduleRun", b =>
 010202                {
 010203                    b.HasOne("OzonDomains.Models.BitrixStockAutoSchedule", "Schedule")
 010204                        .WithMany("Runs")
 010205                        .HasForeignKey("ScheduleId")
 010206                        .OnDelete(DeleteBehavior.Cascade)
 010207                        .IsRequired()
 010208                        .HasConstraintName("fk_auto_run_schedule");
 010209
 010210                    b.Navigation("Schedule");
 010211                });
 10212
 010213            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearItem", b =>
 010214                {
 010215                    b.HasOne("OzonDomains.Models.BitrixStockClearExecution", "Execution")
 010216                        .WithMany("Items")
 010217                        .HasForeignKey("ExecutionId")
 010218                        .OnDelete(DeleteBehavior.Cascade)
 010219                        .IsRequired()
 010220                        .HasConstraintName("fk_clear_item_execution");
 010221
 010222                    b.Navigation("Execution");
 010223                });
 10224
 010225            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushItem", b =>
 010226                {
 010227                    b.HasOne("OzonDomains.Models.BitrixStockPushExecution", "Execution")
 010228                        .WithMany("Items")
 010229                        .HasForeignKey("ExecutionId")
 010230                        .OnDelete(DeleteBehavior.Cascade)
 010231                        .IsRequired()
 010232                        .HasConstraintName("fk_push_item_execution");
 010233
 010234                    b.Navigation("Execution");
 010235                });
 10236
 010237            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveItem", b =>
 010238                {
 010239                    b.HasOne("OzonDomains.Models.BitrixStockUnarchiveExecution", "Execution")
 010240                        .WithMany("Items")
 010241                        .HasForeignKey("ExecutionId")
 010242                        .OnDelete(DeleteBehavior.Cascade)
 010243                        .IsRequired()
 010244                        .HasConstraintName("fk_unarchive_item_execution");
 010245
 010246                    b.Navigation("Execution");
 010247                });
 10248
 010249            modelBuilder.Entity("OzonDomains.Models.ClientStatus", b =>
 010250                {
 010251                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010252                        .WithMany()
 010253                        .HasForeignKey("StatusColorId")
 010254                        .HasConstraintName("FK_clientstatuses_StatusColors_StatusColorId");
 010255
 010256                    b.Navigation("StatusColor");
 010257                });
 10258
 010259            modelBuilder.Entity("OzonDomains.Models.ColumnMapping", b =>
 010260                {
 010261                    b.HasOne("OzonDomains.Models.OzonClient", "SelectedClient")
 010262                        .WithMany()
 010263                        .HasForeignKey("SelectedClientId");
 010264
 010265                    b.HasOne("OzonDomains.Models.Manufacturer", "SelectedManufacturer")
 010266                        .WithMany()
 010267                        .HasForeignKey("SelectedManufacturerId");
 010268
 010269                    b.HasOne("OzonDomains.Models.Supplier", "SelectedSupplier")
 010270                        .WithMany()
 010271                        .HasForeignKey("SelectedSupplierId");
 010272
 010273                    b.HasOne("OzonDomains.Models.Warehouse", "SelectedWarehouse")
 010274                        .WithMany()
 010275                        .HasForeignKey("SelectedWarehouseId");
 010276
 010277                    b.Navigation("SelectedClient");
 010278
 010279                    b.Navigation("SelectedManufacturer");
 010280
 010281                    b.Navigation("SelectedSupplier");
 010282
 010283                    b.Navigation("SelectedWarehouse");
 010284                });
 10285
 010286            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 010287                {
 010288                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 010289                        .WithMany("Attachments")
 010290                        .HasForeignKey("EmailMessageInboxId")
 010291                        .OnDelete(DeleteBehavior.Cascade)
 010292                        .IsRequired()
 010293                        .HasConstraintName("FK_EmailAttachmentInboxes_EmailMessageInboxes");
 010294
 010295                    b.Navigation("EmailMessage");
 010296                });
 10297
 010298            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentProcessingResult", b =>
 010299                {
 010300                    b.HasOne("OzonDomains.Models.EmailAttachmentInbox", "Attachment")
 010301                        .WithMany("ProcessingResults")
 010302                        .HasForeignKey("EmailAttachmentInboxId")
 010303                        .OnDelete(DeleteBehavior.Cascade)
 010304                        .IsRequired()
 010305                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailAttachmentInboxes");
 010306
 010307                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 010308                        .WithMany()
 010309                        .HasForeignKey("EmailMessageInboxId")
 010310                        .OnDelete(DeleteBehavior.Cascade)
 010311                        .IsRequired()
 010312                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailMessageInboxes");
 010313
 010314                    b.HasOne("OzonDomains.Models.EmailRoutingRule", "Rule")
 010315                        .WithMany()
 010316                        .HasForeignKey("EmailRoutingRuleId")
 010317                        .OnDelete(DeleteBehavior.SetNull)
 010318                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailRoutingRules");
 010319
 010320                    b.Navigation("Attachment");
 010321
 010322                    b.Navigation("EmailMessage");
 010323
 010324                    b.Navigation("Rule");
 010325                });
 10326
 010327            modelBuilder.Entity("OzonDomains.Models.ExcludedArticle", b =>
 010328                {
 010329                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010330                        .WithMany()
 010331                        .HasForeignKey("OzonClientId")
 010332                        .OnDelete(DeleteBehavior.Cascade)
 010333                        .IsRequired()
 010334                        .HasConstraintName("FK_ExcludedArticles_OzonClients");
 010335
 010336                    b.Navigation("OzonClient");
 010337                });
 10338
 010339            modelBuilder.Entity("OzonDomains.Models.FavoritPartsCartItem", b =>
 010340                {
 010341                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010342                        .WithMany()
 010343                        .HasForeignKey("StudioOrderId")
 010344                        .OnDelete(DeleteBehavior.Restrict)
 010345                        .IsRequired();
 010346
 010347                    b.Navigation("StudioOrder");
 010348                });
 10349
 010350            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrderItem", b =>
 010351                {
 010352                    b.HasOne("OzonDomains.Models.FavoritPartsCartItem", "FavoritPartsCartItem")
 010353                        .WithMany()
 010354                        .HasForeignKey("FavoritPartsCartItemId")
 010355                        .OnDelete(DeleteBehavior.SetNull)
 010356                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsCartItems");
 010357
 010358                    b.HasOne("OzonDomains.Models.FavoritPartsOrder", "FavoritPartsOrder")
 010359                        .WithMany("Items")
 010360                        .HasForeignKey("FavoritPartsOrderId")
 010361                        .OnDelete(DeleteBehavior.Cascade)
 010362                        .IsRequired()
 010363                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsOrders");
 010364
 010365                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010366                        .WithMany()
 010367                        .HasForeignKey("StudioOrderId")
 010368                        .OnDelete(DeleteBehavior.Restrict)
 010369                        .IsRequired();
 010370
 010371                    b.Navigation("FavoritPartsCartItem");
 010372
 010373                    b.Navigation("FavoritPartsOrder");
 010374
 010375                    b.Navigation("StudioOrder");
 010376                });
 10377
 010378            modelBuilder.Entity("OzonDomains.Models.FidStatItem", b =>
 010379                {
 010380                    b.HasOne("OzonDomains.Models.FidStatSnapshot", "Snapshot")
 010381                        .WithMany("Items")
 010382                        .HasForeignKey("SnapshotId")
 010383                        .OnDelete(DeleteBehavior.Cascade)
 010384                        .IsRequired()
 010385                        .HasConstraintName("FK_FidStatItems_Snapshot");
 010386
 010387                    b.Navigation("Snapshot");
 010388                });
 10389
 010390            modelBuilder.Entity("OzonDomains.Models.ForumAutoCartItem", b =>
 010391                {
 010392                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010393                        .WithMany()
 010394                        .HasForeignKey("StudioOrderId")
 010395                        .OnDelete(DeleteBehavior.Restrict)
 010396                        .IsRequired();
 010397
 010398                    b.Navigation("StudioOrder");
 010399                });
 10400
 010401            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrderItem", b =>
 010402                {
 010403                    b.HasOne("OzonDomains.Models.ForumAutoCartItem", "ForumAutoCartItem")
 010404                        .WithMany()
 010405                        .HasForeignKey("ForumAutoCartItemId")
 010406                        .OnDelete(DeleteBehavior.SetNull)
 010407                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoCartItems");
 010408
 010409                    b.HasOne("OzonDomains.Models.ForumAutoOrder", "ForumAutoOrder")
 010410                        .WithMany("Items")
 010411                        .HasForeignKey("ForumAutoOrderId")
 010412                        .OnDelete(DeleteBehavior.Cascade)
 010413                        .IsRequired()
 010414                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoOrders");
 010415
 010416                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010417                        .WithMany()
 010418                        .HasForeignKey("StudioOrderId")
 010419                        .OnDelete(DeleteBehavior.Restrict)
 010420                        .IsRequired();
 010421
 010422                    b.Navigation("ForumAutoCartItem");
 010423
 010424                    b.Navigation("ForumAutoOrder");
 010425
 010426                    b.Navigation("StudioOrder");
 010427                });
 10428
 010429            modelBuilder.Entity("OzonDomains.Models.InterpartsWarehouseLogin", b =>
 010430                {
 010431                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 010432                        .WithMany()
 010433                        .HasForeignKey("WarehouseId")
 010434                        .OnDelete(DeleteBehavior.Cascade)
 010435                        .IsRequired();
 010436
 010437                    b.Navigation("Warehouse");
 010438                });
 10439
 010440            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedRow", b =>
 010441                {
 010442                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 010443                        .WithMany("MatchedRows")
 010444                        .HasForeignKey("MatchedResultId");
 010445                });
 10446
 010447            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchingColumn", b =>
 010448                {
 010449                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 010450                        .WithMany("MatchedColumns")
 010451                        .HasForeignKey("MatchedResultId");
 010452
 010453                    b.HasOne("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", null)
 010454                        .WithMany("MatchingColumns")
 010455                        .HasForeignKey("SavedMatchingColumnId");
 010456                });
 10457
 010458            modelBuilder.Entity("OzonDomains.Models.MikadoCartItem", b =>
 010459                {
 010460                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010461                        .WithMany()
 010462                        .HasForeignKey("StudioOrderId")
 010463                        .OnDelete(DeleteBehavior.Restrict)
 010464                        .IsRequired()
 010465                        .HasConstraintName("FK_MikadoCartItems_Orders");
 010466
 010467                    b.Navigation("StudioOrder");
 010468                });
 10469
 010470            modelBuilder.Entity("OzonDomains.Models.MlAutoCartItem", b =>
 010471                {
 010472                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010473                        .WithMany()
 010474                        .HasForeignKey("StudioOrderId")
 010475                        .OnDelete(DeleteBehavior.Cascade)
 010476                        .IsRequired()
 010477                        .HasConstraintName("FK_MlAutoCartItems_Orders");
 010478
 010479                    b.Navigation("StudioOrder");
 010480                });
 10481
 010482            modelBuilder.Entity("OzonDomains.Models.MlAutoDeliveryAddressMapping", b =>
 010483                {
 010484                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010485                        .WithMany()
 010486                        .HasForeignKey("ShipmentWarehouseId")
 010487                        .OnDelete(DeleteBehavior.Restrict)
 010488                        .IsRequired()
 010489                        .HasConstraintName("FK_MlAutoDeliveryAddressMappings_Warehouses");
 010490
 010491                    b.Navigation("ShipmentWarehouse");
 010492                });
 10493
 010494            modelBuilder.Entity("OzonDomains.Models.MlAutoOrderItem", b =>
 010495                {
 010496                    b.HasOne("OzonDomains.Models.MlAutoOrder", "MlAutoOrder")
 010497                        .WithMany("Items")
 010498                        .HasForeignKey("MlAutoOrderId")
 010499                        .OnDelete(DeleteBehavior.Cascade)
 010500                        .IsRequired()
 010501                        .HasConstraintName("FK_MlAutoOrderItems_Orders");
 010502
 010503                    b.Navigation("MlAutoOrder");
 010504                });
 10505
 010506            modelBuilder.Entity("OzonDomains.Models.MlAutoRuCartItem", b =>
 010507                {
 010508                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010509                        .WithMany()
 010510                        .HasForeignKey("StudioOrderId")
 010511                        .OnDelete(DeleteBehavior.Cascade)
 010512                        .IsRequired()
 010513                        .HasConstraintName("FK_MlAutoRuCartItems_Orders");
 010514
 010515                    b.Navigation("StudioOrder");
 010516                });
 10517
 010518            modelBuilder.Entity("OzonDomains.Models.MlAutoRuDeliveryAddressMapping", b =>
 010519                {
 010520                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010521                        .WithMany()
 010522                        .HasForeignKey("ShipmentWarehouseId")
 010523                        .OnDelete(DeleteBehavior.Restrict)
 010524                        .IsRequired()
 010525                        .HasConstraintName("FK_MlAutoRuDeliveryAddressMappings_Warehouses");
 010526
 010527                    b.Navigation("ShipmentWarehouse");
 010528                });
 10529
 010530            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrderItem", b =>
 010531                {
 010532                    b.HasOne("OzonDomains.Models.MlAutoRuOrder", "MlAutoRuOrder")
 010533                        .WithMany("Items")
 010534                        .HasForeignKey("MlAutoRuOrderId")
 010535                        .OnDelete(DeleteBehavior.Cascade)
 010536                        .IsRequired()
 010537                        .HasConstraintName("FK_MlAutoRuOrderItems_Orders");
 010538
 010539                    b.Navigation("MlAutoRuOrder");
 010540                });
 10541
 010542            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraCartItem", b =>
 010543                {
 010544                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010545                        .WithMany()
 010546                        .HasForeignKey("StudioOrderId")
 010547                        .OnDelete(DeleteBehavior.Restrict)
 010548                        .IsRequired()
 010549                        .HasConstraintName("FK_MoskvorechieIstraCartItems_StudioOrder");
 010550
 010551                    b.Navigation("StudioOrder");
 010552                });
 10553
 010554            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrderItem", b =>
 010555                {
 010556                    b.HasOne("OzonDomains.Models.MoskvorechieIstraOrder", "MoskvorechieIstraOrder")
 010557                        .WithMany("Items")
 010558                        .HasForeignKey("MoskvorechieIstraOrderId")
 010559                        .OnDelete(DeleteBehavior.Cascade)
 010560                        .IsRequired()
 010561                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_Order");
 010562
 010563                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010564                        .WithMany()
 010565                        .HasForeignKey("StudioOrderId")
 010566                        .OnDelete(DeleteBehavior.Restrict)
 010567                        .IsRequired()
 010568                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_StudioOrder");
 010569
 010570                    b.Navigation("MoskvorechieIstraOrder");
 010571
 010572                    b.Navigation("StudioOrder");
 010573                });
 10574
 010575            modelBuilder.Entity("OzonDomains.Models.MotexCartItem", b =>
 010576                {
 010577                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010578                        .WithMany()
 010579                        .HasForeignKey("StudioOrderId")
 010580                        .OnDelete(DeleteBehavior.Restrict)
 010581                        .IsRequired();
 010582
 010583                    b.Navigation("StudioOrder");
 010584                });
 10585
 010586            modelBuilder.Entity("OzonDomains.Models.MotexOrderItem", b =>
 010587                {
 010588                    b.HasOne("OzonDomains.Models.MotexOrder", "MotexOrder")
 010589                        .WithMany("Items")
 010590                        .HasForeignKey("MotexOrderId")
 010591                        .OnDelete(DeleteBehavior.Cascade)
 010592                        .IsRequired();
 010593
 010594                    b.Navigation("MotexOrder");
 010595                });
 10596
 010597            modelBuilder.Entity("OzonDomains.Models.NikeiCartItem", b =>
 010598                {
 010599                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010600                        .WithMany()
 010601                        .HasForeignKey("StudioOrderId")
 010602                        .OnDelete(DeleteBehavior.Restrict)
 010603                        .IsRequired();
 010604
 010605                    b.Navigation("StudioOrder");
 010606                });
 10607
 010608            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 010609                {
 010610                    b.HasOne("OzonDomains.Models.AppStatus", "AppStatus")
 010611                        .WithMany()
 010612                        .HasForeignKey("AppStatusId");
 010613
 010614                    b.HasOne("OzonDomains.Models.ClientStatus", "ClientStatus")
 010615                        .WithMany()
 010616                        .HasForeignKey("ClientStatusId");
 010617
 010618                    b.HasOne("OzonDomains.Delivery", "Delivery")
 010619                        .WithMany("Orders")
 010620                        .HasForeignKey("DeliveryId");
 010621
 010622                    b.HasOne("OzonDomains.Models.EtProducer", "EtProducer")
 010623                        .WithMany()
 010624                        .HasForeignKey("EtProducerId")
 010625                        .OnDelete(DeleteBehavior.Restrict);
 010626
 010627                    b.HasOne("OzonDomains.Models.OrdersFileMetadata", "ExcelFileData")
 010628                        .WithMany()
 010629                        .HasForeignKey("ExcelFileDataId");
 010630
 010631                    b.HasOne("OzonDomains.Models.Manufacturer", "Manufacturer")
 010632                        .WithMany()
 010633                        .HasForeignKey("ManufacturerId");
 010634
 010635                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010636                        .WithMany()
 010637                        .HasForeignKey("OzonClientId");
 010638
 010639                    b.HasOne("OzonDomains.Models.Product", "ProductInfo")
 010640                        .WithMany()
 010641                        .HasForeignKey("ProductInfoId");
 010642
 010643                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010644                        .WithMany()
 010645                        .HasForeignKey("ShipmentWarehouseId");
 010646
 010647                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010648                        .WithMany()
 010649                        .HasForeignKey("SupplierId");
 010650
 010651                    b.HasOne("OzonDomains.Models.Transaction", null)
 010652                        .WithMany("Orders")
 010653                        .HasForeignKey("TransactionId");
 010654
 010655                    b.HasOne("OzonDomains.Models.Currency", "Сurrency")
 010656                        .WithMany()
 010657                        .HasForeignKey("СurrencyId");
 010658
 010659                    b.Navigation("AppStatus");
 010660
 010661                    b.Navigation("ClientStatus");
 010662
 010663                    b.Navigation("Delivery");
 010664
 010665                    b.Navigation("EtProducer");
 010666
 010667                    b.Navigation("ExcelFileData");
 010668
 010669                    b.Navigation("Manufacturer");
 010670
 010671                    b.Navigation("OzonClient");
 010672
 010673                    b.Navigation("ProductInfo");
 010674
 010675                    b.Navigation("ShipmentWarehouse");
 010676
 010677                    b.Navigation("Supplier");
 010678
 010679                    b.Navigation("Сurrency");
 010680                });
 10681
 010682            modelBuilder.Entity("OzonDomains.Models.OrderArchive", b =>
 010683                {
 010684                    b.HasOne("OzonDomains.Models.Order", "Order")
 010685                        .WithOne("OrderArchive")
 010686                        .HasForeignKey("OzonDomains.Models.OrderArchive", "OrderId")
 010687                        .OnDelete(DeleteBehavior.Cascade)
 010688                        .IsRequired();
 010689
 010690                    b.Navigation("Order");
 010691                });
 10692
 010693            modelBuilder.Entity("OzonDomains.Models.OrderCalculationSnapshot", b =>
 010694                {
 010695                    b.HasOne("OzonDomains.Models.Order", "Order")
 010696                        .WithMany()
 010697                        .HasForeignKey("OrderId")
 010698                        .OnDelete(DeleteBehavior.Cascade)
 010699                        .IsRequired();
 010700
 010701                    b.Navigation("Order");
 010702                });
 10703
 010704            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 010705                {
 010706                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010707                        .WithMany()
 010708                        .HasForeignKey("StatusColorId")
 010709                        .HasConstraintName("FK_ItemStatuses_StatusColors");
 010710
 010711                    b.Navigation("StatusColor");
 010712                });
 10713
 010714            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 010715                {
 010716                    b.HasOne("OzonDomains.Models.OrderCarts.CartStatus", "CartStatus")
 010717                        .WithMany("OrderCarts")
 010718                        .HasForeignKey("CartStatusId")
 010719                        .HasConstraintName("ordercarts_ibfk_1");
 010720
 010721                    b.Navigation("CartStatus");
 010722                });
 10723
 010724            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderItem", b =>
 010725                {
 010726                    b.HasOne("OzonDomains.Models.OrderCarts.ItemStatus", "ItemStatus")
 010727                        .WithMany("OrderItems")
 010728                        .HasForeignKey("ItemStatusId")
 010729                        .HasConstraintName("orderitems_ibfk_1");
 010730
 010731                    b.HasOne("OzonDomains.Models.OrderCarts.OrderCart", "OrderCart")
 010732                        .WithMany("OrderItems")
 010733                        .HasForeignKey("OrderCartId")
 010734                        .OnDelete(DeleteBehavior.Cascade)
 010735                        .IsRequired()
 010736                        .HasConstraintName("orderitems_ibfk_2");
 010737
 010738                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010739                        .WithMany()
 010740                        .HasForeignKey("StudioOrderId");
 010741
 010742                    b.Navigation("ItemStatus");
 010743
 010744                    b.Navigation("OrderCart");
 010745
 010746                    b.Navigation("StudioOrder");
 010747                });
 10748
 010749            modelBuilder.Entity("OzonDomains.Models.OrderControlRule", b =>
 010750                {
 010751                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010752                        .WithMany()
 010753                        .HasForeignKey("TargetAppRoleId")
 010754                        .OnDelete(DeleteBehavior.Restrict)
 010755                        .IsRequired();
 010756
 010757                    b.Navigation("TargetAppRole");
 010758                });
 10759
 010760            modelBuilder.Entity("OzonDomains.Models.OrderControlTask", b =>
 010761                {
 010762                    b.HasOne("OzonDomains.Models.Order", "Order")
 010763                        .WithMany()
 010764                        .HasForeignKey("OrderId")
 010765                        .OnDelete(DeleteBehavior.Cascade)
 010766                        .IsRequired();
 010767
 010768                    b.HasOne("OzonDomains.Models.OrderControlRule", "Rule")
 010769                        .WithMany()
 010770                        .HasForeignKey("RuleId")
 010771                        .OnDelete(DeleteBehavior.Restrict)
 010772                        .IsRequired();
 010773
 010774                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010775                        .WithMany()
 010776                        .HasForeignKey("TargetAppRoleId")
 010777                        .OnDelete(DeleteBehavior.Restrict)
 010778                        .IsRequired();
 010779
 010780                    b.Navigation("Order");
 010781
 010782                    b.Navigation("Rule");
 010783
 010784                    b.Navigation("TargetAppRole");
 010785                });
 10786
 010787            modelBuilder.Entity("OzonDomains.Models.OrderControlTaskEvent", b =>
 010788                {
 010789                    b.HasOne("OzonDomains.Models.OrderControlTask", "Task")
 010790                        .WithMany()
 010791                        .HasForeignKey("TaskId")
 010792                        .OnDelete(DeleteBehavior.Cascade)
 010793                        .IsRequired();
 010794
 010795                    b.Navigation("Task");
 010796                });
 10797
 010798            modelBuilder.Entity("OzonDomains.Models.OrderExtension", b =>
 010799                {
 010800                    b.HasOne("OzonDomains.Models.Order", "Order")
 010801                        .WithMany("OrderExtensions")
 010802                        .HasForeignKey("OrderId")
 010803                        .OnDelete(DeleteBehavior.Cascade)
 010804                        .IsRequired()
 010805                        .HasConstraintName("FK_OrderExtensions_Orders");
 010806
 010807                    b.Navigation("Order");
 010808                });
 10809
 010810            modelBuilder.Entity("OzonDomains.Models.OrderExtraExpense", b =>
 010811                {
 010812                    b.HasOne("OzonDomains.Models.ExpenseType", "ExpenseType")
 010813                        .WithMany("OrderExtraExpenses")
 010814                        .HasForeignKey("ExpenseTypeId")
 010815                        .OnDelete(DeleteBehavior.Cascade)
 010816                        .IsRequired()
 010817                        .HasConstraintName("FK_OrderExtraExpenses_ExpenseType");
 010818
 010819                    b.HasOne("OzonDomains.Models.Order", "Order")
 010820                        .WithMany("ExtraExpenses")
 010821                        .HasForeignKey("OrderId")
 010822                        .OnDelete(DeleteBehavior.Cascade)
 010823                        .IsRequired()
 010824                        .HasConstraintName("FK_OrderExtraExpenses_Order");
 010825
 010826                    b.Navigation("ExpenseType");
 010827
 010828                    b.Navigation("Order");
 010829                });
 10830
 010831            modelBuilder.Entity("OzonDomains.Models.OrderHistory", b =>
 010832                {
 010833                    b.HasOne("OzonDomains.Models.Order", "Order")
 010834                        .WithMany()
 010835                        .HasForeignKey("OrderId")
 010836                        .OnDelete(DeleteBehavior.Cascade)
 010837                        .IsRequired()
 010838                        .HasConstraintName("FK_OrdersHistory_Orders_OrderId");
 010839
 010840                    b.Navigation("Order");
 010841                });
 10842
 010843            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPostingLink", b =>
 010844                {
 010845                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 010846                        .WithMany()
 010847                        .HasForeignKey("OrderHistoryId")
 010848                        .OnDelete(DeleteBehavior.Cascade)
 010849                        .IsRequired()
 010850                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_History");
 010851
 010852                    b.HasOne("OzonDomains.Models.OrderHistoryOneCPosting", "Posting")
 010853                        .WithMany("HistoryLinks")
 010854                        .HasForeignKey("PostingId")
 010855                        .OnDelete(DeleteBehavior.Cascade)
 010856                        .IsRequired()
 010857                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_Posting");
 010858
 010859                    b.Navigation("OrderHistory");
 010860
 010861                    b.Navigation("Posting");
 010862                });
 10863
 010864            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionCondition", b =>
 010865                {
 010866                    b.HasOne("OzonDomains.Models.OrderOzonPromotionSnapshot", "Snapshot")
 010867                        .WithMany("Conditions")
 010868                        .HasForeignKey("SnapshotId")
 010869                        .OnDelete(DeleteBehavior.Cascade)
 010870                        .IsRequired()
 010871                        .HasConstraintName("FK_OzonPromoCondition_Snapshot");
 010872
 010873                    b.Navigation("Snapshot");
 010874                });
 10875
 010876            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 010877                {
 010878                    b.HasOne("OzonDomains.Models.Order", "Order")
 010879                        .WithOne("OzonPromotionSnapshot")
 010880                        .HasForeignKey("OzonDomains.Models.OrderOzonPromotionSnapshot", "OrderId")
 010881                        .OnDelete(DeleteBehavior.Cascade)
 010882                        .IsRequired();
 010883
 010884                    b.Navigation("Order");
 010885                });
 10886
 010887            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 010888                {
 010889                    b.HasOne("OzonDomains.Models.Order", null)
 010890                        .WithOne("OrderPrice")
 010891                        .HasForeignKey("OzonDomains.Models.OrderPrice", "OrderId")
 010892                        .OnDelete(DeleteBehavior.Cascade)
 010893                        .IsRequired();
 010894                });
 10895
 010896            modelBuilder.Entity("OzonDomains.Models.OrderReturn", b =>
 010897                {
 010898                    b.HasOne("OzonDomains.Models.Order", "Order")
 010899                        .WithMany()
 010900                        .HasForeignKey("OrderId")
 010901                        .HasConstraintName("FK_OrderReturns_Orders");
 010902
 010903                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010904                        .WithMany()
 010905                        .HasForeignKey("OzonClientId")
 010906                        .OnDelete(DeleteBehavior.Cascade)
 010907                        .IsRequired()
 010908                        .HasConstraintName("FK_OrderReturns_OzonClients");
 010909
 010910                    b.Navigation("Order");
 010911
 010912                    b.Navigation("OzonClient");
 010913                });
 10914
 010915            modelBuilder.Entity("OzonDomains.Models.OzonChatOrder", b =>
 010916                {
 010917                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010918                        .WithMany()
 010919                        .HasForeignKey("ClientId")
 010920                        .OnDelete(DeleteBehavior.Cascade)
 010921                        .IsRequired()
 010922                        .HasConstraintName("FK_OzonChatOrders_OzonClient");
 010923
 010924                    b.HasOne("OzonDomains.Models.Order", "Order")
 010925                        .WithMany()
 010926                        .HasForeignKey("OrderId")
 010927                        .OnDelete(DeleteBehavior.Cascade)
 010928                        .IsRequired()
 010929                        .HasConstraintName("FK_OzonChatOrders_Order");
 010930
 010931                    b.Navigation("Client");
 010932
 010933                    b.Navigation("Order");
 010934                });
 10935
 010936            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseStatistic", b =>
 010937                {
 010938                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010939                        .WithMany()
 010940                        .HasForeignKey("ClientId")
 010941                        .OnDelete(DeleteBehavior.Cascade)
 010942                        .IsRequired()
 010943                        .HasConstraintName("FK_OzonChatResponseStatistics_OzonClient");
 010944
 010945                    b.HasOne("OzonDomains.Models.Order", "Order")
 010946                        .WithMany()
 010947                        .HasForeignKey("OrderId")
 010948                        .HasConstraintName("FK_OzonChatResponseStatistics_Order");
 010949
 010950                    b.Navigation("Client");
 010951
 010952                    b.Navigation("Order");
 010953                });
 10954
 010955            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseTime", b =>
 010956                {
 010957                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010958                        .WithMany()
 010959                        .HasForeignKey("ClientId")
 010960                        .OnDelete(DeleteBehavior.Cascade)
 010961                        .IsRequired();
 010962
 010963                    b.Navigation("Client");
 010964                });
 10965
 010966            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 010967                {
 010968                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", "Batch")
 010969                        .WithMany("Acts")
 010970                        .HasForeignKey("BatchId")
 010971                        .OnDelete(DeleteBehavior.Cascade)
 010972                        .IsRequired();
 010973
 010974                    b.Navigation("Batch");
 010975                });
 10976
 010977            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 010978                {
 010979                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverAct", "Act")
 010980                        .WithMany("Items")
 010981                        .HasForeignKey("ActId")
 010982                        .OnDelete(DeleteBehavior.Cascade)
 010983                        .IsRequired();
 010984
 010985                    b.HasOne("OzonDomains.Models.Order", "Order")
 010986                        .WithMany()
 010987                        .HasForeignKey("OrderId");
 010988
 010989                    b.Navigation("Act");
 010990
 010991                    b.Navigation("Order");
 010992                });
 10993
 010994            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItemPhoto", b =>
 010995                {
 010996                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverActItem", "ActItem")
 010997                        .WithMany("Photos")
 010998                        .HasForeignKey("ActItemId")
 010999                        .OnDelete(DeleteBehavior.Cascade)
 011000                        .IsRequired();
 011001
 011002                    b.Navigation("ActItem");
 011003                });
 11004
 011005            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 011006                {
 011007                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 011008                        .WithMany()
 011009                        .HasForeignKey("OzonClientId")
 011010                        .OnDelete(DeleteBehavior.Restrict)
 011011                        .IsRequired();
 011012
 011013                    b.Navigation("OzonClient");
 011014                });
 11015
 011016            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellationOrder", b =>
 011017                {
 011018                    b.HasOne("OzonDomains.Models.OzonPostingCancellation", "Cancellation")
 011019                        .WithMany("OrderLinks")
 011020                        .HasForeignKey("CancellationId")
 011021                        .OnDelete(DeleteBehavior.Cascade)
 011022                        .IsRequired()
 011023                        .HasConstraintName("FK_OzonPostingCancellationOrders_Cancellations_CancellationId");
 011024
 011025                    b.HasOne("OzonDomains.Models.Order", "Order")
 011026                        .WithMany()
 011027                        .HasForeignKey("OrderId")
 011028                        .OnDelete(DeleteBehavior.Cascade)
 011029                        .IsRequired();
 011030
 011031                    b.Navigation("Cancellation");
 011032
 011033                    b.Navigation("Order");
 011034                });
 11035
 011036            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerLoginCode", b =>
 011037                {
 011038                    b.HasOne("OzonDomains.Models.Partners.Partner", "Partner")
 011039                        .WithMany("LoginCodes")
 011040                        .HasForeignKey("PartnerId")
 011041                        .OnDelete(DeleteBehavior.Cascade)
 011042                        .IsRequired();
 011043
 011044                    b.Navigation("Partner");
 011045                });
 11046
 011047            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerPermission", b =>
 011048                {
 011049                    b.HasOne("OzonDomains.Models.Partners.Partner", "Partner")
 011050                        .WithMany("Permissions")
 011051                        .HasForeignKey("PartnerId")
 011052                        .OnDelete(DeleteBehavior.Cascade)
 011053                        .IsRequired();
 011054
 011055                    b.Navigation("Partner");
 011056                });
 11057
 011058            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerRule", b =>
 011059                {
 011060                    b.HasOne("OzonDomains.Models.Partners.Partner", "Partner")
 011061                        .WithMany("Rules")
 011062                        .HasForeignKey("PartnerId")
 011063                        .OnDelete(DeleteBehavior.Cascade)
 011064                        .IsRequired();
 011065
 011066                    b.Navigation("Partner");
 011067                });
 11068
 011069            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerRuleCondition", b =>
 011070                {
 011071                    b.HasOne("OzonDomains.Models.Partners.PartnerRule", "Rule")
 011072                        .WithMany("Conditions")
 011073                        .HasForeignKey("RuleId")
 011074                        .OnDelete(DeleteBehavior.Cascade)
 011075                        .IsRequired();
 011076
 011077                    b.Navigation("Rule");
 011078                });
 11079
 011080            modelBuilder.Entity("OzonDomains.Models.PriceIndexes", b =>
 011081                {
 011082                    b.HasOne("OzonDomains.Models.OrderPrice", null)
 011083                        .WithOne("PriceIndexes")
 011084                        .HasForeignKey("OzonDomains.Models.PriceIndexes", "OrderPriceId")
 011085                        .OnDelete(DeleteBehavior.Cascade)
 011086                        .IsRequired();
 011087                });
 11088
 011089            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 011090                {
 011091                    b.HasOne("OzonDomains.Models.Product", "ReplacementProduct")
 011092                        .WithMany("ReplacedProducts")
 011093                        .HasForeignKey("ReplacementProductId")
 011094                        .OnDelete(DeleteBehavior.Restrict);
 011095
 011096                    b.Navigation("ReplacementProduct");
 011097                });
 11098
 011099            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 011100                {
 011101                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 011102                        .WithMany()
 011103                        .HasForeignKey("StudioOrderId")
 011104                        .OnDelete(DeleteBehavior.Restrict)
 011105                        .IsRequired();
 011106
 011107                    b.Navigation("StudioOrder");
 011108                });
 11109
 011110            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 011111                {
 011112                    b.HasOne("OzonDomains.Models.ProfitLigaCartItem", "ProfitLigaCartItem")
 011113                        .WithMany()
 011114                        .HasForeignKey("ProfitLigaCartItemId")
 011115                        .OnDelete(DeleteBehavior.SetNull)
 011116                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 011117
 011118                    b.HasOne("OzonDomains.Models.ProfitLigaOrder", "ProfitLigaOrder")
 011119                        .WithMany("Items")
 011120                        .HasForeignKey("ProfitLigaOrderId")
 011121                        .OnDelete(DeleteBehavior.Cascade)
 011122                        .IsRequired()
 011123                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaOrders");
 011124
 011125                    b.HasOne("OzonDomains.Models.Order", null)
 011126                        .WithMany()
 011127                        .HasForeignKey("StudioOrderId")
 011128                        .OnDelete(DeleteBehavior.Restrict)
 011129                        .IsRequired();
 011130
 011131                    b.Navigation("ProfitLigaCartItem");
 011132
 011133                    b.Navigation("ProfitLigaOrder");
 011134                });
 11135
 011136            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 011137                {
 011138                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 011139                        .WithMany()
 011140                        .HasForeignKey("ShipmentWarehouseId")
 011141                        .OnDelete(DeleteBehavior.Restrict)
 011142                        .IsRequired()
 011143                        .HasConstraintName("FK_ProfitLigaPointMappings_Warehouses");
 011144
 011145                    b.Navigation("ShipmentWarehouse");
 011146                });
 11147
 011148            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 011149                {
 011150                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 011151                        .WithMany()
 011152                        .HasForeignKey("StudioOrderId")
 011153                        .OnDelete(DeleteBehavior.Restrict)
 011154                        .IsRequired();
 011155
 011156                    b.Navigation("StudioOrder");
 011157                });
 11158
 011159            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 011160                {
 011161                    b.HasOne("OzonDomains.Models.ShateMOrder", "ShateMOrder")
 011162                        .WithMany("Items")
 011163                        .HasForeignKey("ShateMOrderId")
 011164                        .OnDelete(DeleteBehavior.Cascade)
 011165                        .IsRequired()
 011166                        .HasConstraintName("FK_ShateMOrderItems_Orders");
 011167
 011168                    b.Navigation("ShateMOrder");
 011169                });
 11170
 011171            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 011172                {
 011173                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 011174                        .WithMany()
 011175                        .HasForeignKey("FromStatusId")
 011176                        .OnDelete(DeleteBehavior.Restrict)
 011177                        .IsRequired()
 011178                        .HasConstraintName("StatusTransitions_ibfk_1");
 011179
 011180                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 011181                        .WithMany()
 011182                        .HasForeignKey("ToStatusId")
 011183                        .OnDelete(DeleteBehavior.Restrict)
 011184                        .IsRequired()
 011185                        .HasConstraintName("StatusTransitions_ibfk_2");
 011186
 011187                    b.Navigation("FromStatus");
 011188
 011189                    b.Navigation("ToStatus");
 011190                });
 11191
 011192            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 011193                {
 011194                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 011195                        .WithMany()
 011196                        .HasForeignKey("FromStatusId")
 011197                        .OnDelete(DeleteBehavior.Restrict)
 011198                        .IsRequired()
 011199                        .HasConstraintName("StatusTransitionHistory_ibfk_2");
 011200
 011201                    b.HasOne("OzonDomains.Models.StatusTransition", "StatusTransition")
 011202                        .WithMany()
 011203                        .HasForeignKey("StatusTransitionId")
 011204                        .OnDelete(DeleteBehavior.Restrict)
 011205                        .HasConstraintName("StatusTransitionHistory_ibfk_1");
 011206
 011207                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 011208                        .WithMany()
 011209                        .HasForeignKey("ToStatusId")
 011210                        .OnDelete(DeleteBehavior.Restrict)
 011211                        .IsRequired()
 011212                        .HasConstraintName("StatusTransitionHistory_ibfk_3");
 011213
 011214                    b.Navigation("FromStatus");
 011215
 011216                    b.Navigation("StatusTransition");
 011217
 011218                    b.Navigation("ToStatus");
 011219                });
 11220
 011221            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 011222                {
 011223                    b.HasOne("OzonDomains.Models.SupplierQuotationRequest", "Request")
 011224                        .WithMany("Offers")
 011225                        .HasForeignKey("RequestId")
 011226                        .OnDelete(DeleteBehavior.Cascade)
 011227                        .IsRequired()
 011228                        .HasConstraintName("FK_SupplierQuotationOffers_Requests");
 011229
 011230                    b.Navigation("Request");
 011231                });
 11232
 011233            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 011234                {
 011235                    b.HasOne("OzonDomains.Models.Order", "Order")
 011236                        .WithMany()
 011237                        .HasForeignKey("OrderId")
 011238                        .OnDelete(DeleteBehavior.Restrict)
 011239                        .IsRequired()
 011240                        .HasConstraintName("FK_SupplierQuotationRequests_Orders");
 011241
 011242                    b.HasOne("OzonDomains.Models.Product", "Product")
 011243                        .WithMany()
 011244                        .HasForeignKey("ProductId")
 011245                        .OnDelete(DeleteBehavior.Restrict)
 011246                        .IsRequired()
 011247                        .HasConstraintName("FK_SupplierQuotationRequests_Products");
 011248
 011249                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 011250                        .WithMany()
 011251                        .HasForeignKey("SupplierId")
 011252                        .OnDelete(DeleteBehavior.SetNull)
 011253                        .HasConstraintName("FK_SupplierQuotationRequests_Suppliers");
 011254
 011255                    b.Navigation("Order");
 011256
 011257                    b.Navigation("Product");
 011258
 011259                    b.Navigation("Supplier");
 011260                });
 11261
 011262            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 011263                {
 011264                    b.HasOne("OzonDomains.Models.Order", "Order")
 011265                        .WithMany()
 011266                        .HasForeignKey("OrderId")
 011267                        .OnDelete(DeleteBehavior.Restrict)
 011268                        .IsRequired();
 011269
 011270                    b.HasOne("OzonDomains.Models.SupplierStatuses.SupplierStatus", "SupplierStatus")
 011271                        .WithMany()
 011272                        .HasForeignKey("SupplierStatusId")
 011273                        .OnDelete(DeleteBehavior.SetNull);
 011274
 011275                    b.Navigation("Order");
 011276
 011277                    b.Navigation("SupplierStatus");
 011278                });
 11279
 011280            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 011281                {
 011282                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 011283                        .WithMany()
 011284                        .HasForeignKey("OrderHistoryId")
 011285                        .OnDelete(DeleteBehavior.SetNull)
 011286                        .HasConstraintName("FK_OrderSupplierStateHistory_OrderHistory_OrderHistoryId");
 011287
 011288                    b.HasOne("OzonDomains.Models.SupplierStatuses.OrderSupplierState", "OrderSupplierState")
 011289                        .WithMany()
 011290                        .HasForeignKey("OrderSupplierStateId")
 011291                        .OnDelete(DeleteBehavior.Cascade)
 011292                        .IsRequired()
 011293                        .HasConstraintName("FK_OrderSupplierStateHistory_States_OrderSupplierStateId");
 011294
 011295                    b.Navigation("OrderHistory");
 011296
 011297                    b.Navigation("OrderSupplierState");
 011298                });
 11299
 011300            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 011301                {
 011302                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 011303                        .WithMany()
 011304                        .HasForeignKey("StatusColorId")
 011305                        .OnDelete(DeleteBehavior.SetNull);
 011306
 011307                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 011308                        .WithMany()
 011309                        .HasForeignKey("SupplierId")
 011310                        .OnDelete(DeleteBehavior.SetNull);
 011311
 011312                    b.Navigation("StatusColor");
 011313
 011314                    b.Navigation("Supplier");
 011315                });
 11316
 011317            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 011318                {
 011319                    b.HasOne("OzonDomains.Models.TransactionTimeTrackingSession", "TrackingSession")
 011320                        .WithMany()
 011321                        .HasForeignKey("TrackingSessionId")
 011322                        .OnDelete(DeleteBehavior.SetNull)
 011323                        .HasConstraintName("FK_TransactionTimeTrackingResults_SessionId");
 011324
 011325                    b.Navigation("TrackingSession");
 011326                });
 11327
 011328            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 011329                {
 011330                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 011331                        .WithMany()
 011332                        .HasForeignKey("OzonClientId")
 011333                        .HasConstraintName("FK_WarehouseMapping_OzonClient");
 011334
 011335                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 011336                        .WithMany()
 011337                        .HasForeignKey("SupplierId");
 011338
 011339                    b.Navigation("OzonClient");
 011340
 011341                    b.Navigation("Supplier");
 011342                });
 11343
 011344            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 011345                {
 011346                    b.HasOne("OzonDomains.Models.WarehouseStockSyncRun", "SyncRun")
 011347                        .WithMany("SnapshotRows")
 011348                        .HasForeignKey("SyncRunId")
 011349                        .OnDelete(DeleteBehavior.Restrict)
 011350                        .IsRequired()
 011351                        .HasConstraintName("FK_WarehouseStockSnapshot_SyncRun");
 011352
 011353                    b.Navigation("SyncRun");
 011354                });
 11355
 011356            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 011357                {
 011358                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 011359                        .WithMany()
 011360                        .HasForeignKey("StudioOrderId")
 011361                        .OnDelete(DeleteBehavior.Restrict)
 011362                        .IsRequired();
 011363
 011364                    b.Navigation("StudioOrder");
 011365                });
 11366
 011367            modelBuilder.Entity("OzonDomains.Delivery", b =>
 011368                {
 011369                    b.Navigation("Orders");
 011370                });
 11371
 011372            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSet", b =>
 011373                {
 011374                    b.Navigation("Items");
 011375                });
 11376
 011377            modelBuilder.Entity("OzonDomains.Models.ArmtekOrder", b =>
 011378                {
 011379                    b.Navigation("Items");
 011380                });
 11381
 011382            modelBuilder.Entity("OzonDomains.Models.AssemblyListRun", b =>
 011383                {
 011384                    b.Navigation("Items");
 011385                });
 11386
 011387            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 011388                {
 011389                    b.Navigation("RolePermissions");
 011390
 011391                    b.Navigation("UserOverrides");
 011392                });
 11393
 011394            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 011395                {
 011396                    b.Navigation("Children");
 011397
 011398                    b.Navigation("Fields");
 011399
 011400                    b.Navigation("RolePermissions");
 011401
 011402                    b.Navigation("UserOverrides");
 011403                });
 11404
 011405            modelBuilder.Entity("OzonDomains.Models.Authorization.AppRole", b =>
 011406                {
 011407                    b.Navigation("DataScopes");
 011408
 011409                    b.Navigation("FieldPermissions");
 011410
 011411                    b.Navigation("PagePermissions");
 011412
 011413                    b.Navigation("UserLinks");
 011414                });
 11415
 011416            modelBuilder.Entity("OzonDomains.Models.Authorization.DataScope", b =>
 011417                {
 011418                    b.Navigation("RoleLinks");
 011419
 011420                    b.Navigation("UserLinks");
 011421                });
 11422
 011423            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 011424                {
 011425                    b.Navigation("OrderMatches");
 011426
 011427                    b.Navigation("ReportLoads");
 011428
 011429                    b.Navigation("Steps");
 011430
 011431                    b.Navigation("TransactionResults");
 011432                });
 11433
 011434            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 011435                {
 011436                    b.Navigation("Executions");
 011437                });
 11438
 011439            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 011440                {
 011441                    b.Navigation("TransactionResults");
 011442                });
 11443
 011444            modelBuilder.Entity("OzonDomains.Models.BergOrder", b =>
 011445                {
 011446                    b.Navigation("Items");
 011447                });
 11448
 011449            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveExecution", b =>
 011450                {
 011451                    b.Navigation("Items");
 011452                });
 11453
 011454            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 011455                {
 011456                    b.Navigation("Runs");
 011457                });
 11458
 011459            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearExecution", b =>
 011460                {
 011461                    b.Navigation("Items");
 011462                });
 11463
 011464            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushExecution", b =>
 011465                {
 011466                    b.Navigation("Items");
 011467                });
 11468
 011469            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveExecution", b =>
 011470                {
 011471                    b.Navigation("Items");
 011472                });
 11473
 011474            modelBuilder.Entity("OzonDomains.Models.DeliveryProvider", b =>
 011475                {
 011476                    b.Navigation("Deliveries");
 011477                });
 11478
 011479            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 011480                {
 011481                    b.Navigation("ProcessingResults");
 011482                });
 11483
 011484            modelBuilder.Entity("OzonDomains.Models.EmailMessageInbox", b =>
 011485                {
 011486                    b.Navigation("Attachments");
 011487                });
 11488
 011489            modelBuilder.Entity("OzonDomains.Models.ExpenseType", b =>
 011490                {
 011491                    b.Navigation("OrderExtraExpenses");
 011492                });
 11493
 011494            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrder", b =>
 011495                {
 011496                    b.Navigation("Items");
 011497                });
 11498
 011499            modelBuilder.Entity("OzonDomains.Models.FidStatSnapshot", b =>
 011500                {
 011501                    b.Navigation("Items");
 011502                });
 11503
 011504            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrder", b =>
 011505                {
 011506                    b.Navigation("Items");
 011507                });
 11508
 011509            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedResult", b =>
 011510                {
 011511                    b.Navigation("MatchedColumns");
 011512
 011513                    b.Navigation("MatchedRows");
 011514                });
 11515
 011516            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", b =>
 011517                {
 011518                    b.Navigation("MatchingColumns");
 011519                });
 11520
 011521            modelBuilder.Entity("OzonDomains.Models.MlAutoOrder", b =>
 011522                {
 011523                    b.Navigation("Items");
 011524                });
 11525
 011526            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrder", b =>
 011527                {
 011528                    b.Navigation("Items");
 011529                });
 11530
 011531            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrder", b =>
 011532                {
 011533                    b.Navigation("Items");
 011534                });
 11535
 011536            modelBuilder.Entity("OzonDomains.Models.MotexOrder", b =>
 011537                {
 011538                    b.Navigation("Items");
 011539                });
 11540
 011541            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 011542                {
 011543                    b.Navigation("ExtraExpenses");
 011544
 011545                    b.Navigation("OrderArchive");
 011546
 011547                    b.Navigation("OrderExtensions");
 011548
 011549                    b.Navigation("OrderPrice");
 011550
 011551                    b.Navigation("OzonPromotionSnapshot");
 011552                });
 11553
 011554            modelBuilder.Entity("OzonDomains.Models.OrderCarts.CartStatus", b =>
 011555                {
 011556                    b.Navigation("OrderCarts");
 011557                });
 11558
 011559            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 011560                {
 011561                    b.Navigation("OrderItems");
 011562                });
 11563
 011564            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 011565                {
 011566                    b.Navigation("OrderItems");
 011567                });
 11568
 011569            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPosting", b =>
 011570                {
 011571                    b.Navigation("HistoryLinks");
 011572                });
 11573
 011574            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 011575                {
 011576                    b.Navigation("Conditions");
 011577                });
 11578
 011579            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 011580                {
 011581                    b.Navigation("PriceIndexes");
 011582                });
 11583
 011584            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 011585                {
 011586                    b.Navigation("Items");
 011587                });
 11588
 011589            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 011590                {
 011591                    b.Navigation("Photos");
 011592                });
 11593
 011594            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", b =>
 011595                {
 011596                    b.Navigation("Acts");
 011597                });
 11598
 011599            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 011600                {
 011601                    b.Navigation("OrderLinks");
 011602                });
 11603
 011604            modelBuilder.Entity("OzonDomains.Models.Partners.Partner", b =>
 011605                {
 011606                    b.Navigation("LoginCodes");
 011607
 011608                    b.Navigation("Permissions");
 011609
 011610                    b.Navigation("Rules");
 011611                });
 11612
 011613            modelBuilder.Entity("OzonDomains.Models.Partners.PartnerRule", b =>
 011614                {
 011615                    b.Navigation("Conditions");
 011616                });
 11617
 011618            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 011619                {
 011620                    b.Navigation("ReplacedProducts");
 011621                });
 11622
 011623            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 011624                {
 011625                    b.Navigation("Items");
 011626                });
 11627
 011628            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 011629                {
 011630                    b.Navigation("Items");
 011631                });
 11632
 011633            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 011634                {
 011635                    b.Navigation("Offers");
 011636                });
 11637
 011638            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 011639                {
 011640                    b.Navigation("Orders");
 011641                });
 11642
 011643            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 011644                {
 011645                    b.Navigation("SnapshotRows");
 011646                });
 11647#pragma warning restore 612, 618
 011648        }
 11649    }
 11650}