< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 11018
Coverable lines: 11018
Total lines: 11378
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/20261008190651_AddOrdersArticleIndex.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace OzonRepositories.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddOrdersArticleIndex : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 013            migrationBuilder.CreateIndex(
 014                name: "IX_Orders_Article",
 015                table: "Orders",
 016                column: "Article");
 017        }
 18
 19        /// <inheritdoc />
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropIndex(
 023                name: "IX_Orders_Article",
 024                table: "Orders");
 025        }
 26    }
 27}

/home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/20261008190651_AddOrdersArticleIndex.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("20261008190651_AddOrdersArticleIndex")]
 16    partial class AddOrdersArticleIndex
 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.PriceIndexes", b =>
 07468                {
 07469                    b.Property<int>("Id")
 07470                        .ValueGeneratedOnAdd()
 07471                        .HasColumnType("int");
 07472
 07473                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07474
 07475                    b.Property<string>("ColorIndex")
 07476                        .IsRequired()
 07477                        .HasMaxLength(20)
 07478                        .HasColumnType("varchar(20)");
 07479
 07480                    b.Property<decimal>("ExternalMinPrice")
 07481                        .HasColumnType("decimal(18,2)");
 07482
 07483                    b.Property<string>("ExternalMinPriceCurrency")
 07484                        .IsRequired()
 07485                        .HasMaxLength(10)
 07486                        .HasColumnType("varchar(10)");
 07487
 07488                    b.Property<decimal>("ExternalPriceIndexValue")
 07489                        .HasColumnType("decimal(18,4)");
 07490
 07491                    b.Property<int>("OrderPriceId")
 07492                        .HasColumnType("int");
 07493
 07494                    b.Property<decimal>("OzonMinPrice")
 07495                        .HasColumnType("decimal(18,2)");
 07496
 07497                    b.Property<string>("OzonMinPriceCurrency")
 07498                        .IsRequired()
 07499                        .HasMaxLength(10)
 07500                        .HasColumnType("varchar(10)");
 07501
 07502                    b.Property<decimal>("OzonPriceIndexValue")
 07503                        .HasColumnType("decimal(18,4)");
 07504
 07505                    b.Property<decimal>("SelfMarketplacesMinPrice")
 07506                        .HasColumnType("decimal(18,2)");
 07507
 07508                    b.Property<string>("SelfMarketplacesMinPriceCurrency")
 07509                        .IsRequired()
 07510                        .HasMaxLength(10)
 07511                        .HasColumnType("varchar(10)");
 07512
 07513                    b.Property<decimal>("SelfMarketplacesPriceIndexValue")
 07514                        .HasColumnType("decimal(18,4)");
 07515
 07516                    b.HasKey("Id");
 07517
 07518                    b.HasIndex("OrderPriceId");
 07519
 07520                    b.ToTable("PriceIndexes");
 07521                });
 7522
 07523            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 07524                {
 07525                    b.Property<int>("Id")
 07526                        .ValueGeneratedOnAdd()
 07527                        .HasColumnType("int");
 07528
 07529                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07530
 07531                    b.Property<string>("Article")
 07532                        .HasMaxLength(255)
 07533                        .HasColumnType("varchar(255)");
 07534
 07535                    b.Property<string>("Barcode")
 07536                        .HasMaxLength(255)
 07537                        .HasColumnType("varchar(255)");
 07538
 07539                    b.Property<string>("CommercialCategory")
 07540                        .HasMaxLength(255)
 07541                        .HasColumnType("varchar(255)");
 07542
 07543                    b.Property<decimal?>("CurrentPriceWithDiscount")
 07544                        .HasColumnType("decimal(65,30)");
 07545
 07546                    b.Property<string>("FboOzonSkuId")
 07547                        .HasMaxLength(50)
 07548                        .HasColumnType("varchar(50)");
 07549
 07550                    b.Property<string>("FbsOzonSkuId")
 07551                        .HasMaxLength(50)
 07552                        .HasColumnType("varchar(50)");
 07553
 07554                    b.Property<string>("ImageUrl")
 07555                        .HasMaxLength(2048)
 07556                        .HasColumnType("varchar(2048)");
 07557
 07558                    b.Property<string>("OzonProductId")
 07559                        .HasMaxLength(50)
 07560                        .HasColumnType("varchar(50)");
 07561
 07562                    b.Property<int?>("ReplacementProductId")
 07563                        .HasColumnType("int");
 07564
 07565                    b.Property<double?>("Volume")
 07566                        .HasColumnType("double");
 07567
 07568                    b.Property<double?>("VolumetricWeight")
 07569                        .HasColumnType("double");
 07570
 07571                    b.Property<decimal?>("Weight")
 07572                        .HasColumnType("decimal(65,30)");
 07573
 07574                    b.HasKey("Id");
 07575
 07576                    b.HasIndex("ReplacementProductId");
 07577
 07578                    b.ToTable("Products");
 07579                });
 7580
 07581            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 07582                {
 07583                    b.Property<long>("Id")
 07584                        .ValueGeneratedOnAdd()
 07585                        .HasColumnType("bigint");
 07586
 07587                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07588
 07589                    b.Property<int?>("ActiveStudioOrderId")
 07590                        .HasColumnType("int");
 07591
 07592                    b.Property<string>("Article")
 07593                        .IsRequired()
 07594                        .HasMaxLength(60)
 07595                        .HasColumnType("varchar(60)");
 07596
 07597                    b.Property<string>("ArticleId")
 07598                        .IsRequired()
 07599                        .HasMaxLength(40)
 07600                        .HasColumnType("varchar(40)");
 07601
 07602                    b.Property<string>("Brand")
 07603                        .IsRequired()
 07604                        .HasMaxLength(100)
 07605                        .HasColumnType("varchar(100)");
 07606
 07607                    b.Property<DateTime>("CreatedAtUtc")
 07608                        .HasColumnType("datetime(6)");
 07609
 07610                    b.Property<string>("CreatedBy")
 07611                        .HasMaxLength(450)
 07612                        .HasColumnType("varchar(450)");
 07613
 07614                    b.Property<string>("CurrencyCode")
 07615                        .IsRequired()
 07616                        .HasMaxLength(8)
 07617                        .HasColumnType("varchar(8)");
 07618
 07619                    b.Property<DateTime?>("DeliveryAtUtc")
 07620                        .HasColumnType("datetime(6)");
 07621
 07622                    b.Property<string>("LastError")
 07623                        .HasMaxLength(1000)
 07624                        .HasColumnType("varchar(1000)");
 07625
 07626                    b.Property<int>("Multi")
 07627                        .HasColumnType("int");
 07628
 07629                    b.Property<string>("PointCode")
 07630                        .HasMaxLength(120)
 07631                        .HasColumnType("varchar(120)");
 07632
 07633                    b.Property<string>("PointName")
 07634                        .HasMaxLength(300)
 07635                        .HasColumnType("varchar(300)");
 07636
 07637                    b.Property<string>("ProductCode")
 07638                        .HasMaxLength(120)
 07639                        .HasColumnType("varchar(120)");
 07640
 07641                    b.Property<string>("ProductName")
 07642                        .HasMaxLength(200)
 07643                        .HasColumnType("varchar(200)");
 07644
 07645                    b.Property<decimal>("Quantity")
 07646                        .HasPrecision(18, 3)
 07647                        .HasColumnType("decimal(18,3)");
 07648
 07649                    b.Property<decimal?>("SourcePrice")
 07650                        .HasPrecision(18, 4)
 07651                        .HasColumnType("decimal(18,4)");
 07652
 07653                    b.Property<string>("Status")
 07654                        .IsRequired()
 07655                        .HasMaxLength(30)
 07656                        .HasColumnType("varchar(30)");
 07657
 07658                    b.Property<int>("StudioOrderId")
 07659                        .HasColumnType("int");
 07660
 07661                    b.Property<string>("TestResultJson")
 07662                        .HasColumnType("longtext");
 07663
 07664                    b.Property<DateTime?>("TestedAtUtc")
 07665                        .HasColumnType("datetime(6)");
 07666
 07667                    b.Property<DateTime>("UpdatedAtUtc")
 07668                        .HasColumnType("datetime(6)");
 07669
 07670                    b.Property<string>("WarehouseId")
 07671                        .IsRequired()
 07672                        .HasMaxLength(40)
 07673                        .HasColumnType("varchar(40)");
 07674
 07675                    b.Property<string>("WarehouseName")
 07676                        .HasMaxLength(160)
 07677                        .HasColumnType("varchar(160)");
 07678
 07679                    b.HasKey("Id");
 07680
 07681                    b.HasIndex("ActiveStudioOrderId")
 07682                        .IsUnique()
 07683                        .HasDatabaseName("UX_ProfitLigaCartItems_ActiveOrder");
 07684
 07685                    b.HasIndex("CreatedAtUtc")
 07686                        .HasDatabaseName("IX_ProfitLigaCartItems_Created");
 07687
 07688                    b.HasIndex("StudioOrderId", "Status")
 07689                        .HasDatabaseName("IX_ProfitLigaCartItems_Order_Status");
 07690
 07691                    b.ToTable("ProfitLigaCartItems");
 07692                });
 7693
 07694            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 07695                {
 07696                    b.Property<long>("Id")
 07697                        .ValueGeneratedOnAdd()
 07698                        .HasColumnType("bigint");
 07699
 07700                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07701
 07702                    b.Property<DateTime>("CreatedAtUtc")
 07703                        .HasColumnType("datetime(6)");
 07704
 07705                    b.Property<string>("CreatedBy")
 07706                        .HasMaxLength(450)
 07707                        .HasColumnType("varchar(450)");
 07708
 07709                    b.Property<string>("DeliveryMethodId")
 07710                        .HasMaxLength(20)
 07711                        .HasColumnType("varchar(20)");
 07712
 07713                    b.Property<string>("DeliveryMethodName")
 07714                        .HasMaxLength(100)
 07715                        .HasColumnType("varchar(100)");
 07716
 07717                    b.Property<string>("OrderNumber")
 07718                        .IsRequired()
 07719                        .HasMaxLength(50)
 07720                        .HasColumnType("varchar(50)");
 07721
 07722                    b.Property<string>("PaymentId")
 07723                        .HasMaxLength(20)
 07724                        .HasColumnType("varchar(20)");
 07725
 07726                    b.Property<string>("PaymentName")
 07727                        .HasMaxLength(100)
 07728                        .HasColumnType("varchar(100)");
 07729
 07730                    b.Property<string>("PointCode")
 07731                        .HasMaxLength(120)
 07732                        .HasColumnType("varchar(120)");
 07733
 07734                    b.Property<string>("PointName")
 07735                        .HasMaxLength(300)
 07736                        .HasColumnType("varchar(300)");
 07737
 07738                    b.Property<string>("RequestJson")
 07739                        .HasColumnType("longtext");
 07740
 07741                    b.Property<string>("ResponseJson")
 07742                        .HasColumnType("longtext");
 07743
 07744                    b.Property<string>("Status")
 07745                        .IsRequired()
 07746                        .HasMaxLength(50)
 07747                        .HasColumnType("varchar(50)");
 07748
 07749                    b.HasKey("Id");
 07750
 07751                    b.HasIndex("OrderNumber")
 07752                        .IsUnique()
 07753                        .HasDatabaseName("UX_ProfitLigaOrders_Number");
 07754
 07755                    b.ToTable("ProfitLigaOrders");
 07756                });
 7757
 07758            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 07759                {
 07760                    b.Property<long>("Id")
 07761                        .ValueGeneratedOnAdd()
 07762                        .HasColumnType("bigint");
 07763
 07764                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07765
 07766                    b.Property<string>("Article")
 07767                        .IsRequired()
 07768                        .HasMaxLength(60)
 07769                        .HasColumnType("varchar(60)");
 07770
 07771                    b.Property<string>("ArticleId")
 07772                        .HasMaxLength(40)
 07773                        .HasColumnType("varchar(40)");
 07774
 07775                    b.Property<string>("Brand")
 07776                        .IsRequired()
 07777                        .HasMaxLength(100)
 07778                        .HasColumnType("varchar(100)");
 07779
 07780                    b.Property<string>("CurrencyCode")
 07781                        .HasMaxLength(8)
 07782                        .HasColumnType("varchar(8)");
 07783
 07784                    b.Property<string>("Error")
 07785                        .HasMaxLength(1000)
 07786                        .HasColumnType("varchar(1000)");
 07787
 07788                    b.Property<string>("ExternalLineId")
 07789                        .HasMaxLength(50)
 07790                        .HasColumnType("varchar(50)");
 07791
 07792                    b.Property<decimal?>("Price")
 07793                        .HasPrecision(18, 4)
 07794                        .HasColumnType("decimal(18,4)");
 07795
 07796                    b.Property<string>("ProductCode")
 07797                        .HasMaxLength(120)
 07798                        .HasColumnType("varchar(120)");
 07799
 07800                    b.Property<long?>("ProfitLigaCartItemId")
 07801                        .HasColumnType("bigint");
 07802
 07803                    b.Property<long>("ProfitLigaOrderId")
 07804                        .HasColumnType("bigint");
 07805
 07806                    b.Property<decimal>("Quantity")
 07807                        .HasPrecision(18, 3)
 07808                        .HasColumnType("decimal(18,3)");
 07809
 07810                    b.Property<int>("StudioOrderId")
 07811                        .HasColumnType("int");
 07812
 07813                    b.HasKey("Id");
 07814
 07815                    b.HasIndex("ProfitLigaCartItemId")
 07816                        .HasDatabaseName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 07817
 07818                    b.HasIndex("ProfitLigaOrderId")
 07819                        .HasDatabaseName("IX_ProfitLigaOrderItems_Order");
 07820
 07821                    b.HasIndex("StudioOrderId")
 07822                        .HasDatabaseName("FK_ProfitLigaOrderItems_Orders_StudioOrderId");
 07823
 07824                    b.ToTable("ProfitLigaOrderItems");
 07825                });
 7826
 07827            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 07828                {
 07829                    b.Property<long>("Id")
 07830                        .ValueGeneratedOnAdd()
 07831                        .HasColumnType("bigint");
 07832
 07833                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07834
 07835                    b.Property<string>("PointCode")
 07836                        .IsRequired()
 07837                        .HasMaxLength(120)
 07838                        .HasColumnType("varchar(120)");
 07839
 07840                    b.Property<string>("PointName")
 07841                        .HasMaxLength(300)
 07842                        .HasColumnType("varchar(300)");
 07843
 07844                    b.Property<int>("ShipmentWarehouseId")
 07845                        .HasColumnType("int");
 07846
 07847                    b.HasKey("Id");
 07848
 07849                    b.HasIndex("ShipmentWarehouseId")
 07850                        .IsUnique()
 07851                        .HasDatabaseName("UX_ProfitLigaPointMappings_Warehouse");
 07852
 07853                    b.ToTable("ProfitLigaPointMappings");
 07854                });
 7855
 07856            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 07857                {
 07858                    b.Property<long>("Id")
 07859                        .ValueGeneratedOnAdd()
 07860                        .HasColumnType("bigint");
 07861
 07862                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07863
 07864                    b.Property<int?>("ActiveStudioOrderId")
 07865                        .HasColumnType("int");
 07866
 07867                    b.Property<string>("AgreementCode")
 07868                        .HasMaxLength(80)
 07869                        .HasColumnType("varchar(80)");
 07870
 07871                    b.Property<string>("Article")
 07872                        .IsRequired()
 07873                        .HasMaxLength(120)
 07874                        .HasColumnType("varchar(120)");
 07875
 07876                    b.Property<string>("Brand")
 07877                        .IsRequired()
 07878                        .HasMaxLength(256)
 07879                        .HasColumnType("varchar(256)");
 07880
 07881                    b.Property<DateTime>("CreatedAtUtc")
 07882                        .HasColumnType("datetime(6)");
 07883
 07884                    b.Property<string>("CreatedBy")
 07885                        .HasMaxLength(450)
 07886                        .HasColumnType("varchar(450)");
 07887
 07888                    b.Property<string>("CurrencyCode")
 07889                        .IsRequired()
 07890                        .HasMaxLength(8)
 07891                        .HasColumnType("varchar(8)");
 07892
 07893                    b.Property<string>("DeliveryAddressCode")
 07894                        .HasMaxLength(80)
 07895                        .HasColumnType("varchar(80)");
 07896
 07897                    b.Property<DateTime?>("DeliveryAtUtc")
 07898                        .HasColumnType("datetime(6)");
 07899
 07900                    b.Property<string>("DeliveryType")
 07901                        .HasMaxLength(40)
 07902                        .HasColumnType("varchar(40)");
 07903
 07904                    b.Property<string>("Direction")
 07905                        .HasMaxLength(120)
 07906                        .HasColumnType("varchar(120)");
 07907
 07908                    b.Property<string>("ExternalBasketItemId")
 07909                        .HasMaxLength(120)
 07910                        .HasColumnType("varchar(120)");
 07911
 07912                    b.Property<string>("LastError")
 07913                        .HasMaxLength(1000)
 07914                        .HasColumnType("varchar(1000)");
 07915
 07916                    b.Property<string>("LocationCode")
 07917                        .HasMaxLength(80)
 07918                        .HasColumnType("varchar(80)");
 07919
 07920                    b.Property<string>("PriceId")
 07921                        .IsRequired()
 07922                        .HasMaxLength(512)
 07923                        .HasColumnType("varchar(512)");
 07924
 07925                    b.Property<string>("ProductName")
 07926                        .HasMaxLength(200)
 07927                        .HasColumnType("varchar(200)");
 07928
 07929                    b.Property<decimal>("Quantity")
 07930                        .HasPrecision(18, 3)
 07931                        .HasColumnType("decimal(18,3)");
 07932
 07933                    b.Property<decimal?>("SourcePrice")
 07934                        .HasPrecision(18, 4)
 07935                        .HasColumnType("decimal(18,4)");
 07936
 07937                    b.Property<string>("Status")
 07938                        .IsRequired()
 07939                        .HasMaxLength(30)
 07940                        .HasColumnType("varchar(30)");
 07941
 07942                    b.Property<int>("StudioOrderId")
 07943                        .HasColumnType("int");
 07944
 07945                    b.Property<DateTime>("UpdatedAtUtc")
 07946                        .HasColumnType("datetime(6)");
 07947
 07948                    b.HasKey("Id");
 07949
 07950                    b.HasIndex("ActiveStudioOrderId")
 07951                        .IsUnique()
 07952                        .HasDatabaseName("UX_ShateMCartItems_ActiveStudioOrderId");
 07953
 07954                    b.HasIndex("StudioOrderId")
 07955                        .HasDatabaseName("FK_ShateMCartItems_Orders_StudioOrderId");
 07956
 07957                    b.HasIndex("ExternalBasketItemId", "Status");
 07958
 07959                    b.ToTable("ShateMCartItems");
 07960                });
 7961
 07962            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 07963                {
 07964                    b.Property<long>("Id")
 07965                        .ValueGeneratedOnAdd()
 07966                        .HasColumnType("bigint");
 07967
 07968                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07969
 07970                    b.Property<string>("AgreementCode")
 07971                        .IsRequired()
 07972                        .HasMaxLength(80)
 07973                        .HasColumnType("varchar(80)");
 07974
 07975                    b.Property<DateTime>("CreatedAtUtc")
 07976                        .HasColumnType("datetime(6)");
 07977
 07978                    b.Property<string>("CreatedBy")
 07979                        .HasMaxLength(450)
 07980                        .HasColumnType("varchar(450)");
 07981
 07982                    b.Property<string>("DeliveryAddressCode")
 07983                        .HasMaxLength(80)
 07984                        .HasColumnType("varchar(80)");
 07985
 07986                    b.Property<string>("DeliveryType")
 07987                        .HasMaxLength(40)
 07988                        .HasColumnType("varchar(40)");
 07989
 07990                    b.Property<string>("ExternalOrderId")
 07991                        .HasMaxLength(120)
 07992                        .HasColumnType("varchar(120)");
 07993
 07994                    b.Property<string>("RequestJson")
 07995                        .HasColumnType("longtext");
 07996
 07997                    b.Property<string>("ResponseJson")
 07998                        .HasColumnType("longtext");
 07999
 08000                    b.Property<string>("Status")
 08001                        .IsRequired()
 08002                        .HasMaxLength(50)
 08003                        .HasColumnType("varchar(50)");
 08004
 08005                    b.HasKey("Id");
 08006
 08007                    b.HasIndex("ExternalOrderId")
 08008                        .IsUnique()
 08009                        .HasDatabaseName("UX_ShateMOrders_ExternalOrderId");
 08010
 08011                    b.ToTable("ShateMOrders");
 08012                });
 8013
 08014            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 08015                {
 08016                    b.Property<long>("Id")
 08017                        .ValueGeneratedOnAdd()
 08018                        .HasColumnType("bigint");
 08019
 08020                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08021
 08022                    b.Property<string>("CurrencyCode")
 08023                        .HasMaxLength(8)
 08024                        .HasColumnType("varchar(8)");
 08025
 08026                    b.Property<string>("Error")
 08027                        .HasMaxLength(1000)
 08028                        .HasColumnType("varchar(1000)");
 08029
 08030                    b.Property<string>("ExternalLineId")
 08031                        .HasMaxLength(120)
 08032                        .HasColumnType("varchar(120)");
 08033
 08034                    b.Property<decimal?>("Price")
 08035                        .HasPrecision(18, 4)
 08036                        .HasColumnType("decimal(18,4)");
 08037
 08038                    b.Property<string>("PriceId")
 08039                        .IsRequired()
 08040                        .HasMaxLength(512)
 08041                        .HasColumnType("varchar(512)");
 08042
 08043                    b.Property<decimal>("Quantity")
 08044                        .HasPrecision(18, 3)
 08045                        .HasColumnType("decimal(18,3)");
 08046
 08047                    b.Property<long?>("ShateMCartItemId")
 08048                        .HasColumnType("bigint");
 08049
 08050                    b.Property<long>("ShateMOrderId")
 08051                        .HasColumnType("bigint");
 08052
 08053                    b.Property<int>("StudioOrderId")
 08054                        .HasColumnType("int");
 08055
 08056                    b.HasKey("Id");
 08057
 08058                    b.HasIndex("ShateMOrderId", "StudioOrderId", "PriceId")
 08059                        .IsUnique()
 08060                        .HasDatabaseName("UX_ShateMOrderItems_Order_StudioOrder_Price");
 08061
 08062                    b.ToTable("ShateMOrderItems");
 08063                });
 8064
 08065            modelBuilder.Entity("OzonDomains.Models.Shipment", b =>
 08066                {
 08067                    b.Property<int>("Id")
 08068                        .ValueGeneratedOnAdd()
 08069                        .HasColumnType("int");
 08070
 08071                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08072
 08073                    b.Property<string>("ShipmentNumber")
 08074                        .IsRequired()
 08075                        .HasMaxLength(50)
 08076                        .HasColumnType("varchar(50)");
 08077
 08078                    b.HasKey("Id");
 08079
 08080                    b.HasIndex("ShipmentNumber")
 08081                        .IsUnique()
 08082                        .HasDatabaseName("UX_Shipments_ShipmentNumber");
 08083
 08084                    b.ToTable("Shipments");
 08085                });
 8086
 08087            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 08088                {
 08089                    b.Property<int>("Id")
 08090                        .ValueGeneratedOnAdd()
 08091                        .HasColumnType("int");
 08092
 08093                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08094
 08095                    b.Property<string>("Conditions")
 08096                        .HasMaxLength(1000)
 08097                        .HasColumnType("text");
 08098
 08099                    b.Property<DateTime>("CreatedAt")
 08100                        .HasColumnType("datetime(6)");
 08101
 08102                    b.Property<string>("Description")
 08103                        .HasMaxLength(500)
 08104                        .HasColumnType("varchar(500)");
 08105
 08106                    b.Property<string>("DisplayName")
 08107                        .HasMaxLength(100)
 08108                        .HasColumnType("varchar(100)");
 08109
 08110                    b.Property<int?>("DisplayOrder")
 08111                        .HasColumnType("int");
 08112
 08113                    b.Property<int>("FromStatusId")
 08114                        .HasColumnType("int");
 08115
 08116                    b.Property<bool>("IsActive")
 08117                        .HasColumnType("tinyint(1)");
 08118
 08119                    b.Property<bool>("IsRepeatable")
 08120                        .HasColumnType("tinyint(1)");
 08121
 08122                    b.Property<string>("SystemName")
 08123                        .HasMaxLength(50)
 08124                        .HasColumnType("varchar(50)");
 08125
 08126                    b.Property<int>("ToStatusId")
 08127                        .HasColumnType("int");
 08128
 08129                    b.Property<int>("TransactionType")
 08130                        .HasColumnType("int");
 08131
 08132                    b.Property<DateTime?>("UpdatedAt")
 08133                        .HasColumnType("datetime(6)");
 08134
 08135                    b.HasKey("Id");
 08136
 08137                    b.HasIndex("DisplayOrder")
 08138                        .HasDatabaseName("IX_StatusTransitions_DisplayOrder");
 08139
 08140                    b.HasIndex("FromStatusId")
 08141                        .HasDatabaseName("IX_StatusTransitions_FromStatusId");
 08142
 08143                    b.HasIndex("IsActive")
 08144                        .HasDatabaseName("IX_StatusTransitions_IsActive");
 08145
 08146                    b.HasIndex("ToStatusId");
 08147
 08148                    b.HasIndex("FromStatusId", "ToStatusId", "TransactionType")
 08149                        .IsUnique()
 08150                        .HasDatabaseName("UQ_StatusTransitions_UniqueTransition");
 08151
 08152                    b.ToTable("StatusTransitions", t =>
 08153                        {
 08154                            t.HasCheckConstraint("CHK_StatusTransitions_DifferentStatuses", "`FromStatusId` <> `ToStatus
 08155                        });
 08156                });
 8157
 08158            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 08159                {
 08160                    b.Property<long>("Id")
 08161                        .ValueGeneratedOnAdd()
 08162                        .HasColumnType("bigint");
 08163
 08164                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08165
 08166                    b.Property<string>("Comment")
 08167                        .HasMaxLength(500)
 08168                        .HasColumnType("text");
 08169
 08170                    b.Property<int>("EntityId")
 08171                        .HasColumnType("int");
 08172
 08173                    b.Property<string>("EntityType")
 08174                        .IsRequired()
 08175                        .HasMaxLength(50)
 08176                        .HasColumnType("varchar(50)");
 08177
 08178                    b.Property<int>("FromStatusId")
 08179                        .HasColumnType("int");
 08180
 08181                    b.Property<string>("Metadata")
 08182                        .HasColumnType("longtext");
 08183
 08184                    b.Property<DateTime>("PerformedAt")
 08185                        .HasColumnType("datetime(6)");
 08186
 08187                    b.Property<int?>("PerformedByUserId")
 08188                        .HasColumnType("int");
 08189
 08190                    b.Property<int?>("StatusTransitionId")
 08191                        .HasColumnType("int");
 08192
 08193                    b.Property<int>("ToStatusId")
 08194                        .HasColumnType("int");
 08195
 08196                    b.Property<int?>("TransactionType")
 08197                        .HasColumnType("int");
 08198
 08199                    b.HasKey("Id");
 08200
 08201                    b.HasIndex("FromStatusId")
 08202                        .HasDatabaseName("IX_FromStatusId");
 08203
 08204                    b.HasIndex("PerformedAt")
 08205                        .HasDatabaseName("IX_PerformedAt");
 08206
 08207                    b.HasIndex("StatusTransitionId")
 08208                        .HasDatabaseName("IX_StatusTransitionId");
 08209
 08210                    b.HasIndex("ToStatusId")
 08211                        .HasDatabaseName("IX_ToStatusId");
 08212
 08213                    b.HasIndex("TransactionType")
 08214                        .HasDatabaseName("IX_TransactionType");
 08215
 08216                    b.HasIndex("EntityType", "EntityId")
 08217                        .HasDatabaseName("IX_Entity");
 08218
 08219                    b.ToTable("StatusTransitionHistory");
 08220                });
 8221
 08222            modelBuilder.Entity("OzonDomains.Models.Supplier", b =>
 08223                {
 08224                    b.Property<int>("Id")
 08225                        .ValueGeneratedOnAdd()
 08226                        .HasColumnType("int");
 08227
 08228                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08229
 08230                    b.Property<int?>("AdditionalTerm")
 08231                        .HasColumnType("int");
 08232
 08233                    b.Property<decimal?>("CostFactor")
 08234                        .HasColumnType("decimal(65,30)");
 08235
 08236                    b.Property<string>("CsvUrl")
 08237                        .HasMaxLength(500)
 08238                        .HasColumnType("varchar(250)");
 08239
 08240                    b.Property<int>("CurrencyCode")
 08241                        .HasColumnType("int");
 08242
 08243                    b.Property<int?>("ExpectedDeliveryHours")
 08244                        .HasColumnType("int");
 08245
 08246                    b.Property<string>("INNCode")
 08247                        .HasMaxLength(20)
 08248                        .HasColumnType("varchar(20)");
 08249
 08250                    b.Property<bool>("IsReSeller")
 08251                        .HasColumnType("tinyint(1)");
 08252
 08253                    b.Property<bool>("IsVatApplicable")
 08254                        .HasColumnType("tinyint(1)");
 08255
 08256                    b.Property<string>("Name")
 08257                        .HasMaxLength(50)
 08258                        .HasColumnType("varchar(50)");
 08259
 08260                    b.Property<string>("Site")
 08261                        .HasMaxLength(500)
 08262                        .HasColumnType("varchar(500)");
 08263
 08264                    b.Property<decimal?>("WeightFactor")
 08265                        .HasColumnType("decimal(65,30)");
 08266
 08267                    b.Property<int>("WeightFactorCurrencyCode")
 08268                        .HasColumnType("int");
 08269
 08270                    b.HasKey("Id");
 08271
 08272                    b.ToTable("Suppliers");
 08273                });
 8274
 08275            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 08276                {
 08277                    b.Property<long>("Id")
 08278                        .ValueGeneratedOnAdd()
 08279                        .HasColumnType("bigint");
 08280
 08281                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08282
 08283                    b.Property<string>("Caption")
 08284                        .HasMaxLength(255)
 08285                        .HasColumnType("varchar(255)");
 08286
 08287                    b.Property<string>("Code")
 08288                        .HasMaxLength(255)
 08289                        .HasColumnType("varchar(255)");
 08290
 08291                    b.Property<string>("CostPrice")
 08292                        .HasMaxLength(80)
 08293                        .HasColumnType("varchar(80)");
 08294
 08295                    b.Property<string>("CostPriceFormatted")
 08296                        .HasMaxLength(80)
 08297                        .HasColumnType("varchar(80)");
 08298
 08299                    b.Property<string>("CurrencyCode")
 08300                        .HasMaxLength(32)
 08301                        .HasColumnType("varchar(32)");
 08302
 08303                    b.Property<string>("DeliveryDays")
 08304                        .HasMaxLength(80)
 08305                        .HasColumnType("varchar(80)");
 08306
 08307                    b.Property<int>("DeliveryDaysMax")
 08308                        .HasColumnType("int");
 08309
 08310                    b.Property<int>("DeliveryDaysMin")
 08311                        .HasColumnType("int");
 08312
 08313                    b.Property<string>("Description")
 08314                        .HasColumnType("longtext");
 08315
 08316                    b.Property<string>("Direction")
 08317                        .HasMaxLength(255)
 08318                        .HasColumnType("varchar(255)");
 08319
 08320                    b.Property<int>("ExtraDeliveryHours")
 08321                        .HasColumnType("int");
 08322
 08323                    b.Property<string>("ItemHash")
 08324                        .HasMaxLength(255)
 08325                        .HasColumnType("varchar(255)");
 08326
 08327                    b.Property<string>("ItemId")
 08328                        .HasMaxLength(255)
 08329                        .HasColumnType("varchar(255)");
 08330
 08331                    b.Property<int>("MinQuantity")
 08332                        .HasColumnType("int");
 08333
 08334                    b.Property<string>("Price")
 08335                        .HasMaxLength(80)
 08336                        .HasColumnType("varchar(80)");
 08337
 08338                    b.Property<string>("PriceDescription")
 08339                        .HasColumnType("longtext");
 08340
 08341                    b.Property<string>("Producer")
 08342                        .HasMaxLength(255)
 08343                        .HasColumnType("varchar(255)");
 08344
 08345                    b.Property<string>("ProviderDataJson")
 08346                        .HasColumnType("longtext");
 08347
 08348                    b.Property<long>("RequestId")
 08349                        .HasColumnType("bigint");
 08350
 08351                    b.Property<string>("Rest")
 08352                        .HasMaxLength(80)
 08353                        .HasColumnType("varchar(80)");
 08354
 08355                    b.Property<string>("SiteUrl")
 08356                        .HasMaxLength(1000)
 08357                        .HasColumnType("varchar(1000)");
 08358
 08359                    b.Property<string>("SourceCurrencyCode")
 08360                        .HasMaxLength(32)
 08361                        .HasColumnType("varchar(32)");
 08362
 08363                    b.Property<decimal?>("SourcePrice")
 08364                        .HasColumnType("decimal(18,4)");
 08365
 08366                    b.Property<string>("Title")
 08367                        .HasMaxLength(255)
 08368                        .HasColumnType("varchar(255)");
 08369
 08370                    b.HasKey("Id");
 08371
 08372                    b.HasIndex("RequestId");
 08373
 08374                    b.ToTable("SupplierQuotationOffers");
 08375                });
 8376
 08377            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 08378                {
 08379                    b.Property<long>("Id")
 08380                        .ValueGeneratedOnAdd()
 08381                        .HasColumnType("bigint");
 08382
 08383                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08384
 08385                    b.Property<string>("Article")
 08386                        .IsRequired()
 08387                        .HasMaxLength(255)
 08388                        .HasColumnType("varchar(255)");
 08389
 08390                    b.Property<string>("Brand")
 08391                        .HasMaxLength(255)
 08392                        .HasColumnType("varchar(255)");
 08393
 08394                    b.Property<DateTime>("CompletedAtUtc")
 08395                        .HasColumnType("datetime(6)");
 08396
 08397                    b.Property<long>("DurationMs")
 08398                        .HasColumnType("bigint");
 08399
 08400                    b.Property<string>("ErrorMessage")
 08401                        .HasMaxLength(2000)
 08402                        .HasColumnType("varchar(2000)");
 08403
 08404                    b.Property<int>("OffersCount")
 08405                        .HasColumnType("int");
 08406
 08407                    b.Property<int>("OrderId")
 08408                        .HasColumnType("int");
 08409
 08410                    b.Property<int>("ProductId")
 08411                        .HasColumnType("int");
 08412
 08413                    b.Property<string>("ProviderKey")
 08414                        .IsRequired()
 08415                        .HasMaxLength(64)
 08416                        .HasColumnType("varchar(64)");
 08417
 08418                    b.Property<string>("RequestParametersJson")
 08419                        .HasColumnType("longtext");
 08420
 08421                    b.Property<DateTime>("RequestedAtUtc")
 08422                        .HasColumnType("datetime(6)");
 08423
 08424                    b.Property<string>("Status")
 08425                        .IsRequired()
 08426                        .HasMaxLength(16)
 08427                        .HasColumnType("varchar(16)");
 08428
 08429                    b.Property<int?>("SupplierId")
 08430                        .HasColumnType("int");
 08431
 08432                    b.HasKey("Id");
 08433
 08434                    b.HasIndex("SupplierId");
 08435
 08436                    b.HasIndex("OrderId", "RequestedAtUtc")
 08437                        .HasDatabaseName("IX_SupplierQuotationRequests_Order_RequestedAtUtc");
 08438
 08439                    b.HasIndex("ProductId", "RequestedAtUtc")
 08440                        .HasDatabaseName("IX_SupplierQuotationRequests_Product_RequestedAtUtc");
 08441
 08442                    b.ToTable("SupplierQuotationRequests");
 08443                });
 8444
 08445            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 08446                {
 08447                    b.Property<long>("Id")
 08448                        .ValueGeneratedOnAdd()
 08449                        .HasColumnType("bigint");
 08450
 08451                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08452
 08453                    b.Property<int?>("ActiveOrderId")
 08454                        .HasColumnType("int");
 08455
 08456                    b.Property<long?>("CartItemId")
 08457                        .HasColumnType("bigint");
 08458
 08459                    b.Property<DateTime>("CreatedAt")
 08460                        .HasColumnType("datetime(6)");
 08461
 08462                    b.Property<string>("CreatedBy")
 08463                        .HasMaxLength(450)
 08464                        .HasColumnType("varchar(450)");
 08465
 08466                    b.Property<int?>("DeliveryDaysMax")
 08467                        .HasColumnType("int");
 08468
 08469                    b.Property<int?>("DeliveryDaysMin")
 08470                        .HasColumnType("int");
 08471
 08472                    b.Property<string>("Direction")
 08473                        .HasMaxLength(255)
 08474                        .HasColumnType("varchar(255)");
 08475
 08476                    b.Property<DateTime?>("ExpectedDeliveryAt")
 08477                        .HasColumnType("datetime(6)");
 08478
 08479                    b.Property<string>("ExternalBasketItemId")
 08480                        .HasMaxLength(50)
 08481                        .HasColumnType("varchar(50)");
 08482
 08483                    b.Property<string>("ExternalLineId")
 08484                        .HasMaxLength(50)
 08485                        .HasColumnType("varchar(50)");
 08486
 08487                    b.Property<string>("ExternalOrderId")
 08488                        .HasMaxLength(50)
 08489                        .HasColumnType("varchar(50)");
 08490
 08491                    b.Property<string>("ExternalOrderNumber")
 08492                        .HasMaxLength(50)
 08493                        .HasColumnType("varchar(50)");
 08494
 08495                    b.Property<DateTime?>("LastStatusChangeAt")
 08496                        .HasColumnType("datetime(6)");
 08497
 08498                    b.Property<DateTime?>("LastSyncedAt")
 08499                        .HasColumnType("datetime(6)");
 08500
 08501                    b.Property<int>("OrderId")
 08502                        .HasColumnType("int");
 08503
 08504                    b.Property<DateTime?>("OrderedAt")
 08505                        .HasColumnType("datetime(6)");
 08506
 08507                    b.Property<string>("ProviderKey")
 08508                        .IsRequired()
 08509                        .HasMaxLength(64)
 08510                        .HasColumnType("varchar(64)");
 08511
 08512                    b.Property<decimal?>("QuantityConfirmed")
 08513                        .HasPrecision(18, 3)
 08514                        .HasColumnType("decimal(18,3)");
 08515
 08516                    b.Property<decimal?>("QuantityOrdered")
 08517                        .HasPrecision(18, 3)
 08518                        .HasColumnType("decimal(18,3)");
 08519
 08520                    b.Property<decimal?>("QuantityRejected")
 08521                        .HasPrecision(18, 3)
 08522                        .HasColumnType("decimal(18,3)");
 08523
 08524                    b.Property<decimal?>("QuantityShipped")
 08525                        .HasPrecision(18, 3)
 08526                        .HasColumnType("decimal(18,3)");
 08527
 08528                    b.Property<string>("Stage")
 08529                        .IsRequired()
 08530                        .HasMaxLength(20)
 08531                        .HasColumnType("varchar(20)");
 08532
 08533                    b.Property<int?>("SupplierId")
 08534                        .HasColumnType("int");
 08535
 08536                    b.Property<int?>("SupplierStatusId")
 08537                        .HasColumnType("int");
 08538
 08539                    b.Property<string>("SyncError")
 08540                        .HasMaxLength(1000)
 08541                        .HasColumnType("varchar(1000)");
 08542
 08543                    b.Property<DateTime>("UpdatedAt")
 08544                        .HasColumnType("datetime(6)");
 08545
 08546                    b.HasKey("Id");
 08547
 08548                    b.HasIndex("ExternalOrderNumber");
 08549
 08550                    b.HasIndex("OrderId");
 08551
 08552                    b.HasIndex("SupplierStatusId");
 08553
 08554                    b.HasIndex("ProviderKey", "ActiveOrderId")
 08555                        .IsUnique()
 08556                        .HasDatabaseName("UX_OrderSupplierStates_Provider_ActiveOrderId");
 08557
 08558                    b.HasIndex("ProviderKey", "Stage", "LastSyncedAt")
 08559                        .HasDatabaseName("IX_OrderSupplierStates_Provider_Stage_LastSyncedAt");
 08560
 08561                    b.ToTable("OrderSupplierStates");
 08562                });
 8563
 08564            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 08565                {
 08566                    b.Property<long>("Id")
 08567                        .ValueGeneratedOnAdd()
 08568                        .HasColumnType("bigint");
 08569
 08570                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08571
 08572                    b.Property<string>("Comment")
 08573                        .HasMaxLength(500)
 08574                        .HasColumnType("varchar(500)");
 08575
 08576                    b.Property<string>("FromStage")
 08577                        .HasMaxLength(20)
 08578                        .HasColumnType("varchar(20)");
 08579
 08580                    b.Property<int?>("FromSupplierStatusId")
 08581                        .HasColumnType("int");
 08582
 08583                    b.Property<int?>("OrderHistoryId")
 08584                        .HasColumnType("int");
 08585
 08586                    b.Property<int>("OrderId")
 08587                        .HasColumnType("int");
 08588
 08589                    b.Property<long>("OrderSupplierStateId")
 08590                        .HasColumnType("bigint");
 08591
 08592                    b.Property<DateTime>("PerformedAt")
 08593                        .HasColumnType("datetime(6)");
 08594
 08595                    b.Property<string>("PerformedBy")
 08596                        .HasMaxLength(450)
 08597                        .HasColumnType("varchar(450)");
 08598
 08599                    b.Property<string>("Source")
 08600                        .IsRequired()
 08601                        .HasMaxLength(30)
 08602                        .HasColumnType("varchar(30)");
 08603
 08604                    b.Property<string>("ToStage")
 08605                        .IsRequired()
 08606                        .HasMaxLength(20)
 08607                        .HasColumnType("varchar(20)");
 08608
 08609                    b.Property<int?>("ToSupplierStatusId")
 08610                        .HasColumnType("int");
 08611
 08612                    b.HasKey("Id");
 08613
 08614                    b.HasIndex("OrderHistoryId");
 08615
 08616                    b.HasIndex("OrderSupplierStateId")
 08617                        .HasDatabaseName("IX_OrderSupplierStateHistory_StateId");
 08618
 08619                    b.HasIndex("OrderId", "PerformedAt");
 08620
 08621                    b.ToTable("OrderSupplierStateHistory");
 08622                });
 8623
 08624            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 08625                {
 08626                    b.Property<int>("Id")
 08627                        .ValueGeneratedOnAdd()
 08628                        .HasColumnType("int");
 08629
 08630                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08631
 08632                    b.Property<DateTime>("CreatedAt")
 08633                        .HasColumnType("datetime(6)");
 08634
 08635                    b.Property<string>("ExternalCode")
 08636                        .HasMaxLength(64)
 08637                        .HasColumnType("varchar(64)");
 08638
 08639                    b.Property<bool>("IsFinal")
 08640                        .HasColumnType("tinyint(1)");
 08641
 08642                    b.Property<string>("Name")
 08643                        .IsRequired()
 08644                        .HasMaxLength(200)
 08645                        .HasColumnType("varchar(200)");
 08646
 08647                    b.Property<string>("ProviderKey")
 08648                        .IsRequired()
 08649                        .HasMaxLength(64)
 08650                        .HasColumnType("varchar(64)");
 08651
 08652                    b.Property<int?>("SortOrder")
 08653                        .HasColumnType("int");
 08654
 08655                    b.Property<int?>("StatusColorId")
 08656                        .HasColumnType("int");
 08657
 08658                    b.Property<string>("StatusKind")
 08659                        .IsRequired()
 08660                        .HasMaxLength(10)
 08661                        .HasColumnType("varchar(10)");
 08662
 08663                    b.Property<int?>("SupplierId")
 08664                        .HasColumnType("int");
 08665
 08666                    b.HasKey("Id");
 08667
 08668                    b.HasIndex("StatusColorId");
 08669
 08670                    b.HasIndex("SupplierId");
 08671
 08672                    b.HasIndex("ProviderKey", "StatusKind", "ExternalCode")
 08673                        .HasDatabaseName("IX_SupplierStatuses_Provider_Kind_ExternalCode");
 08674
 08675                    b.HasIndex("ProviderKey", "StatusKind", "Name")
 08676                        .IsUnique()
 08677                        .HasDatabaseName("UX_SupplierStatuses_Provider_Kind_Name");
 08678
 08679                    b.ToTable("SupplierStatuses");
 08680                });
 8681
 08682            modelBuilder.Entity("OzonDomains.Models.SystemAlertIncident", b =>
 08683                {
 08684                    b.Property<long>("Id")
 08685                        .ValueGeneratedOnAdd()
 08686                        .HasColumnType("bigint");
 08687
 08688                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08689
 08690                    b.Property<DateTime?>("AcknowledgedAtUtc")
 08691                        .HasColumnType("datetime(6)");
 08692
 08693                    b.Property<string>("AcknowledgedBy")
 08694                        .HasMaxLength(100)
 08695                        .HasColumnType("varchar(100)");
 08696
 08697                    b.Property<DateTime?>("ConfirmedAtUtc")
 08698                        .HasColumnType("datetime(6)");
 08699
 08700                    b.Property<int>("ConsecutiveObservations")
 08701                        .HasColumnType("int");
 08702
 08703                    b.Property<string>("Details")
 08704                        .HasMaxLength(1000)
 08705                        .HasColumnType("varchar(1000)");
 08706
 08707                    b.Property<string>("Domain")
 08708                        .IsRequired()
 08709                        .HasMaxLength(64)
 08710                        .HasColumnType("varchar(64)");
 08711
 08712                    b.Property<DateTime>("FirstObservedAtUtc")
 08713                        .HasColumnType("datetime(6)");
 08714
 08715                    b.Property<bool>("IsActive")
 08716                        .HasColumnType("tinyint(1)");
 08717
 08718                    b.Property<string>("Key")
 08719                        .IsRequired()
 08720                        .HasMaxLength(160)
 08721                        .HasColumnType("varchar(160)");
 08722
 08723                    b.Property<DateTime>("LastObservedAtUtc")
 08724                        .HasColumnType("datetime(6)");
 08725
 08726                    b.Property<string>("MutedBy")
 08727                        .HasMaxLength(100)
 08728                        .HasColumnType("varchar(100)");
 08729
 08730                    b.Property<DateTime?>("MutedUntilUtc")
 08731                        .HasColumnType("datetime(6)");
 08732
 08733                    b.Property<int>("OccurrenceCount")
 08734                        .HasColumnType("int");
 08735
 08736                    b.Property<int>("OrderCount")
 08737                        .HasColumnType("int");
 08738
 08739                    b.Property<string>("OrdersJson")
 08740                        .HasColumnType("longtext");
 08741
 08742                    b.Property<DateTime?>("ResolvedAtUtc")
 08743                        .HasColumnType("datetime(6)");
 08744
 08745                    b.Property<string>("Severity")
 08746                        .IsRequired()
 08747                        .HasMaxLength(16)
 08748                        .HasColumnType("varchar(16)");
 08749
 08750                    b.Property<string>("Title")
 08751                        .IsRequired()
 08752                        .HasMaxLength(500)
 08753                        .HasColumnType("varchar(500)");
 08754
 08755                    b.Property<string>("Url")
 08756                        .HasMaxLength(2000)
 08757                        .HasColumnType("varchar(2000)");
 08758
 08759                    b.HasKey("Id");
 08760
 08761                    b.HasIndex("LastObservedAtUtc");
 08762
 08763                    b.HasIndex("Key", "IsActive");
 08764
 08765                    b.ToTable("SystemAlertIncidents");
 08766                });
 8767
 08768            modelBuilder.Entity("OzonDomains.Models.SystemMonitoringSignal", b =>
 08769                {
 08770                    b.Property<long>("Id")
 08771                        .ValueGeneratedOnAdd()
 08772                        .HasColumnType("bigint");
 08773
 08774                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08775
 08776                    b.Property<string>("Message")
 08777                        .HasMaxLength(500)
 08778                        .HasColumnType("varchar(500)");
 08779
 08780                    b.Property<DateTime>("OccurredAtUtc")
 08781                        .HasColumnType("datetime(6)");
 08782
 08783                    b.Property<string>("Outcome")
 08784                        .IsRequired()
 08785                        .HasMaxLength(16)
 08786                        .HasColumnType("varchar(16)");
 08787
 08788                    b.Property<string>("ScopeKey")
 08789                        .HasMaxLength(120)
 08790                        .HasColumnType("varchar(120)");
 08791
 08792                    b.Property<string>("SourceKey")
 08793                        .IsRequired()
 08794                        .HasMaxLength(100)
 08795                        .HasColumnType("varchar(100)");
 08796
 08797                    b.HasKey("Id");
 08798
 08799                    b.HasIndex("SourceKey", "OccurredAtUtc");
 08800
 08801                    b.ToTable("SystemMonitoringSignals");
 08802                });
 8803
 08804            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 08805                {
 08806                    b.Property<int>("Id")
 08807                        .ValueGeneratedOnAdd()
 08808                        .HasColumnType("int");
 08809
 08810                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08811
 08812                    b.Property<string>("Comment")
 08813                        .HasColumnType("longtext");
 08814
 08815                    b.Property<string>("CreateBy")
 08816                        .HasMaxLength(50)
 08817                        .HasColumnType("varchar(50)");
 08818
 08819                    b.Property<DateTime?>("CreatedDateTime")
 08820                        .HasColumnType("datetime(6)");
 08821
 08822                    b.Property<int?>("Type")
 08823                        .HasColumnType("int");
 08824
 08825                    b.HasKey("Id");
 08826
 08827                    b.ToTable("Transactions");
 08828                });
 8829
 08830            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 08831                {
 08832                    b.Property<long>("Id")
 08833                        .ValueGeneratedOnAdd()
 08834                        .HasColumnType("bigint");
 08835
 08836                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08837
 08838                    b.Property<int?>("AccessProfileId")
 08839                        .HasColumnType("int");
 08840
 08841                    b.Property<string>("Comment")
 08842                        .HasMaxLength(1000)
 08843                        .HasColumnType("varchar(1000)");
 08844
 08845                    b.Property<DateTime>("CompletedAtUtc")
 08846                        .HasColumnType("datetime(6)");
 08847
 08848                    b.Property<DateTime>("CreatedAtUtc")
 08849                        .HasColumnType("datetime(6)");
 08850
 08851                    b.Property<int>("DurationSeconds")
 08852                        .HasColumnType("int");
 08853
 08854                    b.Property<int>("OrdersCountFinal")
 08855                        .HasColumnType("int");
 08856
 08857                    b.Property<DateTime>("StartedAtUtc")
 08858                        .HasColumnType("datetime(6)");
 08859
 08860                    b.Property<string>("TrackingKey")
 08861                        .IsRequired()
 08862                        .HasMaxLength(64)
 08863                        .HasColumnType("varchar(64)");
 08864
 08865                    b.Property<long?>("TrackingSessionId")
 08866                        .HasColumnType("bigint");
 08867
 08868                    b.Property<long>("TransactionId")
 08869                        .HasColumnType("bigint");
 08870
 08871                    b.Property<string>("TransactionType")
 08872                        .IsRequired()
 08873                        .HasMaxLength(64)
 08874                        .HasColumnType("varchar(64)");
 08875
 08876                    b.Property<string>("TransactionUrl")
 08877                        .IsRequired()
 08878                        .HasMaxLength(1000)
 08879                        .HasColumnType("varchar(1000)");
 08880
 08881                    b.Property<string>("UserName")
 08882                        .IsRequired()
 08883                        .HasMaxLength(256)
 08884                        .HasColumnType("varchar(256)");
 08885
 08886                    b.HasKey("Id");
 08887
 08888                    b.HasIndex("AccessProfileId")
 08889                        .HasDatabaseName("IX_TransactionTimeTrackingResults_AccessProfileId");
 08890
 08891                    b.HasIndex("TrackingKey")
 08892                        .IsUnique()
 08893                        .HasDatabaseName("UX_TransactionTimeTrackingResults_TrackingKey");
 08894
 08895                    b.HasIndex("TrackingSessionId")
 08896                        .HasDatabaseName("FK_TransactionTimeTrackingResults_SessionId");
 08897
 08898                    b.HasIndex("TransactionId");
 08899
 08900                    b.HasIndex("TransactionType", "CompletedAtUtc");
 08901
 08902                    b.HasIndex("UserName", "CompletedAtUtc");
 08903
 08904                    b.ToTable("TransactionTimeTrackingResults");
 08905                });
 8906
 08907            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingSession", b =>
 08908                {
 08909                    b.Property<long>("Id")
 08910                        .ValueGeneratedOnAdd()
 08911                        .HasColumnType("bigint");
 08912
 08913                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08914
 08915                    b.Property<int?>("AccessProfileId")
 08916                        .HasColumnType("int");
 08917
 08918                    b.Property<string>("ClientIp")
 08919                        .HasMaxLength(64)
 08920                        .HasColumnType("varchar(64)");
 08921
 08922                    b.Property<DateTime?>("CompletedAtUtc")
 08923                        .HasColumnType("datetime(6)");
 08924
 08925                    b.Property<DateTime>("CreatedAtUtc")
 08926                        .HasColumnType("datetime(6)");
 08927
 08928                    b.Property<bool>("IsAbandoned")
 08929                        .HasColumnType("tinyint(1)");
 08930
 08931                    b.Property<bool>("IsCompleted")
 08932                        .HasColumnType("tinyint(1)");
 08933
 08934                    b.Property<DateTime?>("LastSeenAtUtc")
 08935                        .HasColumnType("datetime(6)");
 08936
 08937                    b.Property<string>("OrderIdsJson")
 08938                        .HasColumnType("longtext");
 08939
 08940                    b.Property<int>("OrdersCountInitial")
 08941                        .HasColumnType("int");
 08942
 08943                    b.Property<string>("SourceUrl")
 08944                        .HasMaxLength(1000)
 08945                        .HasColumnType("varchar(1000)");
 08946
 08947                    b.Property<DateTime>("StartedAtUtc")
 08948                        .HasColumnType("datetime(6)");
 08949
 08950                    b.Property<string>("TrackingKey")
 08951                        .IsRequired()
 08952                        .HasMaxLength(64)
 08953                        .HasColumnType("varchar(64)");
 08954
 08955                    b.Property<string>("TransactionType")
 08956                        .IsRequired()
 08957                        .HasMaxLength(64)
 08958                        .HasColumnType("varchar(64)");
 08959
 08960                    b.Property<string>("UserAgent")
 08961                        .HasMaxLength(512)
 08962                        .HasColumnType("varchar(512)");
 08963
 08964                    b.Property<string>("UserName")
 08965                        .IsRequired()
 08966                        .HasMaxLength(256)
 08967                        .HasColumnType("varchar(256)");
 08968
 08969                    b.HasKey("Id");
 08970
 08971                    b.HasIndex("AccessProfileId")
 08972                        .HasDatabaseName("IX_TransactionTimeTrackingSessions_AccessProfileId");
 08973
 08974                    b.HasIndex("TrackingKey")
 08975                        .IsUnique()
 08976                        .HasDatabaseName("UX_TransactionTimeTrackingSessions_TrackingKey");
 08977
 08978                    b.HasIndex("TransactionType", "StartedAtUtc");
 08979
 08980                    b.HasIndex("UserName", "StartedAtUtc");
 08981
 08982                    b.HasIndex("IsCompleted", "IsAbandoned", "StartedAtUtc")
 08983                        .HasDatabaseName("IX_TransactionTimeTrackingSessionsAbandoned_StartedAtUtc");
 08984
 08985                    b.ToTable("TransactionTimeTrackingSessions");
 08986                });
 8987
 08988            modelBuilder.Entity("OzonDomains.Models.TransactionTypeSetting", b =>
 08989                {
 08990                    b.Property<int>("TransactionType")
 08991                        .HasColumnType("int");
 08992
 08993                    b.Property<string>("Color")
 08994                        .HasMaxLength(16)
 08995                        .HasColumnType("varchar(16)");
 08996
 08997                    b.Property<string>("DefaultsJson")
 08998                        .HasColumnType("text");
 08999
 09000                    b.Property<int?>("DisplayOrder")
 09001                        .HasColumnType("int");
 09002
 09003                    b.Property<string>("Group")
 09004                        .HasMaxLength(60)
 09005                        .HasColumnType("varchar(60)");
 09006
 09007                    b.Property<string>("Hint")
 09008                        .HasMaxLength(1000)
 09009                        .HasColumnType("varchar(1000)");
 09010
 09011                    b.Property<string>("Icon")
 09012                        .HasMaxLength(80)
 09013                        .HasColumnType("varchar(80)");
 09014
 09015                    b.Property<bool>("IsEnabled")
 09016                        .HasColumnType("tinyint(1)");
 09017
 09018                    b.Property<string>("ShortName")
 09019                        .HasMaxLength(40)
 09020                        .HasColumnType("varchar(40)");
 09021
 09022                    b.Property<string>("Title")
 09023                        .HasMaxLength(100)
 09024                        .HasColumnType("varchar(100)");
 09025
 09026                    b.Property<DateTime>("UpdatedAt")
 09027                        .HasColumnType("datetime(6)");
 09028
 09029                    b.Property<string>("UpdatedBy")
 09030                        .HasMaxLength(255)
 09031                        .HasColumnType("varchar(255)");
 09032
 09033                    b.Property<bool>("UseGrid")
 09034                        .HasColumnType("tinyint(1)");
 09035
 09036                    b.HasKey("TransactionType");
 09037
 09038                    b.ToTable("TransactionTypeSettings");
 09039                });
 9040
 09041            modelBuilder.Entity("OzonDomains.Models.UserSidebarSetting", b =>
 09042                {
 09043                    b.Property<int>("Id")
 09044                        .ValueGeneratedOnAdd()
 09045                        .HasColumnType("int");
 09046
 09047                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09048
 09049                    b.Property<string>("Key")
 09050                        .IsRequired()
 09051                        .HasMaxLength(64)
 09052                        .HasColumnType("varchar(64)");
 09053
 09054                    b.Property<DateTime>("UpdatedAt")
 09055                        .HasColumnType("datetime(6)");
 09056
 09057                    b.Property<string>("UserId")
 09058                        .IsRequired()
 09059                        .HasMaxLength(255)
 09060                        .HasColumnType("varchar(255)");
 09061
 09062                    b.Property<string>("Value")
 09063                        .IsRequired()
 09064                        .HasColumnType("longtext");
 09065
 09066                    b.Property<long>("Version")
 09067                        .HasColumnType("bigint");
 09068
 09069                    b.HasKey("Id");
 09070
 09071                    b.HasIndex("UserId", "Key")
 09072                        .IsUnique();
 09073
 09074                    b.ToTable("UserSidebarSettings");
 09075                });
 9076
 09077            modelBuilder.Entity("OzonDomains.Models.Warehouse", b =>
 09078                {
 09079                    b.Property<int>("Id")
 09080                        .ValueGeneratedOnAdd()
 09081                        .HasColumnType("int");
 09082
 09083                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09084
 09085                    b.Property<string>("Name")
 09086                        .HasMaxLength(50)
 09087                        .HasColumnType("varchar(50)");
 09088
 09089                    b.HasKey("Id");
 09090
 09091                    b.ToTable("Warehouses");
 09092                });
 9093
 09094            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 09095                {
 09096                    b.Property<int>("Id")
 09097                        .ValueGeneratedOnAdd()
 09098                        .HasColumnType("int");
 09099
 09100                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09101
 09102                    b.Property<string>("BitrixWarehouseName")
 09103                        .IsRequired()
 09104                        .HasColumnType("varchar(200)");
 09105
 09106                    b.Property<string>("DeliveryType")
 09107                        .HasColumnType("varchar(100)");
 09108
 09109                    b.Property<int?>("OzonClientId")
 09110                        .HasColumnType("int");
 09111
 09112                    b.Property<string>("OzonWarehouseId")
 09113                        .HasColumnType("varchar(32)");
 09114
 09115                    b.Property<string>("OzonWarehouseName")
 09116                        .IsRequired()
 09117                        .HasColumnType("varchar(200)");
 09118
 09119                    b.Property<int>("Priority")
 09120                        .HasColumnType("int");
 09121
 09122                    b.Property<string>("ReturnBitrixWarehouseName")
 09123                        .HasColumnType("varchar(255)");
 09124
 09125                    b.Property<int?>("SupplierId")
 09126                        .HasColumnType("int");
 09127
 09128                    b.Property<string>("TransitBitrixWarehouseName")
 09129                        .HasColumnType("varchar(255)");
 09130
 09131                    b.HasKey("Id");
 09132
 09133                    b.HasIndex("OzonClientId")
 09134                        .HasDatabaseName("FK_WarehouseMapping_OzonClient");
 09135
 09136                    b.HasIndex("SupplierId");
 09137
 09138                    b.ToTable("WarehouseMapping");
 09139                });
 9140
 09141            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 09142                {
 09143                    b.Property<long>("Id")
 09144                        .ValueGeneratedOnAdd()
 09145                        .HasColumnType("bigint");
 09146
 09147                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09148
 09149                    b.Property<decimal?>("AccountingPriceUnit")
 09150                        .HasColumnType("decimal(18,4)");
 09151
 09152                    b.Property<string>("Article")
 09153                        .HasMaxLength(128)
 09154                        .HasColumnType("varchar(128)");
 09155
 09156                    b.Property<decimal?>("B1Qty")
 09157                        .HasColumnType("decimal(18,4)");
 09158
 09159                    b.Property<decimal?>("B2Qty")
 09160                        .HasColumnType("decimal(18,4)");
 09161
 09162                    b.Property<decimal?>("C0")
 09163                        .HasColumnType("decimal(18,4)");
 09164
 09165                    b.Property<decimal?>("C1ExistMinus5Percent")
 09166                        .HasColumnType("decimal(18,4)");
 09167
 09168                    b.Property<decimal?>("C1PercentToC0")
 09169                        .HasColumnType("decimal(18,4)");
 09170
 09171                    b.Property<decimal?>("ExistPrice")
 09172                        .HasColumnType("decimal(18,4)");
 09173
 09174                    b.Property<decimal?>("M1Qty")
 09175                        .HasColumnType("decimal(18,4)");
 09176
 09177                    b.Property<decimal?>("M2Qty")
 09178                        .HasColumnType("decimal(18,4)");
 09179
 09180                    b.Property<decimal?>("M3Qty")
 09181                        .HasColumnType("decimal(18,4)");
 09182
 09183                    b.Property<string>("Manufacturer")
 09184                        .HasMaxLength(255)
 09185                        .HasColumnType("varchar(255)");
 09186
 09187                    b.Property<decimal?>("PriceDiffAccountingMinusSale")
 09188                        .HasColumnType("decimal(18,4)");
 09189
 09190                    b.Property<string>("ProductName")
 09191                        .HasMaxLength(512)
 09192                        .HasColumnType("varchar(512)");
 09193
 09194                    b.Property<string>("RowKey")
 09195                        .IsRequired()
 09196                        .HasMaxLength(128)
 09197                        .HasColumnType("varchar(128)");
 09198
 09199                    b.Property<string>("SaleFlag")
 09200                        .HasMaxLength(128)
 09201                        .HasColumnType("varchar(128)");
 09202
 09203                    b.Property<decimal?>("SalePriceUnit")
 09204                        .HasColumnType("decimal(18,4)");
 09205
 09206                    b.Property<int>("SourceRowNumber")
 09207                        .HasColumnType("int");
 09208
 09209                    b.Property<string>("SourceSheetName")
 09210                        .IsRequired()
 09211                        .HasMaxLength(128)
 09212                        .HasColumnType("varchar(128)");
 09213
 09214                    b.Property<string>("SourceType")
 09215                        .IsRequired()
 09216                        .HasMaxLength(32)
 09217                        .HasColumnType("varchar(32)");
 09218
 09219                    b.Property<DateTime>("SourceUpdatedAtUtc")
 09220                        .HasColumnType("datetime(6)");
 09221
 09222                    b.Property<decimal?>("StockAmountByC0")
 09223                        .HasColumnType("decimal(18,4)");
 09224
 09225                    b.Property<long>("SyncRunId")
 09226                        .HasColumnType("bigint");
 09227
 09228                    b.Property<DateTime>("SyncedAtUtc")
 09229                        .HasColumnType("datetime(6)");
 09230
 09231                    b.Property<decimal?>("TotalCost")
 09232                        .HasColumnType("decimal(18,4)");
 09233
 09234                    b.Property<decimal?>("UnitCost")
 09235                        .HasColumnType("decimal(18,4)");
 09236
 09237                    b.Property<string>("Warehouse")
 09238                        .HasMaxLength(32)
 09239                        .HasColumnType("varchar(32)");
 09240
 09241                    b.HasKey("Id");
 09242
 09243                    b.HasIndex("Article");
 09244
 09245                    b.HasIndex("Manufacturer");
 09246
 09247                    b.HasIndex("RowKey")
 09248                        .IsUnique()
 09249                        .HasDatabaseName("UX_WarehouseStockSnapshot_RowKey");
 09250
 09251                    b.HasIndex("SyncRunId")
 09252                        .HasDatabaseName("FK_WarehouseStockSnapshot_SyncRun");
 09253
 09254                    b.HasIndex("SyncedAtUtc");
 09255
 09256                    b.HasIndex("Warehouse");
 09257
 09258                    b.ToTable("WarehouseStockSnapshot");
 09259                });
 9260
 09261            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 09262                {
 09263                    b.Property<long>("Id")
 09264                        .ValueGeneratedOnAdd()
 09265                        .HasColumnType("bigint");
 09266
 09267                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09268
 09269                    b.Property<DateTime?>("CompletedAtUtc")
 09270                        .HasColumnType("datetime(6)");
 09271
 09272                    b.Property<DateTime>("CreatedAtUtc")
 09273                        .HasColumnType("datetime(6)");
 09274
 09275                    b.Property<string>("ErrorMessage")
 09276                        .HasColumnType("text");
 09277
 09278                    b.Property<int>("RowsRead")
 09279                        .HasColumnType("int");
 09280
 09281                    b.Property<int>("RowsSaved")
 09282                        .HasColumnType("int");
 09283
 09284                    b.Property<string>("SourceFileName")
 09285                        .HasMaxLength(255)
 09286                        .HasColumnType("varchar(255)");
 09287
 09288                    b.Property<string>("SourceType")
 09289                        .IsRequired()
 09290                        .HasMaxLength(32)
 09291                        .HasColumnType("varchar(32)");
 09292
 09293                    b.Property<DateTime>("StartedAtUtc")
 09294                        .HasColumnType("datetime(6)");
 09295
 09296                    b.Property<string>("Status")
 09297                        .IsRequired()
 09298                        .HasMaxLength(32)
 09299                        .HasColumnType("varchar(32)");
 09300
 09301                    b.Property<string>("TriggeredBy")
 09302                        .HasMaxLength(255)
 09303                        .HasColumnType("varchar(255)");
 09304
 09305                    b.HasKey("Id");
 09306
 09307                    b.HasIndex("StartedAtUtc");
 09308
 09309                    b.HasIndex("Status");
 09310
 09311                    b.ToTable("WarehouseStockSyncRuns");
 09312                });
 9313
 09314            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 09315                {
 09316                    b.Property<long>("Id")
 09317                        .ValueGeneratedOnAdd()
 09318                        .HasColumnType("bigint");
 09319
 09320                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 09321
 09322                    b.Property<int?>("ActiveStudioOrderId")
 09323                        .HasColumnType("int");
 09324
 09325                    b.Property<string>("Article")
 09326                        .IsRequired()
 09327                        .HasMaxLength(80)
 09328                        .HasColumnType("varchar(80)");
 09329
 09330                    b.Property<string>("Brand")
 09331                        .IsRequired()
 09332                        .HasMaxLength(120)
 09333                        .HasColumnType("varchar(120)");
 09334
 09335                    b.Property<string>("CodeDocB")
 09336                        .IsRequired()
 09337                        .HasMaxLength(40)
 09338                        .HasColumnType("varchar(40)");
 09339
 09340                    b.Property<long>("CodeOrder")
 09341                        .HasColumnType("bigint");
 09342
 09343                    b.Property<int>("CodeRegion")
 09344                        .HasColumnType("int");
 09345
 09346                    b.Property<DateTime>("CreatedAtUtc")
 09347                        .HasColumnType("datetime(6)");
 09348
 09349                    b.Property<string>("CreatedBy")
 09350                        .HasMaxLength(450)
 09351                        .HasColumnType("varchar(450)");
 09352
 09353                    b.Property<int>("DeliveryDays")
 09354                        .HasColumnType("int");
 09355
 09356                    b.Property<int?>("ExternalStatusCode")
 09357                        .HasColumnType("int");
 09358
 09359                    b.Property<string>("ExternalStatusName")
 09360                        .HasMaxLength(120)
 09361                        .HasColumnType("varchar(120)");
 09362
 09363                    b.Property<string>("LastError")
 09364                        .HasMaxLength(1000)
 09365                        .HasColumnType("varchar(1000)");
 09366
 09367                    b.Property<decimal?>("MinSumOrder")
 09368                        .HasPrecision(18, 4)
 09369                        .HasColumnType("decimal(18,4)");
 09370
 09371                    b.Property<int>("MinimumQuantity")
 09372                        .HasColumnType("int");
 09373
 09374                    b.Property<DateTime?>("OrderedAtUtc")
 09375                        .HasColumnType("datetime(6)");
 09376
 09377                    b.Property<string>("ProductName")
 09378                        .HasMaxLength(255)
 09379                        .HasColumnType("varchar(255)");
 09380
 09381                    b.Property<string>("ProviderKey")
 09382                        .IsRequired()
 09383                        .HasMaxLength(64)
 09384                        .HasColumnType("varchar(64)");
 09385
 09386                    b.Property<int?>("QtyMax")
 09387                        .HasColumnType("int");
 09388
 09389                    b.Property<int>("Quantity")
 09390                        .HasColumnType("int");
 09391
 09392                    b.Property<string>("SellerLocation")
 09393                        .HasMaxLength(200)
 09394                        .HasColumnType("varchar(200)");
 09395
 09396                    b.Property<string>("SellerName")
 09397                        .HasMaxLength(200)
 09398                        .HasColumnType("varchar(200)");
 09399
 09400                    b.Property<string>("SellerUserKey")
 09401                        .HasMaxLength(255)
 09402                        .HasColumnType("varchar(255)");
 09403
 09404                    b.Property<decimal?>("SourcePrice")
 09405                        .HasPrecision(18, 4)
 09406                        .HasColumnType("decimal(18,4)");
 09407
 09408                    b.Property<string>("Status")
 09409                        .IsRequired()
 09410                        .HasMaxLength(20)
 09411                        .HasColumnType("varchar(20)");
 09412
 09413                    b.Property<int>("StudioOrderId")
 09414                        .HasColumnType("int");
 09415
 09416                    b.Property<DateTime?>("TestedAtUtc")
 09417                        .HasColumnType("datetime(6)");
 09418
 09419                    b.Property<DateTime>("UpdatedAtUtc")
 09420                        .HasColumnType("datetime(6)");
 09421
 09422                    b.HasKey("Id");
 09423
 09424                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 09425                        .IsUnique();
 09426
 09427                    b.HasIndex("ProviderKey", "CodeOrder");
 09428
 09429                    b.HasIndex("StudioOrderId", "Status");
 09430
 09431                    b.ToTable("ZZapCartItems");
 09432                });
 9433
 09434            modelBuilder.Entity("OzonDomains.StatusColor", b =>
 09435                {
 09436                    b.Property<int>("Id")
 09437                        .ValueGeneratedOnAdd()
 09438                        .HasColumnType("int");
 09439
 09440                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09441
 09442                    b.Property<string>("ColorCode")
 09443                        .IsRequired()
 09444                        .HasMaxLength(20)
 09445                        .HasColumnType("varchar(20)");
 09446
 09447                    b.HasKey("Id");
 09448
 09449                    b.ToTable("StatusColors");
 09450                });
 9451
 09452            modelBuilder.Entity("OzonRepositories.Data.Bitrix.PriceHistory", b =>
 09453                {
 09454                    b.Property<int>("Id")
 09455                        .ValueGeneratedOnAdd()
 09456                        .HasColumnType("int");
 09457
 09458                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09459
 09460                    b.Property<string>("Article")
 09461                        .IsRequired()
 09462                        .HasColumnType("varchar(100)");
 09463
 09464                    b.Property<string>("Author")
 09465                        .HasColumnType("varchar(100)");
 09466
 09467                    b.Property<int>("BitrixId")
 09468                        .HasColumnType("int");
 09469
 09470                    b.Property<DateTime>("CreateDateTime")
 09471                        .HasColumnType("datetime");
 09472
 09473                    b.Property<string>("Currency")
 09474                        .HasColumnType("varchar(10)");
 09475
 09476                    b.Property<decimal>("PriceValue")
 09477                        .HasColumnType("decimal(18,2)");
 09478
 09479                    b.Property<decimal>("RegistrationPrice")
 09480                        .HasColumnType("decimal(18,2)");
 09481
 09482                    b.Property<string>("ValueSource")
 09483                        .HasColumnType("varchar(100)");
 09484
 09485                    b.HasKey("Id");
 09486
 09487                    b.HasIndex("Article")
 09488                        .HasDatabaseName("IX_PriceHistories_Article");
 09489
 09490                    b.HasIndex("BitrixId")
 09491                        .HasDatabaseName("IX_PriceHistories_BitrixId");
 09492
 09493                    b.HasIndex("CreateDateTime")
 09494                        .HasDatabaseName("IX_PriceHistories_CreateDateTime");
 09495
 09496                    b.HasIndex("Article", "CreateDateTime")
 09497                        .HasDatabaseName("IX_PriceHistories_Article_CreateDateTime");
 09498
 09499                    b.ToTable("PriceHistories");
 09500                });
 9501
 09502            modelBuilder.Entity("AccessProfileDataScopeSet", b =>
 09503                {
 09504                    b.HasOne("OzonDomains.Models.AccessControl.AccessProfile", null)
 09505                        .WithMany()
 09506                        .HasForeignKey("AccessProfilesId")
 09507                        .OnDelete(DeleteBehavior.Cascade)
 09508                        .IsRequired();
 09509
 09510                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", null)
 09511                        .WithMany()
 09512                        .HasForeignKey("DataScopeSetsId")
 09513                        .OnDelete(DeleteBehavior.Cascade)
 09514                        .IsRequired();
 09515                });
 9516
 09517            modelBuilder.Entity("OzonDomains.Delivery", b =>
 09518                {
 09519                    b.HasOne("OzonDomains.Models.DeliveryProvider", "Provider")
 09520                        .WithMany("Deliveries")
 09521                        .HasForeignKey("ProviderId")
 09522                        .OnDelete(DeleteBehavior.Cascade)
 09523                        .IsRequired()
 09524                        .HasConstraintName("Deliveries_ibfk_1");
 09525
 09526                    b.Navigation("Provider");
 09527                });
 9528
 09529            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSetItem", b =>
 09530                {
 09531                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", "DataScopeSet")
 09532                        .WithMany("Items")
 09533                        .HasForeignKey("DataScopeSetId")
 09534                        .OnDelete(DeleteBehavior.Cascade)
 09535                        .IsRequired()
 09536                        .HasConstraintName("FK_DataScopeSetItems_DataScopeSets");
 09537
 09538                    b.Navigation("DataScopeSet");
 09539                });
 9540
 09541            modelBuilder.Entity("OzonDomains.Models.ApiSupplierSettings", b =>
 09542                {
 09543                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 09544                        .WithMany()
 09545                        .HasForeignKey("SupplierId")
 09546                        .OnDelete(DeleteBehavior.SetNull);
 09547
 09548                    b.Navigation("Supplier");
 09549                });
 9550
 09551            modelBuilder.Entity("OzonDomains.Models.ApiSupplierWarehouse", b =>
 09552                {
 09553                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 09554                        .WithMany()
 09555                        .HasForeignKey("WarehouseId")
 09556                        .OnDelete(DeleteBehavior.Cascade)
 09557                        .IsRequired()
 09558                        .HasConstraintName("FK_ApiSupplierWarehouses_Warehouses");
 09559
 09560                    b.Navigation("Warehouse");
 09561                });
 9562
 09563            modelBuilder.Entity("OzonDomains.Models.AppStatus", b =>
 09564                {
 09565                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 09566                        .WithMany()
 09567                        .HasForeignKey("StatusColorId")
 09568                        .HasConstraintName("FK_AppStatuses_StatusColors");
 09569
 09570                    b.Navigation("StatusColor");
 09571                });
 9572
 09573            modelBuilder.Entity("OzonDomains.Models.ArmtekCartItem", b =>
 09574                {
 09575                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09576                        .WithMany()
 09577                        .HasForeignKey("StudioOrderId")
 09578                        .OnDelete(DeleteBehavior.Restrict)
 09579                        .IsRequired();
 09580
 09581                    b.Navigation("StudioOrder");
 09582                });
 9583
 09584            modelBuilder.Entity("OzonDomains.Models.ArmtekDeliveryAddressMapping", b =>
 09585                {
 09586                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09587                        .WithMany()
 09588                        .HasForeignKey("ShipmentWarehouseId")
 09589                        .OnDelete(DeleteBehavior.Restrict)
 09590                        .IsRequired();
 09591
 09592                    b.Navigation("ShipmentWarehouse");
 09593                });
 9594
 09595            modelBuilder.Entity("OzonDomains.Models.ArmtekOrderItem", b =>
 09596                {
 09597                    b.HasOne("OzonDomains.Models.ArmtekCartItem", "ArmtekCartItem")
 09598                        .WithMany()
 09599                        .HasForeignKey("ArmtekCartItemId")
 09600                        .OnDelete(DeleteBehavior.SetNull)
 09601                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekCartItems");
 09602
 09603                    b.HasOne("OzonDomains.Models.ArmtekOrder", "ArmtekOrder")
 09604                        .WithMany("Items")
 09605                        .HasForeignKey("ArmtekOrderId")
 09606                        .OnDelete(DeleteBehavior.Cascade)
 09607                        .IsRequired()
 09608                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekOrders");
 09609
 09610                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09611                        .WithMany()
 09612                        .HasForeignKey("StudioOrderId")
 09613                        .OnDelete(DeleteBehavior.Restrict)
 09614                        .IsRequired();
 09615
 09616                    b.Navigation("ArmtekCartItem");
 09617
 09618                    b.Navigation("ArmtekOrder");
 09619
 09620                    b.Navigation("StudioOrder");
 09621                });
 9622
 09623            modelBuilder.Entity("OzonDomains.Models.AssemblyListRunItem", b =>
 09624                {
 09625                    b.HasOne("OzonDomains.Models.AssemblyListRun", "Run")
 09626                        .WithMany("Items")
 09627                        .HasForeignKey("RunId")
 09628                        .OnDelete(DeleteBehavior.Cascade)
 09629                        .IsRequired();
 09630
 09631                    b.Navigation("Run");
 09632                });
 9633
 09634            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 09635                {
 09636                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Page")
 09637                        .WithMany("Fields")
 09638                        .HasForeignKey("PageId")
 09639                        .OnDelete(DeleteBehavior.SetNull);
 09640
 09641                    b.Navigation("Page");
 09642                });
 9643
 09644            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 09645                {
 09646                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Parent")
 09647                        .WithMany("Children")
 09648                        .HasForeignKey("ParentId")
 09649                        .OnDelete(DeleteBehavior.Restrict);
 09650
 09651                    b.Navigation("Parent");
 09652                });
 9653
 09654            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleDataScope", b =>
 09655                {
 09656                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09657                        .WithMany("DataScopes")
 09658                        .HasForeignKey("AppRoleId")
 09659                        .OnDelete(DeleteBehavior.Cascade)
 09660                        .IsRequired();
 09661
 09662                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09663                        .WithMany("RoleLinks")
 09664                        .HasForeignKey("DataScopeId")
 09665                        .OnDelete(DeleteBehavior.Cascade)
 09666                        .IsRequired();
 09667
 09668                    b.Navigation("AppRole");
 09669
 09670                    b.Navigation("DataScope");
 09671                });
 9672
 09673            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleFieldPermission", b =>
 09674                {
 09675                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09676                        .WithMany("RolePermissions")
 09677                        .HasForeignKey("AppFieldId")
 09678                        .OnDelete(DeleteBehavior.Cascade)
 09679                        .IsRequired();
 09680
 09681                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09682                        .WithMany("FieldPermissions")
 09683                        .HasForeignKey("AppRoleId")
 09684                        .OnDelete(DeleteBehavior.Cascade)
 09685                        .IsRequired();
 09686
 09687                    b.Navigation("AppField");
 09688
 09689                    b.Navigation("AppRole");
 09690                });
 9691
 09692            modelBuilder.Entity("OzonDomains.Models.Authorization.RolePagePermission", b =>
 09693                {
 09694                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09695                        .WithMany("RolePermissions")
 09696                        .HasForeignKey("AppPageId")
 09697                        .OnDelete(DeleteBehavior.Cascade)
 09698                        .IsRequired();
 09699
 09700                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09701                        .WithMany("PagePermissions")
 09702                        .HasForeignKey("AppRoleId")
 09703                        .OnDelete(DeleteBehavior.Cascade)
 09704                        .IsRequired();
 09705
 09706                    b.Navigation("AppPage");
 09707
 09708                    b.Navigation("AppRole");
 09709                });
 9710
 09711            modelBuilder.Entity("OzonDomains.Models.Authorization.UserAppRole", b =>
 09712                {
 09713                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09714                        .WithMany("UserLinks")
 09715                        .HasForeignKey("AppRoleId")
 09716                        .OnDelete(DeleteBehavior.Cascade)
 09717                        .IsRequired();
 09718
 09719                    b.Navigation("AppRole");
 09720                });
 9721
 09722            modelBuilder.Entity("OzonDomains.Models.Authorization.UserDataScope", b =>
 09723                {
 09724                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09725                        .WithMany("UserLinks")
 09726                        .HasForeignKey("DataScopeId")
 09727                        .OnDelete(DeleteBehavior.Cascade)
 09728                        .IsRequired();
 09729
 09730                    b.Navigation("DataScope");
 09731                });
 9732
 09733            modelBuilder.Entity("OzonDomains.Models.Authorization.UserFieldOverride", b =>
 09734                {
 09735                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09736                        .WithMany("UserOverrides")
 09737                        .HasForeignKey("AppFieldId")
 09738                        .OnDelete(DeleteBehavior.Cascade)
 09739                        .IsRequired();
 09740
 09741                    b.Navigation("AppField");
 09742                });
 9743
 09744            modelBuilder.Entity("OzonDomains.Models.Authorization.UserPageOverride", b =>
 09745                {
 09746                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09747                        .WithMany("UserOverrides")
 09748                        .HasForeignKey("AppPageId")
 09749                        .OnDelete(DeleteBehavior.Cascade)
 09750                        .IsRequired();
 09751
 09752                    b.Navigation("AppPage");
 09753                });
 9754
 09755            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 09756                {
 09757                    b.HasOne("OzonDomains.Models.BackgroundJobSchedule", "Schedule")
 09758                        .WithMany("Executions")
 09759                        .HasForeignKey("ScheduleId")
 09760                        .HasConstraintName("fk_execution_schedule");
 09761
 09762                    b.Navigation("Schedule");
 09763                });
 9764
 09765            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 09766                {
 09767                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09768                        .WithMany()
 09769                        .HasForeignKey("OzonClientId")
 09770                        .HasConstraintName("fk_schedule_ozon_client");
 09771
 09772                    b.Navigation("OzonClient");
 09773                });
 9774
 09775            modelBuilder.Entity("OzonDomains.Models.BackgroundJobStep", b =>
 09776                {
 09777                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09778                        .WithMany("Steps")
 09779                        .HasForeignKey("ExecutionId")
 09780                        .OnDelete(DeleteBehavior.Cascade)
 09781                        .IsRequired()
 09782                        .HasConstraintName("fk_step_execution");
 09783
 09784                    b.Navigation("Execution");
 09785                });
 9786
 09787            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 09788                {
 09789                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09790                        .WithMany("OrderMatches")
 09791                        .HasForeignKey("ExecutionId")
 09792                        .OnDelete(DeleteBehavior.Cascade)
 09793                        .IsRequired()
 09794                        .HasConstraintName("fk_match_execution");
 09795
 09796                    b.HasOne("OzonDomains.Models.Order", "Order")
 09797                        .WithMany()
 09798                        .HasForeignKey("OrderId")
 09799                        .HasConstraintName("fk_match_order");
 09800
 09801                    b.HasOne("OzonDomains.Models.BackgroundReportLoad", "ReportLoad")
 09802                        .WithMany()
 09803                        .HasForeignKey("ReportLoadId")
 09804                        .HasConstraintName("fk_match_report");
 09805
 09806                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09807                        .WithMany()
 09808                        .HasForeignKey("StepId")
 09809                        .HasConstraintName("fk_match_step");
 09810
 09811                    b.Navigation("Execution");
 09812
 09813                    b.Navigation("Order");
 09814
 09815                    b.Navigation("ReportLoad");
 09816
 09817                    b.Navigation("Step");
 09818                });
 9819
 09820            modelBuilder.Entity("OzonDomains.Models.BackgroundReportLoad", b =>
 09821                {
 09822                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09823                        .WithMany("ReportLoads")
 09824                        .HasForeignKey("ExecutionId")
 09825                        .OnDelete(DeleteBehavior.Cascade)
 09826                        .IsRequired()
 09827                        .HasConstraintName("fk_report_execution");
 09828
 09829                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09830                        .WithMany()
 09831                        .HasForeignKey("OzonClientId")
 09832                        .OnDelete(DeleteBehavior.Cascade)
 09833                        .IsRequired()
 09834                        .HasConstraintName("fk_report_ozon_client");
 09835
 09836                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09837                        .WithMany()
 09838                        .HasForeignKey("StepId")
 09839                        .HasConstraintName("fk_report_step");
 09840
 09841                    b.Navigation("Execution");
 09842
 09843                    b.Navigation("OzonClient");
 09844
 09845                    b.Navigation("Step");
 09846                });
 9847
 09848            modelBuilder.Entity("OzonDomains.Models.BackgroundTransactionResult", b =>
 09849                {
 09850                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09851                        .WithMany("TransactionResults")
 09852                        .HasForeignKey("ExecutionId")
 09853                        .OnDelete(DeleteBehavior.Cascade)
 09854                        .IsRequired()
 09855                        .HasConstraintName("fk_result_execution");
 09856
 09857                    b.HasOne("OzonDomains.Models.Order", "Order")
 09858                        .WithMany()
 09859                        .HasForeignKey("OrderId")
 09860                        .OnDelete(DeleteBehavior.Cascade)
 09861                        .IsRequired()
 09862                        .HasConstraintName("fk_result_order");
 09863
 09864                    b.HasOne("OzonDomains.Models.BackgroundOrderMatch", "OrderMatch")
 09865                        .WithMany("TransactionResults")
 09866                        .HasForeignKey("OrderMatchId")
 09867                        .HasConstraintName("fk_result_match");
 09868
 09869                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09870                        .WithMany()
 09871                        .HasForeignKey("StepId")
 09872                        .HasConstraintName("fk_result_step");
 09873
 09874                    b.HasOne("OzonDomains.Models.Transaction", "Transaction")
 09875                        .WithMany()
 09876                        .HasForeignKey("TransactionId")
 09877                        .HasConstraintName("fk_result_transaction");
 09878
 09879                    b.Navigation("Execution");
 09880
 09881                    b.Navigation("Order");
 09882
 09883                    b.Navigation("OrderMatch");
 09884
 09885                    b.Navigation("Step");
 09886
 09887                    b.Navigation("Transaction");
 09888                });
 9889
 09890            modelBuilder.Entity("OzonDomains.Models.BergCartItem", b =>
 09891                {
 09892                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09893                        .WithMany()
 09894                        .HasForeignKey("StudioOrderId")
 09895                        .OnDelete(DeleteBehavior.Restrict)
 09896                        .IsRequired();
 09897
 09898                    b.Navigation("StudioOrder");
 09899                });
 9900
 09901            modelBuilder.Entity("OzonDomains.Models.BergDeliveryAddressMapping", b =>
 09902                {
 09903                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09904                        .WithMany()
 09905                        .HasForeignKey("ShipmentWarehouseId")
 09906                        .OnDelete(DeleteBehavior.Restrict)
 09907                        .IsRequired()
 09908                        .HasConstraintName("FK_BergDeliveryAddressMappings_Warehouses");
 09909
 09910                    b.Navigation("ShipmentWarehouse");
 09911                });
 9912
 09913            modelBuilder.Entity("OzonDomains.Models.BergOrderItem", b =>
 09914                {
 09915                    b.HasOne("OzonDomains.Models.BergCartItem", null)
 09916                        .WithMany()
 09917                        .HasForeignKey("BergCartItemId")
 09918                        .OnDelete(DeleteBehavior.SetNull)
 09919                        .HasConstraintName("FK_BergOrderItems_BergCartItems");
 09920
 09921                    b.HasOne("OzonDomains.Models.BergOrder", "BergOrder")
 09922                        .WithMany("Items")
 09923                        .HasForeignKey("BergOrderId")
 09924                        .OnDelete(DeleteBehavior.Cascade)
 09925                        .IsRequired()
 09926                        .HasConstraintName("FK_BergOrderItems_BergOrders");
 09927
 09928                    b.HasOne("OzonDomains.Models.Order", null)
 09929                        .WithMany()
 09930                        .HasForeignKey("StudioOrderId")
 09931                        .OnDelete(DeleteBehavior.Restrict)
 09932                        .IsRequired();
 09933
 09934                    b.Navigation("BergOrder");
 09935                });
 9936
 09937            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveItem", b =>
 09938                {
 09939                    b.HasOne("OzonDomains.Models.BitrixStockArchiveExecution", "Execution")
 09940                        .WithMany("Items")
 09941                        .HasForeignKey("ExecutionId")
 09942                        .OnDelete(DeleteBehavior.Cascade)
 09943                        .IsRequired()
 09944                        .HasConstraintName("fk_archive_item_execution");
 09945
 09946                    b.Navigation("Execution");
 09947                });
 9948
 09949            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 09950                {
 09951                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09952                        .WithMany()
 09953                        .HasForeignKey("OzonClientId")
 09954                        .OnDelete(DeleteBehavior.Cascade)
 09955                        .IsRequired();
 09956
 09957                    b.Navigation("OzonClient");
 09958                });
 9959
 09960            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoScheduleRun", b =>
 09961                {
 09962                    b.HasOne("OzonDomains.Models.BitrixStockAutoSchedule", "Schedule")
 09963                        .WithMany("Runs")
 09964                        .HasForeignKey("ScheduleId")
 09965                        .OnDelete(DeleteBehavior.Cascade)
 09966                        .IsRequired()
 09967                        .HasConstraintName("fk_auto_run_schedule");
 09968
 09969                    b.Navigation("Schedule");
 09970                });
 9971
 09972            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearItem", b =>
 09973                {
 09974                    b.HasOne("OzonDomains.Models.BitrixStockClearExecution", "Execution")
 09975                        .WithMany("Items")
 09976                        .HasForeignKey("ExecutionId")
 09977                        .OnDelete(DeleteBehavior.Cascade)
 09978                        .IsRequired()
 09979                        .HasConstraintName("fk_clear_item_execution");
 09980
 09981                    b.Navigation("Execution");
 09982                });
 9983
 09984            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushItem", b =>
 09985                {
 09986                    b.HasOne("OzonDomains.Models.BitrixStockPushExecution", "Execution")
 09987                        .WithMany("Items")
 09988                        .HasForeignKey("ExecutionId")
 09989                        .OnDelete(DeleteBehavior.Cascade)
 09990                        .IsRequired()
 09991                        .HasConstraintName("fk_push_item_execution");
 09992
 09993                    b.Navigation("Execution");
 09994                });
 9995
 09996            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveItem", b =>
 09997                {
 09998                    b.HasOne("OzonDomains.Models.BitrixStockUnarchiveExecution", "Execution")
 09999                        .WithMany("Items")
 010000                        .HasForeignKey("ExecutionId")
 010001                        .OnDelete(DeleteBehavior.Cascade)
 010002                        .IsRequired()
 010003                        .HasConstraintName("fk_unarchive_item_execution");
 010004
 010005                    b.Navigation("Execution");
 010006                });
 10007
 010008            modelBuilder.Entity("OzonDomains.Models.ClientStatus", b =>
 010009                {
 010010                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010011                        .WithMany()
 010012                        .HasForeignKey("StatusColorId")
 010013                        .HasConstraintName("FK_clientstatuses_StatusColors_StatusColorId");
 010014
 010015                    b.Navigation("StatusColor");
 010016                });
 10017
 010018            modelBuilder.Entity("OzonDomains.Models.ColumnMapping", b =>
 010019                {
 010020                    b.HasOne("OzonDomains.Models.OzonClient", "SelectedClient")
 010021                        .WithMany()
 010022                        .HasForeignKey("SelectedClientId");
 010023
 010024                    b.HasOne("OzonDomains.Models.Manufacturer", "SelectedManufacturer")
 010025                        .WithMany()
 010026                        .HasForeignKey("SelectedManufacturerId");
 010027
 010028                    b.HasOne("OzonDomains.Models.Supplier", "SelectedSupplier")
 010029                        .WithMany()
 010030                        .HasForeignKey("SelectedSupplierId");
 010031
 010032                    b.HasOne("OzonDomains.Models.Warehouse", "SelectedWarehouse")
 010033                        .WithMany()
 010034                        .HasForeignKey("SelectedWarehouseId");
 010035
 010036                    b.Navigation("SelectedClient");
 010037
 010038                    b.Navigation("SelectedManufacturer");
 010039
 010040                    b.Navigation("SelectedSupplier");
 010041
 010042                    b.Navigation("SelectedWarehouse");
 010043                });
 10044
 010045            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 010046                {
 010047                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 010048                        .WithMany("Attachments")
 010049                        .HasForeignKey("EmailMessageInboxId")
 010050                        .OnDelete(DeleteBehavior.Cascade)
 010051                        .IsRequired()
 010052                        .HasConstraintName("FK_EmailAttachmentInboxes_EmailMessageInboxes");
 010053
 010054                    b.Navigation("EmailMessage");
 010055                });
 10056
 010057            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentProcessingResult", b =>
 010058                {
 010059                    b.HasOne("OzonDomains.Models.EmailAttachmentInbox", "Attachment")
 010060                        .WithMany("ProcessingResults")
 010061                        .HasForeignKey("EmailAttachmentInboxId")
 010062                        .OnDelete(DeleteBehavior.Cascade)
 010063                        .IsRequired()
 010064                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailAttachmentInboxes");
 010065
 010066                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 010067                        .WithMany()
 010068                        .HasForeignKey("EmailMessageInboxId")
 010069                        .OnDelete(DeleteBehavior.Cascade)
 010070                        .IsRequired()
 010071                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailMessageInboxes");
 010072
 010073                    b.HasOne("OzonDomains.Models.EmailRoutingRule", "Rule")
 010074                        .WithMany()
 010075                        .HasForeignKey("EmailRoutingRuleId")
 010076                        .OnDelete(DeleteBehavior.SetNull)
 010077                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailRoutingRules");
 010078
 010079                    b.Navigation("Attachment");
 010080
 010081                    b.Navigation("EmailMessage");
 010082
 010083                    b.Navigation("Rule");
 010084                });
 10085
 010086            modelBuilder.Entity("OzonDomains.Models.ExcludedArticle", b =>
 010087                {
 010088                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010089                        .WithMany()
 010090                        .HasForeignKey("OzonClientId")
 010091                        .OnDelete(DeleteBehavior.Cascade)
 010092                        .IsRequired()
 010093                        .HasConstraintName("FK_ExcludedArticles_OzonClients");
 010094
 010095                    b.Navigation("OzonClient");
 010096                });
 10097
 010098            modelBuilder.Entity("OzonDomains.Models.FavoritPartsCartItem", b =>
 010099                {
 010100                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010101                        .WithMany()
 010102                        .HasForeignKey("StudioOrderId")
 010103                        .OnDelete(DeleteBehavior.Restrict)
 010104                        .IsRequired();
 010105
 010106                    b.Navigation("StudioOrder");
 010107                });
 10108
 010109            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrderItem", b =>
 010110                {
 010111                    b.HasOne("OzonDomains.Models.FavoritPartsCartItem", "FavoritPartsCartItem")
 010112                        .WithMany()
 010113                        .HasForeignKey("FavoritPartsCartItemId")
 010114                        .OnDelete(DeleteBehavior.SetNull)
 010115                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsCartItems");
 010116
 010117                    b.HasOne("OzonDomains.Models.FavoritPartsOrder", "FavoritPartsOrder")
 010118                        .WithMany("Items")
 010119                        .HasForeignKey("FavoritPartsOrderId")
 010120                        .OnDelete(DeleteBehavior.Cascade)
 010121                        .IsRequired()
 010122                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsOrders");
 010123
 010124                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010125                        .WithMany()
 010126                        .HasForeignKey("StudioOrderId")
 010127                        .OnDelete(DeleteBehavior.Restrict)
 010128                        .IsRequired();
 010129
 010130                    b.Navigation("FavoritPartsCartItem");
 010131
 010132                    b.Navigation("FavoritPartsOrder");
 010133
 010134                    b.Navigation("StudioOrder");
 010135                });
 10136
 010137            modelBuilder.Entity("OzonDomains.Models.FidStatItem", b =>
 010138                {
 010139                    b.HasOne("OzonDomains.Models.FidStatSnapshot", "Snapshot")
 010140                        .WithMany("Items")
 010141                        .HasForeignKey("SnapshotId")
 010142                        .OnDelete(DeleteBehavior.Cascade)
 010143                        .IsRequired()
 010144                        .HasConstraintName("FK_FidStatItems_Snapshot");
 010145
 010146                    b.Navigation("Snapshot");
 010147                });
 10148
 010149            modelBuilder.Entity("OzonDomains.Models.ForumAutoCartItem", b =>
 010150                {
 010151                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010152                        .WithMany()
 010153                        .HasForeignKey("StudioOrderId")
 010154                        .OnDelete(DeleteBehavior.Restrict)
 010155                        .IsRequired();
 010156
 010157                    b.Navigation("StudioOrder");
 010158                });
 10159
 010160            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrderItem", b =>
 010161                {
 010162                    b.HasOne("OzonDomains.Models.ForumAutoCartItem", "ForumAutoCartItem")
 010163                        .WithMany()
 010164                        .HasForeignKey("ForumAutoCartItemId")
 010165                        .OnDelete(DeleteBehavior.SetNull)
 010166                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoCartItems");
 010167
 010168                    b.HasOne("OzonDomains.Models.ForumAutoOrder", "ForumAutoOrder")
 010169                        .WithMany("Items")
 010170                        .HasForeignKey("ForumAutoOrderId")
 010171                        .OnDelete(DeleteBehavior.Cascade)
 010172                        .IsRequired()
 010173                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoOrders");
 010174
 010175                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010176                        .WithMany()
 010177                        .HasForeignKey("StudioOrderId")
 010178                        .OnDelete(DeleteBehavior.Restrict)
 010179                        .IsRequired();
 010180
 010181                    b.Navigation("ForumAutoCartItem");
 010182
 010183                    b.Navigation("ForumAutoOrder");
 010184
 010185                    b.Navigation("StudioOrder");
 010186                });
 10187
 010188            modelBuilder.Entity("OzonDomains.Models.InterpartsWarehouseLogin", b =>
 010189                {
 010190                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 010191                        .WithMany()
 010192                        .HasForeignKey("WarehouseId")
 010193                        .OnDelete(DeleteBehavior.Cascade)
 010194                        .IsRequired();
 010195
 010196                    b.Navigation("Warehouse");
 010197                });
 10198
 010199            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedRow", b =>
 010200                {
 010201                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 010202                        .WithMany("MatchedRows")
 010203                        .HasForeignKey("MatchedResultId");
 010204                });
 10205
 010206            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchingColumn", b =>
 010207                {
 010208                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 010209                        .WithMany("MatchedColumns")
 010210                        .HasForeignKey("MatchedResultId");
 010211
 010212                    b.HasOne("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", null)
 010213                        .WithMany("MatchingColumns")
 010214                        .HasForeignKey("SavedMatchingColumnId");
 010215                });
 10216
 010217            modelBuilder.Entity("OzonDomains.Models.MikadoCartItem", b =>
 010218                {
 010219                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010220                        .WithMany()
 010221                        .HasForeignKey("StudioOrderId")
 010222                        .OnDelete(DeleteBehavior.Restrict)
 010223                        .IsRequired()
 010224                        .HasConstraintName("FK_MikadoCartItems_Orders");
 010225
 010226                    b.Navigation("StudioOrder");
 010227                });
 10228
 010229            modelBuilder.Entity("OzonDomains.Models.MlAutoCartItem", b =>
 010230                {
 010231                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010232                        .WithMany()
 010233                        .HasForeignKey("StudioOrderId")
 010234                        .OnDelete(DeleteBehavior.Cascade)
 010235                        .IsRequired()
 010236                        .HasConstraintName("FK_MlAutoCartItems_Orders");
 010237
 010238                    b.Navigation("StudioOrder");
 010239                });
 10240
 010241            modelBuilder.Entity("OzonDomains.Models.MlAutoDeliveryAddressMapping", b =>
 010242                {
 010243                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010244                        .WithMany()
 010245                        .HasForeignKey("ShipmentWarehouseId")
 010246                        .OnDelete(DeleteBehavior.Restrict)
 010247                        .IsRequired()
 010248                        .HasConstraintName("FK_MlAutoDeliveryAddressMappings_Warehouses");
 010249
 010250                    b.Navigation("ShipmentWarehouse");
 010251                });
 10252
 010253            modelBuilder.Entity("OzonDomains.Models.MlAutoOrderItem", b =>
 010254                {
 010255                    b.HasOne("OzonDomains.Models.MlAutoOrder", "MlAutoOrder")
 010256                        .WithMany("Items")
 010257                        .HasForeignKey("MlAutoOrderId")
 010258                        .OnDelete(DeleteBehavior.Cascade)
 010259                        .IsRequired()
 010260                        .HasConstraintName("FK_MlAutoOrderItems_Orders");
 010261
 010262                    b.Navigation("MlAutoOrder");
 010263                });
 10264
 010265            modelBuilder.Entity("OzonDomains.Models.MlAutoRuCartItem", b =>
 010266                {
 010267                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010268                        .WithMany()
 010269                        .HasForeignKey("StudioOrderId")
 010270                        .OnDelete(DeleteBehavior.Cascade)
 010271                        .IsRequired()
 010272                        .HasConstraintName("FK_MlAutoRuCartItems_Orders");
 010273
 010274                    b.Navigation("StudioOrder");
 010275                });
 10276
 010277            modelBuilder.Entity("OzonDomains.Models.MlAutoRuDeliveryAddressMapping", b =>
 010278                {
 010279                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010280                        .WithMany()
 010281                        .HasForeignKey("ShipmentWarehouseId")
 010282                        .OnDelete(DeleteBehavior.Restrict)
 010283                        .IsRequired()
 010284                        .HasConstraintName("FK_MlAutoRuDeliveryAddressMappings_Warehouses");
 010285
 010286                    b.Navigation("ShipmentWarehouse");
 010287                });
 10288
 010289            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrderItem", b =>
 010290                {
 010291                    b.HasOne("OzonDomains.Models.MlAutoRuOrder", "MlAutoRuOrder")
 010292                        .WithMany("Items")
 010293                        .HasForeignKey("MlAutoRuOrderId")
 010294                        .OnDelete(DeleteBehavior.Cascade)
 010295                        .IsRequired()
 010296                        .HasConstraintName("FK_MlAutoRuOrderItems_Orders");
 010297
 010298                    b.Navigation("MlAutoRuOrder");
 010299                });
 10300
 010301            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraCartItem", b =>
 010302                {
 010303                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010304                        .WithMany()
 010305                        .HasForeignKey("StudioOrderId")
 010306                        .OnDelete(DeleteBehavior.Restrict)
 010307                        .IsRequired()
 010308                        .HasConstraintName("FK_MoskvorechieIstraCartItems_StudioOrder");
 010309
 010310                    b.Navigation("StudioOrder");
 010311                });
 10312
 010313            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrderItem", b =>
 010314                {
 010315                    b.HasOne("OzonDomains.Models.MoskvorechieIstraOrder", "MoskvorechieIstraOrder")
 010316                        .WithMany("Items")
 010317                        .HasForeignKey("MoskvorechieIstraOrderId")
 010318                        .OnDelete(DeleteBehavior.Cascade)
 010319                        .IsRequired()
 010320                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_Order");
 010321
 010322                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010323                        .WithMany()
 010324                        .HasForeignKey("StudioOrderId")
 010325                        .OnDelete(DeleteBehavior.Restrict)
 010326                        .IsRequired()
 010327                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_StudioOrder");
 010328
 010329                    b.Navigation("MoskvorechieIstraOrder");
 010330
 010331                    b.Navigation("StudioOrder");
 010332                });
 10333
 010334            modelBuilder.Entity("OzonDomains.Models.MotexCartItem", b =>
 010335                {
 010336                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010337                        .WithMany()
 010338                        .HasForeignKey("StudioOrderId")
 010339                        .OnDelete(DeleteBehavior.Restrict)
 010340                        .IsRequired();
 010341
 010342                    b.Navigation("StudioOrder");
 010343                });
 10344
 010345            modelBuilder.Entity("OzonDomains.Models.MotexOrderItem", b =>
 010346                {
 010347                    b.HasOne("OzonDomains.Models.MotexOrder", "MotexOrder")
 010348                        .WithMany("Items")
 010349                        .HasForeignKey("MotexOrderId")
 010350                        .OnDelete(DeleteBehavior.Cascade)
 010351                        .IsRequired();
 010352
 010353                    b.Navigation("MotexOrder");
 010354                });
 10355
 010356            modelBuilder.Entity("OzonDomains.Models.NikeiCartItem", b =>
 010357                {
 010358                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010359                        .WithMany()
 010360                        .HasForeignKey("StudioOrderId")
 010361                        .OnDelete(DeleteBehavior.Restrict)
 010362                        .IsRequired();
 010363
 010364                    b.Navigation("StudioOrder");
 010365                });
 10366
 010367            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 010368                {
 010369                    b.HasOne("OzonDomains.Models.AppStatus", "AppStatus")
 010370                        .WithMany()
 010371                        .HasForeignKey("AppStatusId");
 010372
 010373                    b.HasOne("OzonDomains.Models.ClientStatus", "ClientStatus")
 010374                        .WithMany()
 010375                        .HasForeignKey("ClientStatusId");
 010376
 010377                    b.HasOne("OzonDomains.Delivery", "Delivery")
 010378                        .WithMany("Orders")
 010379                        .HasForeignKey("DeliveryId");
 010380
 010381                    b.HasOne("OzonDomains.Models.EtProducer", "EtProducer")
 010382                        .WithMany()
 010383                        .HasForeignKey("EtProducerId")
 010384                        .OnDelete(DeleteBehavior.Restrict);
 010385
 010386                    b.HasOne("OzonDomains.Models.OrdersFileMetadata", "ExcelFileData")
 010387                        .WithMany()
 010388                        .HasForeignKey("ExcelFileDataId");
 010389
 010390                    b.HasOne("OzonDomains.Models.Manufacturer", "Manufacturer")
 010391                        .WithMany()
 010392                        .HasForeignKey("ManufacturerId");
 010393
 010394                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010395                        .WithMany()
 010396                        .HasForeignKey("OzonClientId");
 010397
 010398                    b.HasOne("OzonDomains.Models.Product", "ProductInfo")
 010399                        .WithMany()
 010400                        .HasForeignKey("ProductInfoId");
 010401
 010402                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010403                        .WithMany()
 010404                        .HasForeignKey("ShipmentWarehouseId");
 010405
 010406                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010407                        .WithMany()
 010408                        .HasForeignKey("SupplierId");
 010409
 010410                    b.HasOne("OzonDomains.Models.Transaction", null)
 010411                        .WithMany("Orders")
 010412                        .HasForeignKey("TransactionId");
 010413
 010414                    b.HasOne("OzonDomains.Models.Currency", "Сurrency")
 010415                        .WithMany()
 010416                        .HasForeignKey("СurrencyId");
 010417
 010418                    b.Navigation("AppStatus");
 010419
 010420                    b.Navigation("ClientStatus");
 010421
 010422                    b.Navigation("Delivery");
 010423
 010424                    b.Navigation("EtProducer");
 010425
 010426                    b.Navigation("ExcelFileData");
 010427
 010428                    b.Navigation("Manufacturer");
 010429
 010430                    b.Navigation("OzonClient");
 010431
 010432                    b.Navigation("ProductInfo");
 010433
 010434                    b.Navigation("ShipmentWarehouse");
 010435
 010436                    b.Navigation("Supplier");
 010437
 010438                    b.Navigation("Сurrency");
 010439                });
 10440
 010441            modelBuilder.Entity("OzonDomains.Models.OrderArchive", b =>
 010442                {
 010443                    b.HasOne("OzonDomains.Models.Order", "Order")
 010444                        .WithOne("OrderArchive")
 010445                        .HasForeignKey("OzonDomains.Models.OrderArchive", "OrderId")
 010446                        .OnDelete(DeleteBehavior.Cascade)
 010447                        .IsRequired();
 010448
 010449                    b.Navigation("Order");
 010450                });
 10451
 010452            modelBuilder.Entity("OzonDomains.Models.OrderCalculationSnapshot", b =>
 010453                {
 010454                    b.HasOne("OzonDomains.Models.Order", "Order")
 010455                        .WithMany()
 010456                        .HasForeignKey("OrderId")
 010457                        .OnDelete(DeleteBehavior.Cascade)
 010458                        .IsRequired();
 010459
 010460                    b.Navigation("Order");
 010461                });
 10462
 010463            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 010464                {
 010465                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010466                        .WithMany()
 010467                        .HasForeignKey("StatusColorId")
 010468                        .HasConstraintName("FK_ItemStatuses_StatusColors");
 010469
 010470                    b.Navigation("StatusColor");
 010471                });
 10472
 010473            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 010474                {
 010475                    b.HasOne("OzonDomains.Models.OrderCarts.CartStatus", "CartStatus")
 010476                        .WithMany("OrderCarts")
 010477                        .HasForeignKey("CartStatusId")
 010478                        .HasConstraintName("ordercarts_ibfk_1");
 010479
 010480                    b.Navigation("CartStatus");
 010481                });
 10482
 010483            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderItem", b =>
 010484                {
 010485                    b.HasOne("OzonDomains.Models.OrderCarts.ItemStatus", "ItemStatus")
 010486                        .WithMany("OrderItems")
 010487                        .HasForeignKey("ItemStatusId")
 010488                        .HasConstraintName("orderitems_ibfk_1");
 010489
 010490                    b.HasOne("OzonDomains.Models.OrderCarts.OrderCart", "OrderCart")
 010491                        .WithMany("OrderItems")
 010492                        .HasForeignKey("OrderCartId")
 010493                        .OnDelete(DeleteBehavior.Cascade)
 010494                        .IsRequired()
 010495                        .HasConstraintName("orderitems_ibfk_2");
 010496
 010497                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010498                        .WithMany()
 010499                        .HasForeignKey("StudioOrderId");
 010500
 010501                    b.Navigation("ItemStatus");
 010502
 010503                    b.Navigation("OrderCart");
 010504
 010505                    b.Navigation("StudioOrder");
 010506                });
 10507
 010508            modelBuilder.Entity("OzonDomains.Models.OrderControlRule", b =>
 010509                {
 010510                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010511                        .WithMany()
 010512                        .HasForeignKey("TargetAppRoleId")
 010513                        .OnDelete(DeleteBehavior.Restrict)
 010514                        .IsRequired();
 010515
 010516                    b.Navigation("TargetAppRole");
 010517                });
 10518
 010519            modelBuilder.Entity("OzonDomains.Models.OrderControlTask", b =>
 010520                {
 010521                    b.HasOne("OzonDomains.Models.Order", "Order")
 010522                        .WithMany()
 010523                        .HasForeignKey("OrderId")
 010524                        .OnDelete(DeleteBehavior.Cascade)
 010525                        .IsRequired();
 010526
 010527                    b.HasOne("OzonDomains.Models.OrderControlRule", "Rule")
 010528                        .WithMany()
 010529                        .HasForeignKey("RuleId")
 010530                        .OnDelete(DeleteBehavior.Restrict)
 010531                        .IsRequired();
 010532
 010533                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010534                        .WithMany()
 010535                        .HasForeignKey("TargetAppRoleId")
 010536                        .OnDelete(DeleteBehavior.Restrict)
 010537                        .IsRequired();
 010538
 010539                    b.Navigation("Order");
 010540
 010541                    b.Navigation("Rule");
 010542
 010543                    b.Navigation("TargetAppRole");
 010544                });
 10545
 010546            modelBuilder.Entity("OzonDomains.Models.OrderControlTaskEvent", b =>
 010547                {
 010548                    b.HasOne("OzonDomains.Models.OrderControlTask", "Task")
 010549                        .WithMany()
 010550                        .HasForeignKey("TaskId")
 010551                        .OnDelete(DeleteBehavior.Cascade)
 010552                        .IsRequired();
 010553
 010554                    b.Navigation("Task");
 010555                });
 10556
 010557            modelBuilder.Entity("OzonDomains.Models.OrderExtension", b =>
 010558                {
 010559                    b.HasOne("OzonDomains.Models.Order", "Order")
 010560                        .WithMany("OrderExtensions")
 010561                        .HasForeignKey("OrderId")
 010562                        .OnDelete(DeleteBehavior.Cascade)
 010563                        .IsRequired()
 010564                        .HasConstraintName("FK_OrderExtensions_Orders");
 010565
 010566                    b.Navigation("Order");
 010567                });
 10568
 010569            modelBuilder.Entity("OzonDomains.Models.OrderExtraExpense", b =>
 010570                {
 010571                    b.HasOne("OzonDomains.Models.ExpenseType", "ExpenseType")
 010572                        .WithMany("OrderExtraExpenses")
 010573                        .HasForeignKey("ExpenseTypeId")
 010574                        .OnDelete(DeleteBehavior.Cascade)
 010575                        .IsRequired()
 010576                        .HasConstraintName("FK_OrderExtraExpenses_ExpenseType");
 010577
 010578                    b.HasOne("OzonDomains.Models.Order", "Order")
 010579                        .WithMany("ExtraExpenses")
 010580                        .HasForeignKey("OrderId")
 010581                        .OnDelete(DeleteBehavior.Cascade)
 010582                        .IsRequired()
 010583                        .HasConstraintName("FK_OrderExtraExpenses_Order");
 010584
 010585                    b.Navigation("ExpenseType");
 010586
 010587                    b.Navigation("Order");
 010588                });
 10589
 010590            modelBuilder.Entity("OzonDomains.Models.OrderHistory", b =>
 010591                {
 010592                    b.HasOne("OzonDomains.Models.Order", "Order")
 010593                        .WithMany()
 010594                        .HasForeignKey("OrderId")
 010595                        .OnDelete(DeleteBehavior.Cascade)
 010596                        .IsRequired()
 010597                        .HasConstraintName("FK_OrdersHistory_Orders_OrderId");
 010598
 010599                    b.Navigation("Order");
 010600                });
 10601
 010602            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPostingLink", b =>
 010603                {
 010604                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 010605                        .WithMany()
 010606                        .HasForeignKey("OrderHistoryId")
 010607                        .OnDelete(DeleteBehavior.Cascade)
 010608                        .IsRequired()
 010609                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_History");
 010610
 010611                    b.HasOne("OzonDomains.Models.OrderHistoryOneCPosting", "Posting")
 010612                        .WithMany("HistoryLinks")
 010613                        .HasForeignKey("PostingId")
 010614                        .OnDelete(DeleteBehavior.Cascade)
 010615                        .IsRequired()
 010616                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_Posting");
 010617
 010618                    b.Navigation("OrderHistory");
 010619
 010620                    b.Navigation("Posting");
 010621                });
 10622
 010623            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionCondition", b =>
 010624                {
 010625                    b.HasOne("OzonDomains.Models.OrderOzonPromotionSnapshot", "Snapshot")
 010626                        .WithMany("Conditions")
 010627                        .HasForeignKey("SnapshotId")
 010628                        .OnDelete(DeleteBehavior.Cascade)
 010629                        .IsRequired()
 010630                        .HasConstraintName("FK_OzonPromoCondition_Snapshot");
 010631
 010632                    b.Navigation("Snapshot");
 010633                });
 10634
 010635            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 010636                {
 010637                    b.HasOne("OzonDomains.Models.Order", "Order")
 010638                        .WithOne("OzonPromotionSnapshot")
 010639                        .HasForeignKey("OzonDomains.Models.OrderOzonPromotionSnapshot", "OrderId")
 010640                        .OnDelete(DeleteBehavior.Cascade)
 010641                        .IsRequired();
 010642
 010643                    b.Navigation("Order");
 010644                });
 10645
 010646            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 010647                {
 010648                    b.HasOne("OzonDomains.Models.Order", null)
 010649                        .WithOne("OrderPrice")
 010650                        .HasForeignKey("OzonDomains.Models.OrderPrice", "OrderId")
 010651                        .OnDelete(DeleteBehavior.Cascade)
 010652                        .IsRequired();
 010653                });
 10654
 010655            modelBuilder.Entity("OzonDomains.Models.OrderReturn", b =>
 010656                {
 010657                    b.HasOne("OzonDomains.Models.Order", "Order")
 010658                        .WithMany()
 010659                        .HasForeignKey("OrderId")
 010660                        .HasConstraintName("FK_OrderReturns_Orders");
 010661
 010662                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010663                        .WithMany()
 010664                        .HasForeignKey("OzonClientId")
 010665                        .OnDelete(DeleteBehavior.Cascade)
 010666                        .IsRequired()
 010667                        .HasConstraintName("FK_OrderReturns_OzonClients");
 010668
 010669                    b.Navigation("Order");
 010670
 010671                    b.Navigation("OzonClient");
 010672                });
 10673
 010674            modelBuilder.Entity("OzonDomains.Models.OzonChatOrder", b =>
 010675                {
 010676                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010677                        .WithMany()
 010678                        .HasForeignKey("ClientId")
 010679                        .OnDelete(DeleteBehavior.Cascade)
 010680                        .IsRequired()
 010681                        .HasConstraintName("FK_OzonChatOrders_OzonClient");
 010682
 010683                    b.HasOne("OzonDomains.Models.Order", "Order")
 010684                        .WithMany()
 010685                        .HasForeignKey("OrderId")
 010686                        .OnDelete(DeleteBehavior.Cascade)
 010687                        .IsRequired()
 010688                        .HasConstraintName("FK_OzonChatOrders_Order");
 010689
 010690                    b.Navigation("Client");
 010691
 010692                    b.Navigation("Order");
 010693                });
 10694
 010695            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseStatistic", b =>
 010696                {
 010697                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010698                        .WithMany()
 010699                        .HasForeignKey("ClientId")
 010700                        .OnDelete(DeleteBehavior.Cascade)
 010701                        .IsRequired()
 010702                        .HasConstraintName("FK_OzonChatResponseStatistics_OzonClient");
 010703
 010704                    b.HasOne("OzonDomains.Models.Order", "Order")
 010705                        .WithMany()
 010706                        .HasForeignKey("OrderId")
 010707                        .HasConstraintName("FK_OzonChatResponseStatistics_Order");
 010708
 010709                    b.Navigation("Client");
 010710
 010711                    b.Navigation("Order");
 010712                });
 10713
 010714            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseTime", b =>
 010715                {
 010716                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010717                        .WithMany()
 010718                        .HasForeignKey("ClientId")
 010719                        .OnDelete(DeleteBehavior.Cascade)
 010720                        .IsRequired();
 010721
 010722                    b.Navigation("Client");
 010723                });
 10724
 010725            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 010726                {
 010727                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", "Batch")
 010728                        .WithMany("Acts")
 010729                        .HasForeignKey("BatchId")
 010730                        .OnDelete(DeleteBehavior.Cascade)
 010731                        .IsRequired();
 010732
 010733                    b.Navigation("Batch");
 010734                });
 10735
 010736            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 010737                {
 010738                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverAct", "Act")
 010739                        .WithMany("Items")
 010740                        .HasForeignKey("ActId")
 010741                        .OnDelete(DeleteBehavior.Cascade)
 010742                        .IsRequired();
 010743
 010744                    b.HasOne("OzonDomains.Models.Order", "Order")
 010745                        .WithMany()
 010746                        .HasForeignKey("OrderId");
 010747
 010748                    b.Navigation("Act");
 010749
 010750                    b.Navigation("Order");
 010751                });
 10752
 010753            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItemPhoto", b =>
 010754                {
 010755                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverActItem", "ActItem")
 010756                        .WithMany("Photos")
 010757                        .HasForeignKey("ActItemId")
 010758                        .OnDelete(DeleteBehavior.Cascade)
 010759                        .IsRequired();
 010760
 010761                    b.Navigation("ActItem");
 010762                });
 10763
 010764            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 010765                {
 010766                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010767                        .WithMany()
 010768                        .HasForeignKey("OzonClientId")
 010769                        .OnDelete(DeleteBehavior.Restrict)
 010770                        .IsRequired();
 010771
 010772                    b.Navigation("OzonClient");
 010773                });
 10774
 010775            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellationOrder", b =>
 010776                {
 010777                    b.HasOne("OzonDomains.Models.OzonPostingCancellation", "Cancellation")
 010778                        .WithMany("OrderLinks")
 010779                        .HasForeignKey("CancellationId")
 010780                        .OnDelete(DeleteBehavior.Cascade)
 010781                        .IsRequired()
 010782                        .HasConstraintName("FK_OzonPostingCancellationOrders_Cancellations_CancellationId");
 010783
 010784                    b.HasOne("OzonDomains.Models.Order", "Order")
 010785                        .WithMany()
 010786                        .HasForeignKey("OrderId")
 010787                        .OnDelete(DeleteBehavior.Cascade)
 010788                        .IsRequired();
 010789
 010790                    b.Navigation("Cancellation");
 010791
 010792                    b.Navigation("Order");
 010793                });
 10794
 010795            modelBuilder.Entity("OzonDomains.Models.PriceIndexes", b =>
 010796                {
 010797                    b.HasOne("OzonDomains.Models.OrderPrice", null)
 010798                        .WithOne("PriceIndexes")
 010799                        .HasForeignKey("OzonDomains.Models.PriceIndexes", "OrderPriceId")
 010800                        .OnDelete(DeleteBehavior.Cascade)
 010801                        .IsRequired();
 010802                });
 10803
 010804            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 010805                {
 010806                    b.HasOne("OzonDomains.Models.Product", "ReplacementProduct")
 010807                        .WithMany("ReplacedProducts")
 010808                        .HasForeignKey("ReplacementProductId")
 010809                        .OnDelete(DeleteBehavior.Restrict);
 010810
 010811                    b.Navigation("ReplacementProduct");
 010812                });
 10813
 010814            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 010815                {
 010816                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010817                        .WithMany()
 010818                        .HasForeignKey("StudioOrderId")
 010819                        .OnDelete(DeleteBehavior.Restrict)
 010820                        .IsRequired();
 010821
 010822                    b.Navigation("StudioOrder");
 010823                });
 10824
 010825            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 010826                {
 010827                    b.HasOne("OzonDomains.Models.ProfitLigaCartItem", "ProfitLigaCartItem")
 010828                        .WithMany()
 010829                        .HasForeignKey("ProfitLigaCartItemId")
 010830                        .OnDelete(DeleteBehavior.SetNull)
 010831                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 010832
 010833                    b.HasOne("OzonDomains.Models.ProfitLigaOrder", "ProfitLigaOrder")
 010834                        .WithMany("Items")
 010835                        .HasForeignKey("ProfitLigaOrderId")
 010836                        .OnDelete(DeleteBehavior.Cascade)
 010837                        .IsRequired()
 010838                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaOrders");
 010839
 010840                    b.HasOne("OzonDomains.Models.Order", null)
 010841                        .WithMany()
 010842                        .HasForeignKey("StudioOrderId")
 010843                        .OnDelete(DeleteBehavior.Restrict)
 010844                        .IsRequired();
 010845
 010846                    b.Navigation("ProfitLigaCartItem");
 010847
 010848                    b.Navigation("ProfitLigaOrder");
 010849                });
 10850
 010851            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 010852                {
 010853                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010854                        .WithMany()
 010855                        .HasForeignKey("ShipmentWarehouseId")
 010856                        .OnDelete(DeleteBehavior.Restrict)
 010857                        .IsRequired()
 010858                        .HasConstraintName("FK_ProfitLigaPointMappings_Warehouses");
 010859
 010860                    b.Navigation("ShipmentWarehouse");
 010861                });
 10862
 010863            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 010864                {
 010865                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010866                        .WithMany()
 010867                        .HasForeignKey("StudioOrderId")
 010868                        .OnDelete(DeleteBehavior.Restrict)
 010869                        .IsRequired();
 010870
 010871                    b.Navigation("StudioOrder");
 010872                });
 10873
 010874            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 010875                {
 010876                    b.HasOne("OzonDomains.Models.ShateMOrder", "ShateMOrder")
 010877                        .WithMany("Items")
 010878                        .HasForeignKey("ShateMOrderId")
 010879                        .OnDelete(DeleteBehavior.Cascade)
 010880                        .IsRequired()
 010881                        .HasConstraintName("FK_ShateMOrderItems_Orders");
 010882
 010883                    b.Navigation("ShateMOrder");
 010884                });
 10885
 010886            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 010887                {
 010888                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 010889                        .WithMany()
 010890                        .HasForeignKey("FromStatusId")
 010891                        .OnDelete(DeleteBehavior.Restrict)
 010892                        .IsRequired()
 010893                        .HasConstraintName("StatusTransitions_ibfk_1");
 010894
 010895                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 010896                        .WithMany()
 010897                        .HasForeignKey("ToStatusId")
 010898                        .OnDelete(DeleteBehavior.Restrict)
 010899                        .IsRequired()
 010900                        .HasConstraintName("StatusTransitions_ibfk_2");
 010901
 010902                    b.Navigation("FromStatus");
 010903
 010904                    b.Navigation("ToStatus");
 010905                });
 10906
 010907            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 010908                {
 010909                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 010910                        .WithMany()
 010911                        .HasForeignKey("FromStatusId")
 010912                        .OnDelete(DeleteBehavior.Restrict)
 010913                        .IsRequired()
 010914                        .HasConstraintName("StatusTransitionHistory_ibfk_2");
 010915
 010916                    b.HasOne("OzonDomains.Models.StatusTransition", "StatusTransition")
 010917                        .WithMany()
 010918                        .HasForeignKey("StatusTransitionId")
 010919                        .OnDelete(DeleteBehavior.Restrict)
 010920                        .HasConstraintName("StatusTransitionHistory_ibfk_1");
 010921
 010922                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 010923                        .WithMany()
 010924                        .HasForeignKey("ToStatusId")
 010925                        .OnDelete(DeleteBehavior.Restrict)
 010926                        .IsRequired()
 010927                        .HasConstraintName("StatusTransitionHistory_ibfk_3");
 010928
 010929                    b.Navigation("FromStatus");
 010930
 010931                    b.Navigation("StatusTransition");
 010932
 010933                    b.Navigation("ToStatus");
 010934                });
 10935
 010936            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 010937                {
 010938                    b.HasOne("OzonDomains.Models.SupplierQuotationRequest", "Request")
 010939                        .WithMany("Offers")
 010940                        .HasForeignKey("RequestId")
 010941                        .OnDelete(DeleteBehavior.Cascade)
 010942                        .IsRequired()
 010943                        .HasConstraintName("FK_SupplierQuotationOffers_Requests");
 010944
 010945                    b.Navigation("Request");
 010946                });
 10947
 010948            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 010949                {
 010950                    b.HasOne("OzonDomains.Models.Order", "Order")
 010951                        .WithMany()
 010952                        .HasForeignKey("OrderId")
 010953                        .OnDelete(DeleteBehavior.Restrict)
 010954                        .IsRequired()
 010955                        .HasConstraintName("FK_SupplierQuotationRequests_Orders");
 010956
 010957                    b.HasOne("OzonDomains.Models.Product", "Product")
 010958                        .WithMany()
 010959                        .HasForeignKey("ProductId")
 010960                        .OnDelete(DeleteBehavior.Restrict)
 010961                        .IsRequired()
 010962                        .HasConstraintName("FK_SupplierQuotationRequests_Products");
 010963
 010964                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010965                        .WithMany()
 010966                        .HasForeignKey("SupplierId")
 010967                        .OnDelete(DeleteBehavior.SetNull)
 010968                        .HasConstraintName("FK_SupplierQuotationRequests_Suppliers");
 010969
 010970                    b.Navigation("Order");
 010971
 010972                    b.Navigation("Product");
 010973
 010974                    b.Navigation("Supplier");
 010975                });
 10976
 010977            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 010978                {
 010979                    b.HasOne("OzonDomains.Models.Order", "Order")
 010980                        .WithMany()
 010981                        .HasForeignKey("OrderId")
 010982                        .OnDelete(DeleteBehavior.Restrict)
 010983                        .IsRequired();
 010984
 010985                    b.HasOne("OzonDomains.Models.SupplierStatuses.SupplierStatus", "SupplierStatus")
 010986                        .WithMany()
 010987                        .HasForeignKey("SupplierStatusId")
 010988                        .OnDelete(DeleteBehavior.SetNull);
 010989
 010990                    b.Navigation("Order");
 010991
 010992                    b.Navigation("SupplierStatus");
 010993                });
 10994
 010995            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 010996                {
 010997                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 010998                        .WithMany()
 010999                        .HasForeignKey("OrderHistoryId")
 011000                        .OnDelete(DeleteBehavior.SetNull)
 011001                        .HasConstraintName("FK_OrderSupplierStateHistory_OrderHistory_OrderHistoryId");
 011002
 011003                    b.HasOne("OzonDomains.Models.SupplierStatuses.OrderSupplierState", "OrderSupplierState")
 011004                        .WithMany()
 011005                        .HasForeignKey("OrderSupplierStateId")
 011006                        .OnDelete(DeleteBehavior.Cascade)
 011007                        .IsRequired()
 011008                        .HasConstraintName("FK_OrderSupplierStateHistory_States_OrderSupplierStateId");
 011009
 011010                    b.Navigation("OrderHistory");
 011011
 011012                    b.Navigation("OrderSupplierState");
 011013                });
 11014
 011015            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 011016                {
 011017                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 011018                        .WithMany()
 011019                        .HasForeignKey("StatusColorId")
 011020                        .OnDelete(DeleteBehavior.SetNull);
 011021
 011022                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 011023                        .WithMany()
 011024                        .HasForeignKey("SupplierId")
 011025                        .OnDelete(DeleteBehavior.SetNull);
 011026
 011027                    b.Navigation("StatusColor");
 011028
 011029                    b.Navigation("Supplier");
 011030                });
 11031
 011032            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 011033                {
 011034                    b.HasOne("OzonDomains.Models.TransactionTimeTrackingSession", "TrackingSession")
 011035                        .WithMany()
 011036                        .HasForeignKey("TrackingSessionId")
 011037                        .OnDelete(DeleteBehavior.SetNull)
 011038                        .HasConstraintName("FK_TransactionTimeTrackingResults_SessionId");
 011039
 011040                    b.Navigation("TrackingSession");
 011041                });
 11042
 011043            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 011044                {
 011045                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 011046                        .WithMany()
 011047                        .HasForeignKey("OzonClientId")
 011048                        .HasConstraintName("FK_WarehouseMapping_OzonClient");
 011049
 011050                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 011051                        .WithMany()
 011052                        .HasForeignKey("SupplierId");
 011053
 011054                    b.Navigation("OzonClient");
 011055
 011056                    b.Navigation("Supplier");
 011057                });
 11058
 011059            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 011060                {
 011061                    b.HasOne("OzonDomains.Models.WarehouseStockSyncRun", "SyncRun")
 011062                        .WithMany("SnapshotRows")
 011063                        .HasForeignKey("SyncRunId")
 011064                        .OnDelete(DeleteBehavior.Restrict)
 011065                        .IsRequired()
 011066                        .HasConstraintName("FK_WarehouseStockSnapshot_SyncRun");
 011067
 011068                    b.Navigation("SyncRun");
 011069                });
 11070
 011071            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 011072                {
 011073                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 011074                        .WithMany()
 011075                        .HasForeignKey("StudioOrderId")
 011076                        .OnDelete(DeleteBehavior.Restrict)
 011077                        .IsRequired();
 011078
 011079                    b.Navigation("StudioOrder");
 011080                });
 11081
 011082            modelBuilder.Entity("OzonDomains.Delivery", b =>
 011083                {
 011084                    b.Navigation("Orders");
 011085                });
 11086
 011087            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSet", b =>
 011088                {
 011089                    b.Navigation("Items");
 011090                });
 11091
 011092            modelBuilder.Entity("OzonDomains.Models.ArmtekOrder", b =>
 011093                {
 011094                    b.Navigation("Items");
 011095                });
 11096
 011097            modelBuilder.Entity("OzonDomains.Models.AssemblyListRun", b =>
 011098                {
 011099                    b.Navigation("Items");
 011100                });
 11101
 011102            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 011103                {
 011104                    b.Navigation("RolePermissions");
 011105
 011106                    b.Navigation("UserOverrides");
 011107                });
 11108
 011109            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 011110                {
 011111                    b.Navigation("Children");
 011112
 011113                    b.Navigation("Fields");
 011114
 011115                    b.Navigation("RolePermissions");
 011116
 011117                    b.Navigation("UserOverrides");
 011118                });
 11119
 011120            modelBuilder.Entity("OzonDomains.Models.Authorization.AppRole", b =>
 011121                {
 011122                    b.Navigation("DataScopes");
 011123
 011124                    b.Navigation("FieldPermissions");
 011125
 011126                    b.Navigation("PagePermissions");
 011127
 011128                    b.Navigation("UserLinks");
 011129                });
 11130
 011131            modelBuilder.Entity("OzonDomains.Models.Authorization.DataScope", b =>
 011132                {
 011133                    b.Navigation("RoleLinks");
 011134
 011135                    b.Navigation("UserLinks");
 011136                });
 11137
 011138            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 011139                {
 011140                    b.Navigation("OrderMatches");
 011141
 011142                    b.Navigation("ReportLoads");
 011143
 011144                    b.Navigation("Steps");
 011145
 011146                    b.Navigation("TransactionResults");
 011147                });
 11148
 011149            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 011150                {
 011151                    b.Navigation("Executions");
 011152                });
 11153
 011154            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 011155                {
 011156                    b.Navigation("TransactionResults");
 011157                });
 11158
 011159            modelBuilder.Entity("OzonDomains.Models.BergOrder", b =>
 011160                {
 011161                    b.Navigation("Items");
 011162                });
 11163
 011164            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveExecution", b =>
 011165                {
 011166                    b.Navigation("Items");
 011167                });
 11168
 011169            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 011170                {
 011171                    b.Navigation("Runs");
 011172                });
 11173
 011174            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearExecution", b =>
 011175                {
 011176                    b.Navigation("Items");
 011177                });
 11178
 011179            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushExecution", b =>
 011180                {
 011181                    b.Navigation("Items");
 011182                });
 11183
 011184            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveExecution", b =>
 011185                {
 011186                    b.Navigation("Items");
 011187                });
 11188
 011189            modelBuilder.Entity("OzonDomains.Models.DeliveryProvider", b =>
 011190                {
 011191                    b.Navigation("Deliveries");
 011192                });
 11193
 011194            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 011195                {
 011196                    b.Navigation("ProcessingResults");
 011197                });
 11198
 011199            modelBuilder.Entity("OzonDomains.Models.EmailMessageInbox", b =>
 011200                {
 011201                    b.Navigation("Attachments");
 011202                });
 11203
 011204            modelBuilder.Entity("OzonDomains.Models.ExpenseType", b =>
 011205                {
 011206                    b.Navigation("OrderExtraExpenses");
 011207                });
 11208
 011209            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrder", b =>
 011210                {
 011211                    b.Navigation("Items");
 011212                });
 11213
 011214            modelBuilder.Entity("OzonDomains.Models.FidStatSnapshot", b =>
 011215                {
 011216                    b.Navigation("Items");
 011217                });
 11218
 011219            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrder", b =>
 011220                {
 011221                    b.Navigation("Items");
 011222                });
 11223
 011224            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedResult", b =>
 011225                {
 011226                    b.Navigation("MatchedColumns");
 011227
 011228                    b.Navigation("MatchedRows");
 011229                });
 11230
 011231            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", b =>
 011232                {
 011233                    b.Navigation("MatchingColumns");
 011234                });
 11235
 011236            modelBuilder.Entity("OzonDomains.Models.MlAutoOrder", b =>
 011237                {
 011238                    b.Navigation("Items");
 011239                });
 11240
 011241            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrder", b =>
 011242                {
 011243                    b.Navigation("Items");
 011244                });
 11245
 011246            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrder", b =>
 011247                {
 011248                    b.Navigation("Items");
 011249                });
 11250
 011251            modelBuilder.Entity("OzonDomains.Models.MotexOrder", b =>
 011252                {
 011253                    b.Navigation("Items");
 011254                });
 11255
 011256            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 011257                {
 011258                    b.Navigation("ExtraExpenses");
 011259
 011260                    b.Navigation("OrderArchive");
 011261
 011262                    b.Navigation("OrderExtensions");
 011263
 011264                    b.Navigation("OrderPrice");
 011265
 011266                    b.Navigation("OzonPromotionSnapshot");
 011267                });
 11268
 011269            modelBuilder.Entity("OzonDomains.Models.OrderCarts.CartStatus", b =>
 011270                {
 011271                    b.Navigation("OrderCarts");
 011272                });
 11273
 011274            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 011275                {
 011276                    b.Navigation("OrderItems");
 011277                });
 11278
 011279            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 011280                {
 011281                    b.Navigation("OrderItems");
 011282                });
 11283
 011284            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPosting", b =>
 011285                {
 011286                    b.Navigation("HistoryLinks");
 011287                });
 11288
 011289            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 011290                {
 011291                    b.Navigation("Conditions");
 011292                });
 11293
 011294            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 011295                {
 011296                    b.Navigation("PriceIndexes");
 011297                });
 11298
 011299            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 011300                {
 011301                    b.Navigation("Items");
 011302                });
 11303
 011304            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 011305                {
 011306                    b.Navigation("Photos");
 011307                });
 11308
 011309            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", b =>
 011310                {
 011311                    b.Navigation("Acts");
 011312                });
 11313
 011314            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 011315                {
 011316                    b.Navigation("OrderLinks");
 011317                });
 11318
 011319            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 011320                {
 011321                    b.Navigation("ReplacedProducts");
 011322                });
 11323
 011324            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 011325                {
 011326                    b.Navigation("Items");
 011327                });
 11328
 011329            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 011330                {
 011331                    b.Navigation("Items");
 011332                });
 11333
 011334            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 011335                {
 011336                    b.Navigation("Offers");
 011337                });
 11338
 011339            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 011340                {
 011341                    b.Navigation("Orders");
 011342                });
 11343
 011344            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 011345                {
 011346                    b.Navigation("SnapshotRows");
 011347                });
 11348#pragma warning restore 612, 618
 011349        }
 11350    }
 11351}