< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 10675
Coverable lines: 10675
Total lines: 11029
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/20260922092624_AddApiSupplierDisplayName.cs

#LineLine coverage
 1using Microsoft.EntityFrameworkCore.Migrations;
 2
 3#nullable disable
 4
 5namespace OzonRepositories.Migrations
 6{
 7    /// <inheritdoc />
 8    public partial class AddApiSupplierDisplayName : Migration
 9    {
 10        /// <inheritdoc />
 11        protected override void Up(MigrationBuilder migrationBuilder)
 12        {
 013            migrationBuilder.AddColumn<string>(
 014                name: "DisplayName",
 015                table: "ApiSupplierSettings",
 016                type: "varchar(120)",
 017                maxLength: 120,
 018                nullable: true)
 019                .Annotation("MySql:CharSet", "utf8mb4");
 20
 021            migrationBuilder.Sql("""
 022                UPDATE ApiSupplierSettings
 023                SET DisplayName = CASE ProviderKey
 024                    WHEN 'ForumAuto' THEN 'Форум-Авто Союз (Ходынка)'
 025                    WHEN 'ForumAutoInterparts' THEN 'Форум-Авто Интерпартс (Ходынка)'
 026                    WHEN 'ForumAutoPiter' THEN 'Форум-Авто Интерпартс (Питер)'
 027                    WHEN 'ForumAutoRostov' THEN 'Форум-Авто Интерпартс (Ростов)'
 028                    WHEN 'ForumAutoIstra' THEN 'Форум-Авто Интерпартс (Истра)'
 029                    ELSE DisplayName
 030                END,
 031                IsQuotationEnabled = CASE WHEN ProviderKey = 'ForumAuto' THEN 0 ELSE IsQuotationEnabled END
 032                WHERE ProviderKey IN ('ForumAuto', 'ForumAutoInterparts', 'ForumAutoPiter', 'ForumAutoRostov', 'ForumAut
 033                """);
 034        }
 35
 36        /// <inheritdoc />
 37        protected override void Down(MigrationBuilder migrationBuilder)
 38        {
 039            migrationBuilder.DropColumn(
 040                name: "DisplayName",
 041                table: "ApiSupplierSettings");
 042        }
 43    }
 44}

/home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/20260922092624_AddApiSupplierDisplayName.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("20260922092624_AddApiSupplierDisplayName")]
 16    partial class AddApiSupplierDisplayName
 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.OneCNomenclatureMap", b =>
 04984                {
 04985                    b.Property<long>("Id")
 04986                        .ValueGeneratedOnAdd()
 04987                        .HasColumnType("bigint");
 04988
 04989                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 04990
 04991                    b.Property<string>("ArticleNorm")
 04992                        .IsRequired()
 04993                        .HasMaxLength(128)
 04994                        .HasColumnType("varchar(128)");
 04995
 04996                    b.Property<DateTime>("CreatedAt")
 04997                        .HasColumnType("datetime(6)");
 04998
 04999                    b.Property<string>("OneCArticleRaw")
 05000                        .HasMaxLength(191)
 05001                        .HasColumnType("varchar(191)");
 05002
 05003                    b.Property<string>("OneCProducerName")
 05004                        .HasMaxLength(191)
 05005                        .HasColumnType("varchar(191)");
 05006
 05007                    b.Property<Guid>("OneCRefKey")
 05008                        .HasColumnType("char(36)");
 05009
 05010                    b.Property<string>("ProducerNorm")
 05011                        .IsRequired()
 05012                        .HasMaxLength(128)
 05013                        .HasColumnType("varchar(128)");
 05014
 05015                    b.Property<string>("Source")
 05016                        .IsRequired()
 05017                        .HasMaxLength(32)
 05018                        .HasColumnType("varchar(32)");
 05019
 05020                    b.Property<DateTime>("UpdatedAt")
 05021                        .HasColumnType("datetime(6)");
 05022
 05023                    b.HasKey("Id");
 05024
 05025                    b.HasIndex("ArticleNorm");
 05026
 05027                    b.HasIndex("OneCRefKey");
 05028
 05029                    b.HasIndex("ArticleNorm", "ProducerNorm")
 05030                        .IsUnique();
 05031
 05032                    b.ToTable("OneCNomenclatureMaps");
 05033                });
 5034
 05035            modelBuilder.Entity("OzonDomains.Models.OneCProducerAlias", b =>
 05036                {
 05037                    b.Property<long>("Id")
 05038                        .ValueGeneratedOnAdd()
 05039                        .HasColumnType("bigint");
 05040
 05041                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05042
 05043                    b.Property<string>("AliasNorm")
 05044                        .IsRequired()
 05045                        .HasMaxLength(128)
 05046                        .HasColumnType("varchar(128)");
 05047
 05048                    b.Property<string>("CanonicalName")
 05049                        .HasMaxLength(191)
 05050                        .HasColumnType("varchar(191)");
 05051
 05052                    b.Property<Guid>("CanonicalRefKey")
 05053                        .HasColumnType("char(36)");
 05054
 05055                    b.Property<DateTime>("CreatedAt")
 05056                        .HasColumnType("datetime(6)");
 05057
 05058                    b.Property<string>("Source")
 05059                        .IsRequired()
 05060                        .HasMaxLength(32)
 05061                        .HasColumnType("varchar(32)");
 05062
 05063                    b.HasKey("Id");
 05064
 05065                    b.HasIndex("AliasNorm")
 05066                        .IsUnique();
 05067
 05068                    b.ToTable("OneCProducerAliases");
 05069                });
 5070
 05071            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 05072                {
 05073                    b.Property<int>("Id")
 05074                        .ValueGeneratedOnAdd()
 05075                        .HasColumnType("int");
 05076
 05077                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05078
 05079                    b.Property<int?>("AppStatusId")
 05080                        .HasColumnType("int");
 05081
 05082                    b.Property<string>("Article")
 05083                        .HasMaxLength(255)
 05084                        .HasColumnType("varchar(255)");
 05085
 05086                    b.Property<int?>("CartItemId")
 05087                        .HasColumnType("int");
 05088
 05089                    b.Property<int?>("ClientStatusId")
 05090                        .HasColumnType("int");
 05091
 05092                    b.Property<string>("Comment")
 05093                        .HasMaxLength(500)
 05094                        .HasColumnType("varchar(500)");
 05095
 05096                    b.Property<decimal?>("CostPrice")
 05097                        .HasColumnType("decimal(65,2)");
 05098
 05099                    b.Property<string>("DeliveryCity")
 05100                        .HasMaxLength(100)
 05101                        .HasColumnType("varchar(100)");
 05102
 05103                    b.Property<int?>("DeliveryId")
 05104                        .HasColumnType("int");
 05105
 05106                    b.Property<int?>("EtProducerId")
 05107                        .HasColumnType("int");
 05108
 05109                    b.Property<int?>("ExcelFileDataId")
 05110                        .HasColumnType("int");
 05111
 05112                    b.Property<bool?>("FromFile")
 05113                        .HasColumnType("tinyint(1)");
 05114
 05115                    b.Property<int?>("FromFiletId")
 05116                        .HasColumnType("int");
 05117
 05118                    b.Property<bool>("IsAccepted")
 05119                        .HasColumnType("tinyint(1)");
 05120
 05121                    b.Property<bool?>("IsReturnable")
 05122                        .HasColumnType("tinyint(1)");
 05123
 05124                    b.Property<bool>("IsReturned")
 05125                        .HasColumnType("tinyint(1)");
 05126
 05127                    b.Property<bool>("IsVerified")
 05128                        .HasColumnType("tinyint(1)");
 05129
 05130                    b.Property<string>("Key")
 05131                        .HasMaxLength(50)
 05132                        .HasColumnType("varchar(50)");
 05133
 05134                    b.Property<DateTime?>("LastStatusChangeDate")
 05135                        .HasColumnType("datetime(6)");
 05136
 05137                    b.Property<int?>("ManufacturerId")
 05138                        .HasColumnType("int");
 05139
 05140                    b.Property<string>("MaxCommissionInfo")
 05141                        .HasColumnType("longtext");
 05142
 05143                    b.Property<decimal?>("MaxDiscount")
 05144                        .HasColumnType("decimal(65,2)");
 05145
 05146                    b.Property<decimal?>("MaxOzonCommission")
 05147                        .HasColumnType("decimal(65,2)");
 05148
 05149                    b.Property<decimal?>("MaxProfit")
 05150                        .HasColumnType("decimal(65,2)");
 05151
 05152                    b.Property<string>("MinCommissionInfo")
 05153                        .HasColumnType("longtext");
 05154
 05155                    b.Property<decimal?>("MinDiscount")
 05156                        .HasColumnType("decimal(65,2)");
 05157
 05158                    b.Property<decimal?>("MinOzonCommission")
 05159                        .HasColumnType("decimal(65,2)");
 05160
 05161                    b.Property<decimal?>("MinProfit")
 05162                        .HasColumnType("decimal(65,2)");
 05163
 05164                    b.Property<string>("NewCategory")
 05165                        .HasMaxLength(255)
 05166                        .HasColumnType("varchar(255)");
 05167
 05168                    b.Property<string>("OrderNumberToSupplier")
 05169                        .HasMaxLength(50)
 05170                        .HasColumnType("varchar(50)");
 05171
 05172                    b.Property<decimal?>("OriginalPurchasePrice")
 05173                        .HasColumnType("decimal(65,2)");
 05174
 05175                    b.Property<int?>("OzonClientId")
 05176                        .HasColumnType("int");
 05177
 05178                    b.Property<decimal?>("Price")
 05179                        .HasColumnType("decimal(65,2)");
 05180
 05181                    b.Property<DateTime?>("ProcessingDate")
 05182                        .HasColumnType("datetime(6)");
 05183
 05184                    b.Property<int?>("ProductInfoId")
 05185                        .HasColumnType("int");
 05186
 05187                    b.Property<string>("ProductKey")
 05188                        .HasMaxLength(255)
 05189                        .HasColumnType("varchar(255)");
 05190
 05191                    b.Property<string>("ProductName")
 05192                        .HasMaxLength(255)
 05193                        .HasColumnType("varchar(255)");
 05194
 05195                    b.Property<decimal?>("PurchasePrice")
 05196                        .HasColumnType("decimal(65,2)");
 05197
 05198                    b.Property<int?>("Quantity")
 05199                        .HasColumnType("int");
 05200
 05201                    b.Property<decimal?>("ShipmentAmount")
 05202                        .HasColumnType("decimal(65,2)");
 05203
 05204                    b.Property<int?>("ShipmentId")
 05205                        .HasColumnType("int");
 05206
 05207                    b.Property<string>("ShipmentNumber")
 05208                        .HasMaxLength(50)
 05209                        .HasColumnType("varchar(50)");
 05210
 05211                    b.Property<int?>("ShipmentWarehouseId")
 05212                        .HasColumnType("int");
 05213
 05214                    b.Property<DateTime?>("ShippingDate")
 05215                        .HasColumnType("datetime(6)");
 05216
 05217                    b.Property<int?>("SupplierId")
 05218                        .HasColumnType("int");
 05219
 05220                    b.Property<string>("TrackingNumber")
 05221                        .HasMaxLength(100)
 05222                        .HasColumnType("varchar(100)");
 05223
 05224                    b.Property<int?>("TransactionId")
 05225                        .HasColumnType("int");
 05226
 05227                    b.Property<DateTime?>("UpdatedAt")
 05228                        .HasColumnType("datetime(6)");
 05229
 05230                    b.Property<string>("UpdatedBy")
 05231                        .HasColumnType("longtext");
 05232
 05233                    b.Property<string>("UpdatedColumns")
 05234                        .HasColumnType("longtext");
 05235
 05236                    b.Property<int?>("СurrencyId")
 05237                        .HasColumnType("int");
 05238
 05239                    b.HasKey("Id");
 05240
 05241                    b.HasIndex("CartItemId")
 05242                        .HasDatabaseName("IX_Orders_CartId");
 05243
 05244                    b.HasIndex("ClientStatusId");
 05245
 05246                    b.HasIndex("DeliveryId");
 05247
 05248                    b.HasIndex("EtProducerId");
 05249
 05250                    b.HasIndex("ExcelFileDataId");
 05251
 05252                    b.HasIndex("Key");
 05253
 05254                    b.HasIndex("LastStatusChangeDate")
 05255                        .HasDatabaseName("IX_Orders_LastStatusChangeDate");
 05256
 05257                    b.HasIndex("ManufacturerId");
 05258
 05259                    b.HasIndex("OzonClientId");
 05260
 05261                    b.HasIndex("ProcessingDate")
 05262                        .HasDatabaseName("IX_Orders_ProcessingDate");
 05263
 05264                    b.HasIndex("ProductInfoId");
 05265
 05266                    b.HasIndex("ProductKey")
 05267                        .HasDatabaseName("IX_Orders_ProductKey");
 05268
 05269                    b.HasIndex("ShipmentNumber")
 05270                        .HasDatabaseName("IX_Orders_ShipmentNumber");
 05271
 05272                    b.HasIndex("ShipmentWarehouseId");
 05273
 05274                    b.HasIndex("SupplierId");
 05275
 05276                    b.HasIndex("TransactionId");
 05277
 05278                    b.HasIndex("UpdatedAt")
 05279                        .HasDatabaseName("IX_Orders_UpdatedAt");
 05280
 05281                    b.HasIndex("СurrencyId");
 05282
 05283                    b.HasIndex("AppStatusId", "LastStatusChangeDate")
 05284                        .HasDatabaseName("IX_Orders_AppStatusId_LastStatusChangeDate");
 05285
 05286                    b.ToTable("Orders", (string)null);
 05287
 05288                    b.HasAnnotation("SqlServer:IsTemporal", true);
 05289                });
 5290
 05291            modelBuilder.Entity("OzonDomains.Models.OrderArchive", b =>
 05292                {
 05293                    b.Property<int>("Id")
 05294                        .ValueGeneratedOnAdd()
 05295                        .HasColumnType("int");
 05296
 05297                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05298
 05299                    b.Property<string>("ArchiveReason")
 05300                        .HasMaxLength(500)
 05301                        .HasColumnType("varchar(500)");
 05302
 05303                    b.Property<DateTime>("ArchivedAt")
 05304                        .HasColumnType("datetime");
 05305
 05306                    b.Property<string>("ArchivedBy")
 05307                        .IsRequired()
 05308                        .HasMaxLength(100)
 05309                        .HasColumnType("varchar(100)");
 05310
 05311                    b.Property<int>("OrderId")
 05312                        .HasColumnType("int");
 05313
 05314                    b.Property<int?>("PreviousOzonClientId")
 05315                        .HasColumnType("int");
 05316
 05317                    b.Property<string>("PreviousStatus")
 05318                        .HasMaxLength(200)
 05319                        .HasColumnType("varchar(200)");
 05320
 05321                    b.HasKey("Id");
 05322
 05323                    b.HasIndex("ArchivedAt");
 05324
 05325                    b.HasIndex("ArchivedBy")
 05326                        .HasDatabaseName("IX_OrderArchives_ArchivedBy");
 05327
 05328                    b.HasIndex("OrderId")
 05329                        .IsUnique()
 05330                        .HasDatabaseName("UK_OrderArchives_OrderId");
 05331
 05332                    b.ToTable("OrderArchives");
 05333                });
 5334
 05335            modelBuilder.Entity("OzonDomains.Models.OrderCalculationSnapshot", b =>
 05336                {
 05337                    b.Property<long>("Id")
 05338                        .ValueGeneratedOnAdd()
 05339                        .HasColumnType("bigint");
 05340
 05341                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05342
 05343                    b.Property<DateTime>("CapturedAt")
 05344                        .HasColumnType("datetime(6)");
 05345
 05346                    b.Property<Guid>("OperationId")
 05347                        .HasColumnType("char(36)");
 05348
 05349                    b.Property<int>("OrderId")
 05350                        .HasColumnType("int");
 05351
 05352                    b.Property<string>("PayloadJson")
 05353                        .IsRequired()
 05354                        .HasColumnType("longtext");
 05355
 05356                    b.Property<string>("Source")
 05357                        .IsRequired()
 05358                        .HasMaxLength(32)
 05359                        .HasColumnType("varchar(32)");
 05360
 05361                    b.HasKey("Id");
 05362
 05363                    b.HasIndex("OperationId");
 05364
 05365                    b.HasIndex("OrderId", "OperationId")
 05366                        .IsUnique()
 05367                        .HasDatabaseName("UX_OrderCalculationSnapshots_OrderId_OperationId");
 05368
 05369                    b.ToTable("OrderCalculationSnapshots");
 05370                });
 5371
 05372            modelBuilder.Entity("OzonDomains.Models.OrderCarts.CartStatus", b =>
 05373                {
 05374                    b.Property<int>("Id")
 05375                        .ValueGeneratedOnAdd()
 05376                        .HasColumnType("int");
 05377
 05378                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05379
 05380                    b.Property<string>("Name")
 05381                        .IsRequired()
 05382                        .HasMaxLength(100)
 05383                        .HasColumnType("varchar(100)");
 05384
 05385                    b.HasKey("Id");
 05386
 05387                    b.ToTable("CartStatuses");
 05388                });
 5389
 05390            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 05391                {
 05392                    b.Property<int>("Id")
 05393                        .ValueGeneratedOnAdd()
 05394                        .HasColumnType("int");
 05395
 05396                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05397
 05398                    b.Property<string>("Name")
 05399                        .IsRequired()
 05400                        .HasMaxLength(100)
 05401                        .HasColumnType("text");
 05402
 05403                    b.Property<int?>("StatusColorId")
 05404                        .HasColumnType("int");
 05405
 05406                    b.HasKey("Id");
 05407
 05408                    b.HasIndex("StatusColorId")
 05409                        .HasDatabaseName("FK_ItemStatuses_StatusColors");
 05410
 05411                    b.ToTable("ItemStatuses");
 05412                });
 5413
 05414            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 05415                {
 05416                    b.Property<int>("Id")
 05417                        .ValueGeneratedOnAdd()
 05418                        .HasColumnType("int");
 05419
 05420                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05421
 05422                    b.Property<int?>("CartStatusId")
 05423                        .HasColumnType("int");
 05424
 05425                    b.Property<string>("ClientOrderNumber")
 05426                        .HasMaxLength(100)
 05427                        .HasColumnType("varchar(100)");
 05428
 05429                    b.Property<string>("Comment")
 05430                        .HasMaxLength(250)
 05431                        .HasColumnType("varchar(250)");
 05432
 05433                    b.Property<DateTime>("CreatedAt")
 05434                        .HasColumnType("datetime");
 05435
 05436                    b.Property<string>("Provider")
 05437                        .IsRequired()
 05438                        .HasMaxLength(100)
 05439                        .HasColumnType("varchar(100)");
 05440
 05441                    b.HasKey("Id");
 05442
 05443                    b.HasIndex("CartStatusId")
 05444                        .HasDatabaseName("ix_ordercarts_cartstatusid");
 05445
 05446                    b.ToTable("OrderCarts");
 05447                });
 5448
 05449            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderItem", b =>
 05450                {
 05451                    b.Property<int>("Id")
 05452                        .ValueGeneratedOnAdd()
 05453                        .HasColumnType("int");
 05454
 05455                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05456
 05457                    b.Property<string>("Comment")
 05458                        .HasMaxLength(250)
 05459                        .HasColumnType("varchar(250)");
 05460
 05461                    b.Property<string>("ItemId")
 05462                        .IsRequired()
 05463                        .HasMaxLength(100)
 05464                        .HasColumnType("varchar(100)");
 05465
 05466                    b.Property<int?>("ItemStatusId")
 05467                        .HasColumnType("int");
 05468
 05469                    b.Property<int>("OrderCartId")
 05470                        .HasColumnType("int");
 05471
 05472                    b.Property<string>("OrderItemCode")
 05473                        .HasMaxLength(100)
 05474                        .HasColumnType("varchar(100)");
 05475
 05476                    b.Property<int>("Quantity")
 05477                        .HasColumnType("int");
 05478
 05479                    b.Property<int?>("StudioOrderId")
 05480                        .HasColumnType("int");
 05481
 05482                    b.HasKey("Id");
 05483
 05484                    b.HasIndex("ItemStatusId")
 05485                        .HasDatabaseName("ix_orderitems_itemstatusid");
 05486
 05487                    b.HasIndex("OrderCartId")
 05488                        .HasDatabaseName("ix_orderitems_ordercartid");
 05489
 05490                    b.HasIndex("StudioOrderId");
 05491
 05492                    b.ToTable("OrderItems");
 05493                });
 5494
 05495            modelBuilder.Entity("OzonDomains.Models.OrderControlExecution", b =>
 05496                {
 05497                    b.Property<long>("Id")
 05498                        .ValueGeneratedOnAdd()
 05499                        .HasColumnType("bigint");
 05500
 05501                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05502
 05503                    b.Property<DateTime?>("CompletedAtUtc")
 05504                        .HasColumnType("datetime(6)");
 05505
 05506                    b.Property<int>("CreatedTasksCount")
 05507                        .HasColumnType("int");
 05508
 05509                    b.Property<string>("ErrorMessage")
 05510                        .HasMaxLength(1000)
 05511                        .HasColumnType("varchar(1000)");
 05512
 05513                    b.Property<DateTime>("StartedAtUtc")
 05514                        .HasColumnType("datetime(6)");
 05515
 05516                    b.Property<string>("Status")
 05517                        .IsRequired()
 05518                        .HasMaxLength(30)
 05519                        .HasColumnType("varchar(30)");
 05520
 05521                    b.HasKey("Id");
 05522
 05523                    b.HasIndex("StartedAtUtc");
 05524
 05525                    b.ToTable("OrderControlExecutions");
 05526                });
 5527
 05528            modelBuilder.Entity("OzonDomains.Models.OrderControlRule", b =>
 05529                {
 05530                    b.Property<int>("Id")
 05531                        .ValueGeneratedOnAdd()
 05532                        .HasColumnType("int");
 05533
 05534                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05535
 05536                    b.Property<string>("Code")
 05537                        .IsRequired()
 05538                        .HasMaxLength(80)
 05539                        .HasColumnType("varchar(80)");
 05540
 05541                    b.Property<DateTime>("CreatedAtUtc")
 05542                        .HasColumnType("datetime(6)");
 05543
 05544                    b.Property<bool>("IsActive")
 05545                        .HasColumnType("tinyint(1)");
 05546
 05547                    b.Property<string>("Name")
 05548                        .IsRequired()
 05549                        .HasMaxLength(200)
 05550                        .HasColumnType("varchar(200)");
 05551
 05552                    b.Property<string>("ParametersJson")
 05553                        .HasMaxLength(1000)
 05554                        .HasColumnType("varchar(1000)");
 05555
 05556                    b.Property<int>("Priority")
 05557                        .HasColumnType("int");
 05558
 05559                    b.Property<string>("RuleType")
 05560                        .IsRequired()
 05561                        .HasMaxLength(40)
 05562                        .HasColumnType("varchar(40)");
 05563
 05564                    b.Property<int>("TargetAppRoleId")
 05565                        .HasColumnType("int");
 05566
 05567                    b.Property<DateTime>("UpdatedAtUtc")
 05568                        .HasColumnType("datetime(6)");
 05569
 05570                    b.HasKey("Id");
 05571
 05572                    b.HasIndex("Code")
 05573                        .IsUnique()
 05574                        .HasDatabaseName("UX_OrderControlRules_Code");
 05575
 05576                    b.HasIndex("TargetAppRoleId")
 05577                        .HasDatabaseName("FK_OrderControlRules_AppRoles_TargetAppRoleId");
 05578
 05579                    b.HasIndex("IsActive", "RuleType")
 05580                        .HasDatabaseName("IX_OrderControlRules_Active_Type");
 05581
 05582                    b.ToTable("OrderControlRules");
 05583                });
 5584
 05585            modelBuilder.Entity("OzonDomains.Models.OrderControlSettings", b =>
 05586                {
 05587                    b.Property<int>("Id")
 05588                        .ValueGeneratedOnAdd()
 05589                        .HasColumnType("int");
 05590
 05591                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05592
 05593                    b.Property<int>("IntervalMinutes")
 05594                        .HasColumnType("int");
 05595
 05596                    b.Property<DateTime>("UpdatedAtUtc")
 05597                        .HasColumnType("datetime(6)");
 05598
 05599                    b.HasKey("Id");
 05600
 05601                    b.ToTable("OrderControlSettings");
 05602                });
 5603
 05604            modelBuilder.Entity("OzonDomains.Models.OrderControlTask", b =>
 05605                {
 05606                    b.Property<long>("Id")
 05607                        .ValueGeneratedOnAdd()
 05608                        .HasColumnType("bigint");
 05609
 05610                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05611
 05612                    b.Property<DateTime?>("ClaimedAtUtc")
 05613                        .HasColumnType("datetime(6)");
 05614
 05615                    b.Property<string>("ClaimedByUserId")
 05616                        .HasMaxLength(450)
 05617                        .HasColumnType("varchar(450)");
 05618
 05619                    b.Property<string>("CloseReason")
 05620                        .HasMaxLength(500)
 05621                        .HasColumnType("varchar(500)");
 05622
 05623                    b.Property<DateTime?>("ClosedAtUtc")
 05624                        .HasColumnType("datetime(6)");
 05625
 05626                    b.Property<string>("ClosedByUserId")
 05627                        .HasMaxLength(450)
 05628                        .HasColumnType("varchar(450)");
 05629
 05630                    b.Property<DateTime>("CreatedAtUtc")
 05631                        .HasColumnType("datetime(6)");
 05632
 05633                    b.Property<string>("DeduplicationKey")
 05634                        .IsRequired()
 05635                        .HasMaxLength(160)
 05636                        .HasColumnType("varchar(160)");
 05637
 05638                    b.Property<DateTime>("DueAtUtc")
 05639                        .HasColumnType("datetime(6)");
 05640
 05641                    b.Property<DateTime?>("EscalatedAtUtc")
 05642                        .HasColumnType("datetime(6)");
 05643
 05644                    b.Property<int>("OrderId")
 05645                        .HasColumnType("int");
 05646
 05647                    b.Property<int>("Priority")
 05648                        .HasColumnType("int");
 05649
 05650                    b.Property<int>("RuleId")
 05651                        .HasColumnType("int");
 05652
 05653                    b.Property<string>("SnapshotJson")
 05654                        .HasColumnType("longtext");
 05655
 05656                    b.Property<string>("Status")
 05657                        .IsRequired()
 05658                        .HasMaxLength(30)
 05659                        .HasColumnType("varchar(30)");
 05660
 05661                    b.Property<int>("TargetAppRoleId")
 05662                        .HasColumnType("int");
 05663
 05664                    b.Property<DateTime>("UpdatedAtUtc")
 05665                        .HasColumnType("datetime(6)");
 05666
 05667                    b.Property<DateTime>("WarningAtUtc")
 05668                        .HasColumnType("datetime(6)");
 05669
 05670                    b.HasKey("Id");
 05671
 05672                    b.HasIndex("DeduplicationKey")
 05673                        .IsUnique()
 05674                        .HasDatabaseName("UX_OrderControlTasks_DeduplicationKey");
 05675
 05676                    b.HasIndex("OrderId")
 05677                        .HasDatabaseName("FK_OrderControlTasks_Orders_OrderId");
 05678
 05679                    b.HasIndex("RuleId")
 05680                        .HasDatabaseName("FK_OrderControlTasks_OrderControlRules_RuleId");
 05681
 05682                    b.HasIndex("Status", "DueAtUtc");
 05683
 05684                    b.HasIndex("TargetAppRoleId", "Status");
 05685
 05686                    b.ToTable("OrderControlTasks");
 05687                });
 5688
 05689            modelBuilder.Entity("OzonDomains.Models.OrderControlTaskEvent", b =>
 05690                {
 05691                    b.Property<long>("Id")
 05692                        .ValueGeneratedOnAdd()
 05693                        .HasColumnType("bigint");
 05694
 05695                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05696
 05697                    b.Property<DateTime>("CreatedAtUtc")
 05698                        .HasColumnType("datetime(6)");
 05699
 05700                    b.Property<string>("Details")
 05701                        .HasMaxLength(1000)
 05702                        .HasColumnType("varchar(1000)");
 05703
 05704                    b.Property<string>("EventType")
 05705                        .IsRequired()
 05706                        .HasMaxLength(40)
 05707                        .HasColumnType("varchar(40)");
 05708
 05709                    b.Property<long>("TaskId")
 05710                        .HasColumnType("bigint");
 05711
 05712                    b.Property<string>("UserId")
 05713                        .HasMaxLength(450)
 05714                        .HasColumnType("varchar(450)");
 05715
 05716                    b.HasKey("Id");
 05717
 05718                    b.HasIndex("TaskId", "CreatedAtUtc");
 05719
 05720                    b.ToTable("OrderControlTaskEvents");
 05721                });
 5722
 05723            modelBuilder.Entity("OzonDomains.Models.OrderExtension", b =>
 05724                {
 05725                    b.Property<int>("Id")
 05726                        .ValueGeneratedOnAdd()
 05727                        .HasColumnType("int");
 05728
 05729                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05730
 05731                    b.Property<DateTime>("CreatedAt")
 05732                        .HasColumnType("datetime");
 05733
 05734                    b.Property<string>("Key")
 05735                        .IsRequired()
 05736                        .HasMaxLength(100)
 05737                        .HasColumnType("varchar(100)");
 05738
 05739                    b.Property<int>("OrderId")
 05740                        .HasColumnType("int");
 05741
 05742                    b.Property<string>("Value")
 05743                        .HasMaxLength(2000)
 05744                        .HasColumnType("varchar(2000)");
 05745
 05746                    b.HasKey("Id");
 05747
 05748                    b.HasIndex("OrderId")
 05749                        .HasDatabaseName("IX_OrderExtensions_OrderId");
 05750
 05751                    b.HasIndex("OrderId", "Key")
 05752                        .IsUnique()
 05753                        .HasDatabaseName("UX_OrderExtensions_OrderId_Key");
 05754
 05755                    b.ToTable("order_extensions");
 05756                });
 5757
 05758            modelBuilder.Entity("OzonDomains.Models.OrderExtraExpense", b =>
 05759                {
 05760                    b.Property<int>("Id")
 05761                        .ValueGeneratedOnAdd()
 05762                        .HasColumnType("int");
 05763
 05764                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05765
 05766                    b.Property<decimal>("Amount")
 05767                        .HasColumnType("decimal(18,2)");
 05768
 05769                    b.Property<string>("Comment")
 05770                        .HasMaxLength(255)
 05771                        .HasColumnType("varchar(255)");
 05772
 05773                    b.Property<DateTime>("CreatedAt")
 05774                        .HasColumnType("datetime");
 05775
 05776                    b.Property<int>("ExpenseTypeId")
 05777                        .HasColumnType("int");
 05778
 05779                    b.Property<int>("OrderId")
 05780                        .HasColumnType("int");
 05781
 05782                    b.HasKey("Id");
 05783
 05784                    b.HasIndex("ExpenseTypeId");
 05785
 05786                    b.HasIndex("OrderId");
 05787
 05788                    b.ToTable("OrderExtraExpenses");
 05789                });
 5790
 05791            modelBuilder.Entity("OzonDomains.Models.OrderHistory", b =>
 05792                {
 05793                    b.Property<int>("Id")
 05794                        .ValueGeneratedOnAdd()
 05795                        .HasColumnType("int")
 05796                        .HasColumnName("Id");
 05797
 05798                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05799
 05800                    b.Property<DateTime>("ChangedAt")
 05801                        .HasColumnType("datetime(6)")
 05802                        .HasColumnName("ChangedAt");
 05803
 05804                    b.Property<string>("ChangedBy")
 05805                        .HasMaxLength(255)
 05806                        .HasColumnType("varchar(255)")
 05807                        .HasColumnName("ChangedBy");
 05808
 05809                    b.Property<string>("ColumnDisplayName")
 05810                        .IsRequired()
 05811                        .HasMaxLength(200)
 05812                        .HasColumnType("varchar(200)")
 05813                        .HasColumnName("ColumnDisplayName");
 05814
 05815                    b.Property<string>("ColumnName")
 05816                        .IsRequired()
 05817                        .HasMaxLength(100)
 05818                        .HasColumnType("varchar(100)")
 05819                        .HasColumnName("ColumnName");
 05820
 05821                    b.Property<string>("NewValue")
 05822                        .HasColumnType("text")
 05823                        .HasColumnName("NewValue");
 05824
 05825                    b.Property<string>("OldValue")
 05826                        .HasColumnType("text")
 05827                        .HasColumnName("OldValue");
 05828
 05829                    b.Property<Guid?>("OperationId")
 05830                        .HasMaxLength(36)
 05831                        .HasColumnType("char(36)")
 05832                        .HasColumnName("OperationId");
 05833
 05834                    b.Property<int>("OrderId")
 05835                        .HasColumnType("int")
 05836                        .HasColumnName("OrderId");
 05837
 05838                    b.HasKey("Id");
 05839
 05840                    b.HasIndex("ChangedAt")
 05841                        .HasDatabaseName("IX_OrdersHistory_ChangedAt");
 05842
 05843                    b.HasIndex("OperationId")
 05844                        .HasDatabaseName("IX_orders_history_OperationId");
 05845
 05846                    b.HasIndex("OrderId")
 05847                        .HasDatabaseName("IX_OrdersHistory_OrderId");
 05848
 05849                    b.ToTable("orders_history");
 05850                });
 5851
 05852            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPosting", b =>
 05853                {
 05854                    b.Property<long>("Id")
 05855                        .ValueGeneratedOnAdd()
 05856                        .HasColumnType("bigint");
 05857
 05858                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05859
 05860                    b.Property<string>("ArticlesSummary")
 05861                        .HasMaxLength(500)
 05862                        .HasColumnType("varchar(500)");
 05863
 05864                    b.Property<string>("ChangedBy")
 05865                        .HasMaxLength(255)
 05866                        .HasColumnType("varchar(255)");
 05867
 05868                    b.Property<DateTime>("CreatedAt")
 05869                        .HasColumnType("datetime");
 05870
 05871                    b.Property<string>("DetailsJson")
 05872                        .HasColumnType("longtext");
 05873
 05874                    b.Property<string>("DocumentGuids")
 05875                        .HasMaxLength(2000)
 05876                        .HasColumnType("varchar(2000)");
 05877
 05878                    b.Property<string>("DocumentNumbers")
 05879                        .HasMaxLength(1000)
 05880                        .HasColumnType("varchar(1000)");
 05881
 05882                    b.Property<int>("DocumentsCount")
 05883                        .HasColumnType("int");
 05884
 05885                    b.Property<string>("ErrorSummary")
 05886                        .HasMaxLength(2000)
 05887                        .HasColumnType("varchar(2000)");
 05888
 05889                    b.Property<string>("HistoryBatchKey")
 05890                        .HasMaxLength(128)
 05891                        .HasColumnType("varchar(128)");
 05892
 05893                    b.Property<bool>("IsPosted")
 05894                        .HasColumnType("tinyint(1)");
 05895
 05896                    b.Property<string>("OperationKind")
 05897                        .IsRequired()
 05898                        .HasMaxLength(32)
 05899                        .HasColumnType("varchar(32)");
 05900
 05901                    b.Property<int>("OrderId")
 05902                        .HasColumnType("int");
 05903
 05904                    b.Property<int>("OrdersCount")
 05905                        .HasColumnType("int");
 05906
 05907                    b.Property<string>("OrganizationInn")
 05908                        .HasMaxLength(64)
 05909                        .HasColumnType("varchar(64)");
 05910
 05911                    b.Property<string>("OrganizationName")
 05912                        .HasMaxLength(255)
 05913                        .HasColumnType("varchar(255)");
 05914
 05915                    b.Property<DateTime>("PostedAt")
 05916                        .HasColumnType("datetime");
 05917
 05918                    b.Property<int>("ProductsCount")
 05919                        .HasColumnType("int");
 05920
 05921                    b.Property<string>("SenderInn")
 05922                        .HasMaxLength(64)
 05923                        .HasColumnType("varchar(64)");
 05924
 05925                    b.Property<string>("SenderName")
 05926                        .HasMaxLength(255)
 05927                        .HasColumnType("varchar(255)");
 05928
 05929                    b.Property<bool>("Success")
 05930                        .HasColumnType("tinyint(1)");
 05931
 05932                    b.Property<int?>("TransactionId")
 05933                        .HasColumnType("int");
 05934
 05935                    b.Property<string>("WarehouseRecipient")
 05936                        .HasMaxLength(255)
 05937                        .HasColumnType("varchar(255)");
 05938
 05939                    b.Property<string>("WarehouseSender")
 05940                        .HasMaxLength(255)
 05941                        .HasColumnType("varchar(255)");
 05942
 05943                    b.HasKey("Id");
 05944
 05945                    b.HasIndex("HistoryBatchKey")
 05946                        .HasDatabaseName("IX_OrderHistoryOneCPostings_HistoryBatchKey");
 05947
 05948                    b.HasIndex("OrderId")
 05949                        .HasDatabaseName("IX_OrderHistoryOneCPostings_OrderId");
 05950
 05951                    b.HasIndex("TransactionId")
 05952                        .HasDatabaseName("IX_OrderHistoryOneCPostings_TransactionId");
 05953
 05954                    b.HasIndex("OrderId", "PostedAt")
 05955                        .HasDatabaseName("IX_OrderHistoryOneCPostings_OrderId_PostedAt");
 05956
 05957                    b.ToTable("OrderHistoryOneCPostings");
 05958                });
 5959
 05960            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPostingLink", b =>
 05961                {
 05962                    b.Property<long>("Id")
 05963                        .ValueGeneratedOnAdd()
 05964                        .HasColumnType("bigint");
 05965
 05966                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 05967
 05968                    b.Property<int>("OrderHistoryId")
 05969                        .HasColumnType("int");
 05970
 05971                    b.Property<long>("PostingId")
 05972                        .HasColumnType("bigint");
 05973
 05974                    b.HasKey("Id");
 05975
 05976                    b.HasIndex("OrderHistoryId");
 05977
 05978                    b.HasIndex("PostingId", "OrderHistoryId")
 05979                        .IsUnique()
 05980                        .HasDatabaseName("UX_OrderHistoryOneCPostingLinks");
 05981
 05982                    b.ToTable("OrderHistoryOneCPostingLinks");
 05983                });
 5984
 05985            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionCondition", b =>
 05986                {
 05987                    b.Property<int>("Id")
 05988                        .ValueGeneratedOnAdd()
 05989                        .HasColumnType("int");
 05990
 05991                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 05992
 05993                    b.Property<decimal?>("ActionPrice")
 05994                        .HasColumnType("decimal(18,2)");
 05995
 05996                    b.Property<string>("AddMode")
 05997                        .HasMaxLength(32)
 05998                        .HasColumnType("varchar(32)");
 05999
 06000                    b.Property<DateTime?>("DateFrom")
 06001                        .HasColumnType("datetime(6)");
 06002
 06003                    b.Property<DateTime?>("DateTo")
 06004                        .HasColumnType("datetime(6)");
 06005
 06006                    b.Property<string>("Description")
 06007                        .HasColumnType("longtext");
 06008
 06009                    b.Property<long?>("ExternalActionId")
 06010                        .HasColumnType("bigint");
 06011
 06012                    b.Property<string>("Mechanic")
 06013                        .HasMaxLength(100)
 06014                        .HasColumnType("varchar(100)");
 06015
 06016                    b.Property<int>("SnapshotId")
 06017                        .HasColumnType("int");
 06018
 06019                    b.Property<string>("SourceType")
 06020                        .IsRequired()
 06021                        .HasMaxLength(32)
 06022                        .HasColumnType("varchar(32)");
 06023
 06024                    b.Property<string>("Title")
 06025                        .IsRequired()
 06026                        .HasMaxLength(500)
 06027                        .HasColumnType("varchar(500)");
 06028
 06029                    b.Property<decimal?>("Value")
 06030                        .HasColumnType("decimal(18,2)");
 06031
 06032                    b.HasKey("Id");
 06033
 06034                    b.HasIndex("SnapshotId", "SourceType");
 06035
 06036                    b.HasIndex("SourceType", "ExternalActionId");
 06037
 06038                    b.ToTable("OrderOzonPromotionConditions");
 06039                });
 6040
 06041            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 06042                {
 06043                    b.Property<int>("Id")
 06044                        .ValueGeneratedOnAdd()
 06045                        .HasColumnType("int");
 06046
 06047                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06048
 06049                    b.Property<decimal>("Acquiring")
 06050                        .HasColumnType("decimal(18,2)");
 06051
 06052                    b.Property<bool>("AutoActionEnabled")
 06053                        .HasColumnType("tinyint(1)");
 06054
 06055                    b.Property<bool>("AutoAddToOzonActionsListEnabled")
 06056                        .HasColumnType("tinyint(1)");
 06057
 06058                    b.Property<DateTime>("CapturedAt")
 06059                        .HasColumnType("datetime(6)");
 06060
 06061                    b.Property<string>("CurrencyCode")
 06062                        .IsRequired()
 06063                        .HasMaxLength(10)
 06064                        .HasColumnType("varchar(10)");
 06065
 06066                    b.Property<DateTime?>("CurrentPeriodFrom")
 06067                        .HasColumnType("datetime(6)");
 06068
 06069                    b.Property<DateTime?>("CurrentPeriodTo")
 06070                        .HasColumnType("datetime(6)");
 06071
 06072                    b.Property<string>("EnrichmentStatus")
 06073                        .IsRequired()
 06074                        .HasMaxLength(32)
 06075                        .HasColumnType("varchar(32)");
 06076
 06077                    b.Property<decimal>("ExternalPriceIndex")
 06078                        .HasColumnType("decimal(18,4)");
 06079
 06080                    b.Property<decimal>("FboCommissionPercent")
 06081                        .HasColumnType("decimal(18,2)");
 06082
 06083                    b.Property<decimal>("FbsCommissionPercent")
 06084                        .HasColumnType("decimal(18,2)");
 06085
 06086                    b.Property<decimal>("FbsDeliveryToCustomerAmount")
 06087                        .HasColumnType("decimal(18,2)");
 06088
 06089                    b.Property<decimal>("FbsDirectFlowMaxAmount")
 06090                        .HasColumnType("decimal(18,2)");
 06091
 06092                    b.Property<decimal>("FbsDirectFlowMinAmount")
 06093                        .HasColumnType("decimal(18,2)");
 06094
 06095                    b.Property<decimal>("FbsFirstMileMaxAmount")
 06096                        .HasColumnType("decimal(18,2)");
 06097
 06098                    b.Property<decimal>("FbsFirstMileMinAmount")
 06099                        .HasColumnType("decimal(18,2)");
 06100
 06101                    b.Property<bool>("HasAnyPromotion")
 06102                        .HasColumnType("tinyint(1)");
 06103
 06104                    b.Property<decimal>("MarketingPrice")
 06105                        .HasColumnType("decimal(18,2)");
 06106
 06107                    b.Property<decimal>("MarketingSellerPrice")
 06108                        .HasColumnType("decimal(18,2)");
 06109
 06110                    b.Property<decimal>("MinPrice")
 06111                        .HasColumnType("decimal(18,2)");
 06112
 06113                    b.Property<decimal>("NetPrice")
 06114                        .HasColumnType("decimal(18,2)");
 06115
 06116                    b.Property<string>("OfferId")
 06117                        .IsRequired()
 06118                        .HasMaxLength(255)
 06119                        .HasColumnType("varchar(255)");
 06120
 06121                    b.Property<decimal>("OldPrice")
 06122                        .HasColumnType("decimal(18,2)");
 06123
 06124                    b.Property<int>("OrderId")
 06125                        .HasColumnType("int");
 06126
 06127                    b.Property<bool>("OzonActionsExist")
 06128                        .HasColumnType("tinyint(1)");
 06129
 06130                    b.Property<int?>("OzonClientId")
 06131                        .HasColumnType("int");
 06132
 06133                    b.Property<decimal>("OzonPriceIndex")
 06134                        .HasColumnType("decimal(18,4)");
 06135
 06136                    b.Property<long>("OzonProductId")
 06137                        .HasColumnType("bigint");
 06138
 06139                    b.Property<decimal>("Price")
 06140                        .HasColumnType("decimal(18,2)");
 06141
 06142                    b.Property<string>("RawPricePayload")
 06143                        .IsRequired()
 06144                        .HasColumnType("longtext");
 06145
 06146                    b.Property<decimal>("RetailPrice")
 06147                        .HasColumnType("decimal(18,2)");
 06148
 06149                    b.Property<decimal>("SelfMarketplacePriceIndex")
 06150                        .HasColumnType("decimal(18,4)");
 06151
 06152                    b.Property<decimal>("Vat")
 06153                        .HasColumnType("decimal(18,2)");
 06154
 06155                    b.Property<decimal>("VolumeWeight")
 06156                        .HasColumnType("decimal(18,3)");
 06157
 06158                    b.HasKey("Id");
 06159
 06160                    b.HasIndex("OrderId")
 06161                        .IsUnique();
 06162
 06163                    b.HasIndex("HasAnyPromotion", "CapturedAt");
 06164
 06165                    b.HasIndex("OzonClientId", "OzonProductId");
 06166
 06167                    b.ToTable("OrderOzonPromotionSnapshots");
 06168                });
 6169
 06170            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 06171                {
 06172                    b.Property<int>("Id")
 06173                        .ValueGeneratedOnAdd()
 06174                        .HasColumnType("int");
 06175
 06176                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06177
 06178                    b.Property<bool>("AutoActionEnabled")
 06179                        .HasColumnType("tinyint(1)");
 06180
 06181                    b.Property<bool>("AutoAddToOzonActionsListEnabled")
 06182                        .HasColumnType("tinyint(1)");
 06183
 06184                    b.Property<string>("CurrencyCode")
 06185                        .IsRequired()
 06186                        .HasMaxLength(10)
 06187                        .HasColumnType("varchar(10)");
 06188
 06189                    b.Property<decimal>("MarketingPrice")
 06190                        .HasColumnType("decimal(18,2)");
 06191
 06192                    b.Property<decimal>("MarketingSellerPrice")
 06193                        .HasColumnType("decimal(18,2)");
 06194
 06195                    b.Property<decimal>("MinPrice")
 06196                        .HasColumnType("decimal(18,2)");
 06197
 06198                    b.Property<decimal>("NetPrice")
 06199                        .HasColumnType("decimal(18,2)");
 06200
 06201                    b.Property<decimal>("OldPrice")
 06202                        .HasColumnType("decimal(18,2)");
 06203
 06204                    b.Property<int>("OrderId")
 06205                        .HasColumnType("int");
 06206
 06207                    b.Property<decimal>("Price")
 06208                        .HasColumnType("decimal(18,2)");
 06209
 06210                    b.Property<decimal>("RetailPrice")
 06211                        .HasColumnType("decimal(18,2)");
 06212
 06213                    b.Property<decimal>("Vat")
 06214                        .HasColumnType("decimal(18,2)");
 06215
 06216                    b.HasKey("Id");
 06217
 06218                    b.HasIndex("OrderId");
 06219
 06220                    b.ToTable("OrderPrices");
 06221                });
 6222
 06223            modelBuilder.Entity("OzonDomains.Models.OrderReturn", b =>
 06224                {
 06225                    b.Property<long>("Id")
 06226                        .ValueGeneratedOnAdd()
 06227                        .HasColumnType("bigint");
 06228
 06229                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06230
 06231                    b.Property<DateTime?>("CancelledWithCompensationMoment")
 06232                        .HasColumnType("datetime(6)");
 06233
 06234                    b.Property<long?>("ClearingId")
 06235                        .HasColumnType("bigint");
 06236
 06237                    b.Property<DateTime?>("CompensationStatusChangeMoment")
 06238                        .HasColumnType("datetime(6)");
 06239
 06240                    b.Property<string>("CompensationStatusDisplayName")
 06241                        .HasMaxLength(200)
 06242                        .HasColumnType("varchar(200)");
 06243
 06244                    b.Property<int?>("CompensationStatusId")
 06245                        .HasColumnType("int");
 06246
 06247                    b.Property<string>("CompensationStatusSysName")
 06248                        .HasMaxLength(100)
 06249                        .HasColumnType("varchar(100)");
 06250
 06251                    b.Property<DateTime>("CreatedAt")
 06252                        .ValueGeneratedOnAdd()
 06253                        .HasColumnType("datetime(6)")
 06254                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06255
 06256                    b.Property<DateTime?>("FinalMoment")
 06257                        .HasColumnType("datetime(6)");
 06258
 06259                    b.Property<bool>("IsOpened")
 06260                        .HasColumnType("tinyint(1)");
 06261
 06262                    b.Property<bool>("IsSuperEconom")
 06263                        .HasColumnType("tinyint(1)");
 06264
 06265                    b.Property<string>("LogisticBarcode")
 06266                        .HasMaxLength(100)
 06267                        .HasColumnType("varchar(100)");
 06268
 06269                    b.Property<int?>("OrderId")
 06270                        .HasColumnType("int");
 06271
 06272                    b.Property<string>("OrderNumber")
 06273                        .HasMaxLength(50)
 06274                        .HasColumnType("varchar(50)");
 06275
 06276                    b.Property<int>("OzonClientId")
 06277                        .HasColumnType("int");
 06278
 06279                    b.Property<long>("OzonOrderId")
 06280                        .HasColumnType("bigint");
 06281
 06282                    b.Property<long>("OzonReturnId")
 06283                        .HasColumnType("bigint");
 06284
 06285                    b.Property<string>("PlaceAddress")
 06286                        .HasColumnType("text");
 06287
 06288                    b.Property<long?>("PlaceId")
 06289                        .HasColumnType("bigint");
 06290
 06291                    b.Property<string>("PlaceName")
 06292                        .HasMaxLength(255)
 06293                        .HasColumnType("varchar(255)");
 06294
 06295                    b.Property<string>("PostingNumber")
 06296                        .HasMaxLength(50)
 06297                        .HasColumnType("varchar(50)");
 06298
 06299                    b.Property<decimal?>("ProductCommission")
 06300                        .HasColumnType("decimal(18,2)");
 06301
 06302                    b.Property<double>("ProductCommissionPercent")
 06303                        .HasColumnType("double");
 06304
 06305                    b.Property<string>("ProductName")
 06306                        .HasMaxLength(500)
 06307                        .HasColumnType("varchar(500)");
 06308
 06309                    b.Property<string>("ProductOfferId")
 06310                        .HasMaxLength(100)
 06311                        .HasColumnType("varchar(100)");
 06312
 06313                    b.Property<decimal?>("ProductPrice")
 06314                        .HasColumnType("decimal(18,2)");
 06315
 06316                    b.Property<string>("ProductPriceCurrency")
 06317                        .HasMaxLength(10)
 06318                        .HasColumnType("varchar(10)");
 06319
 06320                    b.Property<int>("ProductQuantity")
 06321                        .HasColumnType("int");
 06322
 06323                    b.Property<long>("ProductSku")
 06324                        .HasColumnType("bigint");
 06325
 06326                    b.Property<string>("RawDataJson")
 06327                        .HasColumnType("longtext");
 06328
 06329                    b.Property<long?>("ReturnClearingId")
 06330                        .HasColumnType("bigint");
 06331
 06332                    b.Property<DateTime?>("ReturnDate")
 06333                        .HasColumnType("datetime(6)");
 06334
 06335                    b.Property<string>("ReturnReasonName")
 06336                        .HasMaxLength(500)
 06337                        .HasColumnType("varchar(500)");
 06338
 06339                    b.Property<string>("ReturnType")
 06340                        .HasMaxLength(50)
 06341                        .HasColumnType("varchar(50)");
 06342
 06343                    b.Property<string>("Schema")
 06344                        .HasMaxLength(20)
 06345                        .HasColumnType("varchar(20)");
 06346
 06347                    b.Property<long?>("SourceId")
 06348                        .HasColumnType("bigint");
 06349
 06350                    b.Property<DateTime?>("StorageArrivedMoment")
 06351                        .HasColumnType("datetime(6)");
 06352
 06353                    b.Property<long>("StorageDays")
 06354                        .HasColumnType("bigint");
 06355
 06356                    b.Property<string>("StorageSumCurrency")
 06357                        .HasMaxLength(10)
 06358                        .HasColumnType("varchar(10)");
 06359
 06360                    b.Property<decimal?>("StorageSumPrice")
 06361                        .HasColumnType("decimal(18,2)");
 06362
 06363                    b.Property<DateTime?>("StorageTarificationFirstDate")
 06364                        .HasColumnType("datetime(6)");
 06365
 06366                    b.Property<DateTime?>("StorageTarificationStartDate")
 06367                        .HasColumnType("datetime(6)");
 06368
 06369                    b.Property<string>("TargetPlaceAddress")
 06370                        .HasColumnType("text");
 06371
 06372                    b.Property<long?>("TargetPlaceId")
 06373                        .HasColumnType("bigint");
 06374
 06375                    b.Property<string>("TargetPlaceName")
 06376                        .HasMaxLength(255)
 06377                        .HasColumnType("varchar(255)");
 06378
 06379                    b.Property<DateTime?>("TechnicalReturnMoment")
 06380                        .HasColumnType("datetime(6)");
 06381
 06382                    b.Property<DateTime>("UpdatedAt")
 06383                        .ValueGeneratedOnAdd()
 06384                        .HasColumnType("datetime(6)")
 06385                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06386
 06387                    b.Property<DateTime?>("UtilizationForecastDate")
 06388                        .HasColumnType("datetime(6)");
 06389
 06390                    b.Property<string>("UtilizationSumCurrency")
 06391                        .HasMaxLength(10)
 06392                        .HasColumnType("varchar(10)");
 06393
 06394                    b.Property<decimal?>("UtilizationSumPrice")
 06395                        .HasColumnType("decimal(18,2)");
 06396
 06397                    b.Property<DateTime?>("VisualStatusChangeMoment")
 06398                        .HasColumnType("datetime(6)");
 06399
 06400                    b.Property<string>("VisualStatusDisplayName")
 06401                        .HasMaxLength(200)
 06402                        .HasColumnType("varchar(200)");
 06403
 06404                    b.Property<int?>("VisualStatusId")
 06405                        .HasColumnType("int");
 06406
 06407                    b.Property<string>("VisualStatusSysName")
 06408                        .HasMaxLength(100)
 06409                        .HasColumnType("varchar(100)");
 06410
 06411                    b.HasKey("Id");
 06412
 06413                    b.HasIndex("OrderId");
 06414
 06415                    b.HasIndex("OzonClientId");
 06416
 06417                    b.HasIndex("OzonReturnId")
 06418                        .IsUnique();
 06419
 06420                    b.HasIndex("PostingNumber");
 06421
 06422                    b.HasIndex("UpdatedAt");
 06423
 06424                    b.HasIndex("VisualStatusChangeMoment");
 06425
 06426                    b.HasIndex("VisualStatusSysName");
 06427
 06428                    b.HasIndex("OzonClientId", "OrderNumber");
 06429
 06430                    b.HasIndex("OzonClientId", "PostingNumber");
 06431
 06432                    b.ToTable("OrderReturns");
 06433                });
 6434
 06435            modelBuilder.Entity("OzonDomains.Models.OrderReturnSyncRun", b =>
 06436                {
 06437                    b.Property<long>("Id")
 06438                        .ValueGeneratedOnAdd()
 06439                        .HasColumnType("bigint");
 06440
 06441                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06442
 06443                    b.Property<DateTime?>("CompletedAtUtc")
 06444                        .HasColumnType("datetime(6)");
 06445
 06446                    b.Property<long?>("DurationMs")
 06447                        .HasColumnType("bigint");
 06448
 06449                    b.Property<int>("ErrorCount")
 06450                        .HasColumnType("int");
 06451
 06452                    b.Property<string>("ErrorMessage")
 06453                        .HasColumnType("text");
 06454
 06455                    b.Property<DateTime>("FromDate")
 06456                        .HasColumnType("datetime(6)");
 06457
 06458                    b.Property<bool>("Incremental")
 06459                        .HasColumnType("tinyint(1)");
 06460
 06461                    b.Property<int>("Inserted")
 06462                        .HasColumnType("int");
 06463
 06464                    b.Property<int>("LinkedOrders")
 06465                        .HasColumnType("int");
 06466
 06467                    b.Property<int>("OzonClientId")
 06468                        .HasColumnType("int");
 06469
 06470                    b.Property<int>("Processed")
 06471                        .HasColumnType("int");
 06472
 06473                    b.Property<DateTime>("StartedAtUtc")
 06474                        .HasColumnType("datetime(6)");
 06475
 06476                    b.Property<string>("Status")
 06477                        .IsRequired()
 06478                        .HasMaxLength(32)
 06479                        .HasColumnType("varchar(32)");
 06480
 06481                    b.Property<int>("StatusChanged")
 06482                        .HasColumnType("int");
 06483
 06484                    b.Property<DateTime>("ToDate")
 06485                        .HasColumnType("datetime(6)");
 06486
 06487                    b.Property<string>("TriggerType")
 06488                        .IsRequired()
 06489                        .HasMaxLength(32)
 06490                        .HasColumnType("varchar(32)");
 06491
 06492                    b.HasKey("Id");
 06493
 06494                    b.HasIndex("StartedAtUtc");
 06495
 06496                    b.HasIndex("Status");
 06497
 06498                    b.ToTable("OrderReturnSyncRuns");
 06499                });
 6500
 06501            modelBuilder.Entity("OzonDomains.Models.OrderSearchSyncState", b =>
 06502                {
 06503                    b.Property<int>("Id")
 06504                        .HasColumnType("int");
 06505
 06506                    b.Property<DateTime?>("LastFullReindexAt")
 06507                        .HasColumnType("datetime(6)");
 06508
 06509                    b.Property<DateTime?>("LastSyncedAt")
 06510                        .HasColumnType("datetime(6)");
 06511
 06512                    b.Property<int>("LastSyncedOrderId")
 06513                        .HasColumnType("int");
 06514
 06515                    b.HasKey("Id");
 06516
 06517                    b.ToTable("OrderSearchSyncState");
 06518                });
 6519
 06520            modelBuilder.Entity("OzonDomains.Models.OrderShipmentTotals", b =>
 06521                {
 06522                    b.Property<long>("Id")
 06523                        .ValueGeneratedOnAdd()
 06524                        .HasColumnType("bigint");
 06525
 06526                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06527
 06528                    b.Property<double>("AccrualsForSale")
 06529                        .HasColumnType("double");
 06530
 06531                    b.Property<double>("CompensationAmount")
 06532                        .HasColumnType("double");
 06533
 06534                    b.Property<DateTime>("CreatedAt")
 06535                        .HasColumnType("datetime");
 06536
 06537                    b.Property<double>("ListAmount")
 06538                        .HasColumnType("double");
 06539
 06540                    b.Property<double>("MoneyTransfer")
 06541                        .HasColumnType("double");
 06542
 06543                    b.Property<int>("OperationsCount")
 06544                        .HasColumnType("int");
 06545
 06546                    b.Property<string>("OperationsJson")
 06547                        .HasColumnType("longtext");
 06548
 06549                    b.Property<int>("OrderId")
 06550                        .HasColumnType("int");
 06551
 06552                    b.Property<double>("OthersAmount")
 06553                        .HasColumnType("double");
 06554
 06555                    b.Property<double>("ProcessingAndDelivery")
 06556                        .HasColumnType("double");
 06557
 06558                    b.Property<double>("RefundsAndCancellations")
 06559                        .HasColumnType("double");
 06560
 06561                    b.Property<double>("SaleCommission")
 06562                        .HasColumnType("double");
 06563
 06564                    b.Property<double>("ServicesAmount")
 06565                        .HasColumnType("double");
 06566
 06567                    b.Property<string>("ShipmentNumber")
 06568                        .HasMaxLength(50)
 06569                        .HasColumnType("varchar(50)");
 06570
 06571                    b.Property<DateTime>("UpdatedAt")
 06572                        .HasColumnType("datetime");
 06573
 06574                    b.HasKey("Id");
 06575
 06576                    b.HasIndex("OrderId");
 06577
 06578                    b.ToTable("OrderShipmentTotals");
 06579                });
 6580
 06581            modelBuilder.Entity("OzonDomains.Models.OrdersFileMetadata", b =>
 06582                {
 06583                    b.Property<int>("Id")
 06584                        .ValueGeneratedOnAdd()
 06585                        .HasColumnType("int");
 06586
 06587                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06588
 06589                    b.Property<string>("FileName")
 06590                        .HasMaxLength(100)
 06591                        .HasColumnType("varchar(100)");
 06592
 06593                    b.Property<string>("FolderName")
 06594                        .HasMaxLength(50)
 06595                        .HasColumnType("varchar(50)");
 06596
 06597                    b.HasKey("Id");
 06598
 06599                    b.ToTable("OrdersFileMetadata");
 06600                });
 6601
 06602            modelBuilder.Entity("OzonDomains.Models.OrdersGridUserSetting", b =>
 06603                {
 06604                    b.Property<int>("Id")
 06605                        .ValueGeneratedOnAdd()
 06606                        .HasColumnType("int");
 06607
 06608                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06609
 06610                    b.Property<string>("Key")
 06611                        .IsRequired()
 06612                        .HasMaxLength(64)
 06613                        .HasColumnType("varchar(64)");
 06614
 06615                    b.Property<DateTime>("UpdatedAt")
 06616                        .HasColumnType("datetime(6)");
 06617
 06618                    b.Property<string>("UserId")
 06619                        .IsRequired()
 06620                        .HasMaxLength(255)
 06621                        .HasColumnType("varchar(255)");
 06622
 06623                    b.Property<string>("Value")
 06624                        .IsRequired()
 06625                        .HasColumnType("longtext");
 06626
 06627                    b.Property<long>("Version")
 06628                        .HasColumnType("bigint");
 06629
 06630                    b.HasKey("Id");
 06631
 06632                    b.HasIndex("UserId", "Key")
 06633                        .IsUnique();
 06634
 06635                    b.ToTable("OrdersGridUserSettings");
 06636                });
 6637
 06638            modelBuilder.Entity("OzonDomains.Models.OzonChatOrder", b =>
 06639                {
 06640                    b.Property<long>("Id")
 06641                        .ValueGeneratedOnAdd()
 06642                        .HasColumnType("bigint");
 06643
 06644                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06645
 06646                    b.Property<string>("ChatId")
 06647                        .IsRequired()
 06648                        .HasMaxLength(100)
 06649                        .HasColumnType("varchar(100)");
 06650
 06651                    b.Property<string>("ChatStatus")
 06652                        .HasMaxLength(50)
 06653                        .HasColumnType("varchar(50)");
 06654
 06655                    b.Property<string>("ChatType")
 06656                        .HasMaxLength(50)
 06657                        .HasColumnType("varchar(50)");
 06658
 06659                    b.Property<int>("ClientId")
 06660                        .HasColumnType("int");
 06661
 06662                    b.Property<DateTime>("CreatedAt")
 06663                        .ValueGeneratedOnAdd()
 06664                        .HasColumnType("datetime")
 06665                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06666
 06667                    b.Property<bool>("IsActive")
 06668                        .HasColumnType("tinyint(1)");
 06669
 06670                    b.Property<DateTime?>("LastMessageDate")
 06671                        .HasColumnType("datetime");
 06672
 06673                    b.Property<bool>("LastMessageFromCustomer")
 06674                        .HasColumnType("tinyint(1)");
 06675
 06676                    b.Property<string>("LastMessageText")
 06677                        .HasColumnType("longtext");
 06678
 06679                    b.Property<int>("OrderId")
 06680                        .HasColumnType("int");
 06681
 06682                    b.Property<string>("PostingNumber")
 06683                        .HasMaxLength(50)
 06684                        .HasColumnType("varchar(50)");
 06685
 06686                    b.Property<int>("UnreadMessagesCount")
 06687                        .HasColumnType("int");
 06688
 06689                    b.Property<DateTime>("UpdatedAt")
 06690                        .ValueGeneratedOnAdd()
 06691                        .HasColumnType("datetime")
 06692                        .HasDefaultValueSql("CURRENT_TIMESTAMP");
 06693
 06694                    b.HasKey("Id");
 06695
 06696                    b.HasIndex("ChatId");
 06697
 06698                    b.HasIndex("ClientId")
 06699                        .HasDatabaseName("FK_OzonChatOrders_OzonClient");
 06700
 06701                    b.HasIndex("OrderId")
 06702                        .HasDatabaseName("FK_OzonChatOrders_Order");
 06703
 06704                    b.HasIndex("PostingNumber");
 06705
 06706                    b.HasIndex("ChatId", "OrderId");
 06707
 06708                    b.HasIndex("IsActive", "ClientId");
 06709
 06710                    b.ToTable("OzonChatOrders");
 06711                });
 6712
 06713            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseStatistic", b =>
 06714                {
 06715                    b.Property<long>("Id")
 06716                        .ValueGeneratedOnAdd()
 06717                        .HasColumnType("bigint");
 06718
 06719                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06720
 06721                    b.Property<string>("ChatId")
 06722                        .IsRequired()
 06723                        .HasMaxLength(100)
 06724                        .HasColumnType("varchar(100)");
 06725
 06726                    b.Property<string>("ChatStatus")
 06727                        .HasMaxLength(50)
 06728                        .HasColumnType("varchar(50)");
 06729
 06730                    b.Property<string>("ChatType")
 06731                        .HasMaxLength(50)
 06732                        .HasColumnType("varchar(50)");
 06733
 06734                    b.Property<int>("ClientId")
 06735                        .HasColumnType("int");
 06736
 06737                    b.Property<DateTime>("ClientMessageDate")
 06738                        .HasColumnType("datetime(6)");
 06739
 06740                    b.Property<long>("ClientMessageId")
 06741                        .HasColumnType("bigint");
 06742
 06743                    b.Property<string>("ClientMessageText")
 06744                        .HasColumnType("longtext");
 06745
 06746                    b.Property<DateTime>("CreatedAt")
 06747                        .HasColumnType("datetime(6)");
 06748
 06749                    b.Property<bool>("IsAnswered")
 06750                        .HasColumnType("tinyint(1)");
 06751
 06752                    b.Property<int?>("OrderId")
 06753                        .HasColumnType("int");
 06754
 06755                    b.Property<string>("PostingNumber")
 06756                        .HasMaxLength(50)
 06757                        .HasColumnType("varchar(50)");
 06758
 06759                    b.Property<string>("ResponderName")
 06760                        .HasMaxLength(200)
 06761                        .HasColumnType("varchar(200)");
 06762
 06763                    b.Property<int?>("ResponseTimeSeconds")
 06764                        .HasColumnType("int");
 06765
 06766                    b.Property<DateTime?>("SellerResponseDate")
 06767                        .HasColumnType("datetime(6)");
 06768
 06769                    b.Property<long?>("SellerResponseMessageId")
 06770                        .HasColumnType("bigint");
 06771
 06772                    b.Property<string>("SellerResponseText")
 06773                        .HasColumnType("longtext");
 06774
 06775                    b.Property<DateTime>("UpdatedAt")
 06776                        .HasColumnType("datetime(6)");
 06777
 06778                    b.HasKey("Id");
 06779
 06780                    b.HasIndex("ChatId")
 06781                        .HasDatabaseName("IX_OzonChatResponseStatistics_ChatId");
 06782
 06783                    b.HasIndex("OrderId")
 06784                        .HasDatabaseName("FK_OzonChatResponseStatistics_Order");
 06785
 06786                    b.HasIndex("ClientId", "ClientMessageDate")
 06787                        .HasDatabaseName("IX_OzonChatResponseStatistics_ClientId_Date");
 06788
 06789                    b.ToTable("OzonChatResponseStatistics");
 06790                });
 6791
 06792            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseTime", b =>
 06793                {
 06794                    b.Property<long>("Id")
 06795                        .ValueGeneratedOnAdd()
 06796                        .HasColumnType("bigint");
 06797
 06798                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06799
 06800                    b.Property<string>("ChatId")
 06801                        .IsRequired()
 06802                        .HasMaxLength(100)
 06803                        .HasColumnType("varchar(100)");
 06804
 06805                    b.Property<int>("ClientId")
 06806                        .HasColumnType("int");
 06807
 06808                    b.Property<DateTime>("CreatedAt")
 06809                        .HasColumnType("datetime");
 06810
 06811                    b.Property<int>("Minutes")
 06812                        .HasColumnType("int");
 06813
 06814                    b.Property<DateTime>("RecordedAt")
 06815                        .HasColumnType("datetime");
 06816
 06817                    b.Property<string>("UserName")
 06818                        .IsRequired()
 06819                        .HasMaxLength(200)
 06820                        .HasColumnType("varchar(200)");
 06821
 06822                    b.HasKey("Id");
 06823
 06824                    b.HasIndex("ChatId")
 06825                        .HasDatabaseName("IX_OzonChatResponseTimes_ChatId");
 06826
 06827                    b.HasIndex("ClientId");
 06828
 06829                    b.HasIndex("UserName")
 06830                        .HasDatabaseName("IX_OzonChatResponseTimes_UserName");
 06831
 06832                    b.ToTable("OzonChatResponseTimes");
 06833                });
 6834
 06835            modelBuilder.Entity("OzonDomains.Models.OzonClient", b =>
 06836                {
 06837                    b.Property<int>("Id")
 06838                        .ValueGeneratedOnAdd()
 06839                        .HasColumnType("int");
 06840
 06841                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06842
 06843                    b.Property<string>("ApiKey")
 06844                        .HasMaxLength(500)
 06845                        .HasColumnType("varchar(500)");
 06846
 06847                    b.Property<string>("ClientId")
 06848                        .HasMaxLength(100)
 06849                        .HasColumnType("varchar(100)");
 06850
 06851                    b.Property<int>("ClientType")
 06852                        .HasColumnType("int");
 06853
 06854                    b.Property<int>("CurrencyCode")
 06855                        .HasColumnType("int");
 06856
 06857                    b.Property<string>("INNCode")
 06858                        .HasMaxLength(20)
 06859                        .HasColumnType("varchar(20)");
 06860
 06861                    b.Property<string>("Name")
 06862                        .IsRequired()
 06863                        .HasMaxLength(50)
 06864                        .HasColumnType("varchar(50)");
 06865
 06866                    b.Property<string>("WarehouseName")
 06867                        .HasMaxLength(100)
 06868                        .HasColumnType("varchar(100)");
 06869
 06870                    b.HasKey("Id");
 06871
 06872                    b.ToTable("OzonClients");
 06873                });
 6874
 06875            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 06876                {
 06877                    b.Property<int>("Id")
 06878                        .ValueGeneratedOnAdd()
 06879                        .HasColumnType("int");
 06880
 06881                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 06882
 06883                    b.Property<int>("AcceptedCount")
 06884                        .HasColumnType("int");
 06885
 06886                    b.Property<string>("AccountLabel")
 06887                        .HasMaxLength(50)
 06888                        .HasColumnType("varchar(50)");
 06889
 06890                    b.Property<DateTime>("ActDate")
 06891                        .HasColumnType("datetime(6)");
 06892
 06893                    b.Property<string>("ActNo")
 06894                        .HasMaxLength(100)
 06895                        .HasColumnType("varchar(100)");
 06896
 06897                    b.Property<string>("ActType")
 06898                        .HasMaxLength(100)
 06899                        .HasColumnType("varchar(100)");
 06900
 06901                    b.Property<int>("BatchId")
 06902                        .HasColumnType("int");
 06903
 06904                    b.Property<int>("DefectCount")
 06905                        .HasColumnType("int");
 06906
 06907                    b.Property<string>("GroupKey")
 06908                        .HasMaxLength(50)
 06909                        .HasColumnType("varchar(50)");
 06910
 06911                    b.Property<string>("GroupName")
 06912                        .HasMaxLength(100)
 06913                        .HasColumnType("varchar(100)");
 06914
 06915                    b.Property<int>("ItemsCount")
 06916                        .HasColumnType("int");
 06917
 06918                    b.Property<int>("MissortCount")
 06919                        .HasColumnType("int");
 06920
 06921                    b.Property<int>("PendingCount")
 06922                        .HasColumnType("int");
 06923
 06924                    b.Property<string>("Pvz")
 06925                        .HasMaxLength(100)
 06926                        .HasColumnType("varchar(100)");
 06927
 06928                    b.Property<int>("RejectedCount")
 06929                        .HasColumnType("int");
 06930
 06931                    b.Property<string>("Source")
 06932                        .HasMaxLength(500)
 06933                        .HasColumnType("varchar(500)");
 06934
 06935                    b.Property<string>("Status")
 06936                        .HasMaxLength(30)
 06937                        .HasColumnType("varchar(30)");
 06938
 06939                    b.Property<decimal>("TotalValue")
 06940                        .HasColumnType("decimal(65,30)");
 06941
 06942                    b.HasKey("Id");
 06943
 06944                    b.HasIndex("BatchId");
 06945
 06946                    b.ToTable("OzonHandoverActs");
 06947                });
 6948
 06949            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 06950                {
 06951                    b.Property<long>("Id")
 06952                        .ValueGeneratedOnAdd()
 06953                        .HasColumnType("bigint");
 06954
 06955                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 06956
 06957                    b.Property<string>("AccountLabel")
 06958                        .HasMaxLength(50)
 06959                        .HasColumnType("varchar(50)");
 06960
 06961                    b.Property<int>("ActId")
 06962                        .HasColumnType("int");
 06963
 06964                    b.Property<string>("Barcode")
 06965                        .HasMaxLength(100)
 06966                        .HasColumnType("varchar(100)");
 06967
 06968                    b.Property<string>("Comment")
 06969                        .HasMaxLength(1000)
 06970                        .HasColumnType("varchar(1000)");
 06971
 06972                    b.Property<bool>("Defect")
 06973                        .HasColumnType("tinyint(1)");
 06974
 06975                    b.Property<string>("ItemNo")
 06976                        .HasMaxLength(50)
 06977                        .HasColumnType("varchar(50)");
 06978
 06979                    b.Property<DateTime?>("MarkedAt")
 06980                        .HasColumnType("datetime(6)");
 06981
 06982                    b.Property<bool>("Missort")
 06983                        .HasColumnType("tinyint(1)");
 06984
 06985                    b.Property<string>("OfferId")
 06986                        .HasMaxLength(100)
 06987                        .HasColumnType("varchar(100)");
 06988
 06989                    b.Property<int?>("OrderId")
 06990                        .HasColumnType("int");
 06991
 06992                    b.Property<string>("OzonStatus")
 06993                        .HasMaxLength(50)
 06994                        .HasColumnType("varchar(50)");
 06995
 06996                    b.Property<string>("ProductName")
 06997                        .HasMaxLength(500)
 06998                        .HasColumnType("varchar(500)");
 06999
 07000                    b.Property<long?>("ReturnId")
 07001                        .HasColumnType("bigint");
 07002
 07003                    b.Property<int>("RowNo")
 07004                        .HasColumnType("int");
 07005
 07006                    b.Property<long?>("Sku")
 07007                        .HasColumnType("bigint");
 07008
 07009                    b.Property<string>("Status")
 07010                        .HasMaxLength(30)
 07011                        .HasColumnType("varchar(30)");
 07012
 07013                    b.Property<decimal>("Value")
 07014                        .HasColumnType("decimal(65,30)");
 07015
 07016                    b.Property<decimal?>("ValueApi")
 07017                        .HasColumnType("decimal(65,30)");
 07018
 07019                    b.Property<int?>("WeightG")
 07020                        .HasColumnType("int");
 07021
 07022                    b.HasKey("Id");
 07023
 07024                    b.HasIndex("ActId");
 07025
 07026                    b.HasIndex("ItemNo");
 07027
 07028                    b.HasIndex("OrderId");
 07029
 07030                    b.ToTable("OzonHandoverActItems");
 07031                });
 7032
 07033            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", b =>
 07034                {
 07035                    b.Property<int>("Id")
 07036                        .ValueGeneratedOnAdd()
 07037                        .HasColumnType("int");
 07038
 07039                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07040
 07041                    b.Property<string>("ClosedId")
 07042                        .HasMaxLength(300)
 07043                        .HasColumnType("varchar(300)");
 07044
 07045                    b.Property<string>("ClosedKind")
 07046                        .HasMaxLength(50)
 07047                        .HasColumnType("varchar(50)");
 07048
 07049                    b.Property<string>("DocumentType")
 07050                        .HasMaxLength(50)
 07051                        .HasColumnType("varchar(50)");
 07052
 07053                    b.Property<DateTime>("GeneratedAt")
 07054                        .HasColumnType("datetime(6)");
 07055
 07056                    b.Property<DateTime>("ImportedAt")
 07057                        .HasColumnType("datetime(6)");
 07058
 07059                    b.Property<int>("MatchedItemsCount")
 07060                        .HasColumnType("int");
 07061
 07062                    b.Property<string>("RawJson")
 07063                        .HasColumnType("longtext");
 07064
 07065                    b.Property<int>("SummaryAcceptedItemsCount")
 07066                        .HasColumnType("int");
 07067
 07068                    b.Property<decimal>("SummaryAcceptedValue")
 07069                        .HasColumnType("decimal(65,30)");
 07070
 07071                    b.Property<int>("SummaryActsCount")
 07072                        .HasColumnType("int");
 07073
 07074                    b.Property<int>("SummaryDefectCount")
 07075                        .HasColumnType("int");
 07076
 07077                    b.Property<int>("SummaryItemsCount")
 07078                        .HasColumnType("int");
 07079
 07080                    b.Property<int>("SummaryMissortCount")
 07081                        .HasColumnType("int");
 07082
 07083                    b.Property<int>("SummaryPendingItemsCount")
 07084                        .HasColumnType("int");
 07085
 07086                    b.Property<decimal>("SummaryPendingValue")
 07087                        .HasColumnType("decimal(65,30)");
 07088
 07089                    b.Property<int>("SummaryRejectedItemsCount")
 07090                        .HasColumnType("int");
 07091
 07092                    b.Property<decimal>("SummaryRejectedValue")
 07093                        .HasColumnType("decimal(65,30)");
 07094
 07095                    b.Property<decimal>("SummaryTotalValue")
 07096                        .HasColumnType("decimal(65,30)");
 07097
 07098                    b.Property<int>("UnmatchedItemsCount")
 07099                        .HasColumnType("int");
 07100
 07101                    b.Property<DateTime>("UpdatedAt")
 07102                        .HasColumnType("datetime(6)");
 07103
 07104                    b.HasKey("Id");
 07105
 07106                    b.HasIndex("ClosedId")
 07107                        .IsUnique();
 07108
 07109                    b.ToTable("OzonHandoverImportBatches");
 07110                });
 7111
 07112            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 07113                {
 07114                    b.Property<long>("Id")
 07115                        .ValueGeneratedOnAdd()
 07116                        .HasColumnType("bigint");
 07117
 07118                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07119
 07120                    b.Property<DateTime>("CreatedAt")
 07121                        .HasColumnType("datetime(6)");
 07122
 07123                    b.Property<string>("EventFingerprint")
 07124                        .IsRequired()
 07125                        .HasMaxLength(64)
 07126                        .HasColumnType("varchar(64)");
 07127
 07128                    b.Property<DateTime>("OccurredAt")
 07129                        .HasColumnType("datetime(6)");
 07130
 07131                    b.Property<int>("OzonClientId")
 07132                        .HasColumnType("int");
 07133
 07134                    b.Property<string>("PostingNumber")
 07135                        .IsRequired()
 07136                        .HasMaxLength(100)
 07137                        .HasColumnType("varchar(100)");
 07138
 07139                    b.Property<long?>("ReasonId")
 07140                        .HasColumnType("bigint");
 07141
 07142                    b.Property<string>("ReasonMessage")
 07143                        .HasColumnType("text");
 07144
 07145                    b.Property<string>("ReasonTitle")
 07146                        .HasMaxLength(500)
 07147                        .HasColumnType("varchar(500)");
 07148
 07149                    b.Property<string>("ReasonTypeId")
 07150                        .HasMaxLength(32)
 07151                        .HasColumnType("varchar(32)");
 07152
 07153                    b.Property<string>("Source")
 07154                        .IsRequired()
 07155                        .HasMaxLength(20)
 07156                        .HasColumnType("varchar(20)");
 07157
 07158                    b.HasKey("Id");
 07159
 07160                    b.HasIndex("EventFingerprint")
 07161                        .IsUnique()
 07162                        .HasDatabaseName("UX_OzonPostingCancellations_EventFingerprint");
 07163
 07164                    b.HasIndex("OzonClientId", "PostingNumber")
 07165                        .HasDatabaseName("IX_OzonPostingCancellations_Client_Posting");
 07166
 07167                    b.ToTable("OzonPostingCancellations");
 07168                });
 7169
 07170            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellationOrder", b =>
 07171                {
 07172                    b.Property<long>("CancellationId")
 07173                        .HasColumnType("bigint");
 07174
 07175                    b.Property<int>("OrderId")
 07176                        .HasColumnType("int");
 07177
 07178                    b.HasKey("CancellationId", "OrderId");
 07179
 07180                    b.HasIndex("OrderId");
 07181
 07182                    b.ToTable("OzonPostingCancellationOrders");
 07183                });
 7184
 07185            modelBuilder.Entity("OzonDomains.Models.OzonPushNotification", b =>
 07186                {
 07187                    b.Property<long>("Id")
 07188                        .ValueGeneratedOnAdd()
 07189                        .HasColumnType("bigint");
 07190
 07191                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07192
 07193                    b.Property<string>("ActionDetails")
 07194                        .HasColumnType("text");
 07195
 07196                    b.Property<string>("ErrorMessage")
 07197                        .HasColumnType("text");
 07198
 07199                    b.Property<string>("MessageType")
 07200                        .IsRequired()
 07201                        .HasMaxLength(50)
 07202                        .HasColumnType("varchar(50)");
 07203
 07204                    b.Property<string>("PostingNumber")
 07205                        .HasMaxLength(100)
 07206                        .HasColumnType("varchar(100)");
 07207
 07208                    b.Property<DateTime?>("ProcessedAt")
 07209                        .HasColumnType("datetime(6)");
 07210
 07211                    b.Property<string>("ProcessingStatus")
 07212                        .IsRequired()
 07213                        .HasMaxLength(20)
 07214                        .HasColumnType("varchar(20)");
 07215
 07216                    b.Property<string>("RawPayload")
 07217                        .IsRequired()
 07218                        .HasColumnType("longtext");
 07219
 07220                    b.Property<DateTime>("ReceivedAt")
 07221                        .HasColumnType("datetime(6)");
 07222
 07223                    b.Property<long?>("SellerId")
 07224                        .HasColumnType("bigint");
 07225
 07226                    b.Property<string>("SourceIpAddress")
 07227                        .HasMaxLength(50)
 07228                        .HasColumnType("varchar(50)");
 07229
 07230                    b.Property<long?>("WarehouseId")
 07231                        .HasColumnType("bigint");
 07232
 07233                    b.HasKey("Id");
 07234
 07235                    b.HasIndex("MessageType")
 07236                        .HasDatabaseName("IX_OzonPushNotifications_MessageType");
 07237
 07238                    b.HasIndex("PostingNumber")
 07239                        .HasDatabaseName("IX_OzonPushNotifications_PostingNumber");
 07240
 07241                    b.HasIndex("ReceivedAt")
 07242                        .HasDatabaseName("IX_OzonPushNotifications_ReceivedAt");
 07243
 07244                    b.HasIndex("SellerId")
 07245                        .HasDatabaseName("IX_OzonPushNotifications_SellerId");
 07246
 07247                    b.ToTable("OzonPushNotifications");
 07248                });
 7249
 07250            modelBuilder.Entity("OzonDomains.Models.PriceIndexes", b =>
 07251                {
 07252                    b.Property<int>("Id")
 07253                        .ValueGeneratedOnAdd()
 07254                        .HasColumnType("int");
 07255
 07256                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07257
 07258                    b.Property<string>("ColorIndex")
 07259                        .IsRequired()
 07260                        .HasMaxLength(20)
 07261                        .HasColumnType("varchar(20)");
 07262
 07263                    b.Property<decimal>("ExternalMinPrice")
 07264                        .HasColumnType("decimal(18,2)");
 07265
 07266                    b.Property<string>("ExternalMinPriceCurrency")
 07267                        .IsRequired()
 07268                        .HasMaxLength(10)
 07269                        .HasColumnType("varchar(10)");
 07270
 07271                    b.Property<decimal>("ExternalPriceIndexValue")
 07272                        .HasColumnType("decimal(18,4)");
 07273
 07274                    b.Property<int>("OrderPriceId")
 07275                        .HasColumnType("int");
 07276
 07277                    b.Property<decimal>("OzonMinPrice")
 07278                        .HasColumnType("decimal(18,2)");
 07279
 07280                    b.Property<string>("OzonMinPriceCurrency")
 07281                        .IsRequired()
 07282                        .HasMaxLength(10)
 07283                        .HasColumnType("varchar(10)");
 07284
 07285                    b.Property<decimal>("OzonPriceIndexValue")
 07286                        .HasColumnType("decimal(18,4)");
 07287
 07288                    b.Property<decimal>("SelfMarketplacesMinPrice")
 07289                        .HasColumnType("decimal(18,2)");
 07290
 07291                    b.Property<string>("SelfMarketplacesMinPriceCurrency")
 07292                        .IsRequired()
 07293                        .HasMaxLength(10)
 07294                        .HasColumnType("varchar(10)");
 07295
 07296                    b.Property<decimal>("SelfMarketplacesPriceIndexValue")
 07297                        .HasColumnType("decimal(18,4)");
 07298
 07299                    b.HasKey("Id");
 07300
 07301                    b.HasIndex("OrderPriceId");
 07302
 07303                    b.ToTable("PriceIndexes");
 07304                });
 7305
 07306            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 07307                {
 07308                    b.Property<int>("Id")
 07309                        .ValueGeneratedOnAdd()
 07310                        .HasColumnType("int");
 07311
 07312                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07313
 07314                    b.Property<string>("Article")
 07315                        .HasMaxLength(255)
 07316                        .HasColumnType("varchar(255)");
 07317
 07318                    b.Property<string>("Barcode")
 07319                        .HasMaxLength(255)
 07320                        .HasColumnType("varchar(255)");
 07321
 07322                    b.Property<string>("CommercialCategory")
 07323                        .HasMaxLength(255)
 07324                        .HasColumnType("varchar(255)");
 07325
 07326                    b.Property<decimal?>("CurrentPriceWithDiscount")
 07327                        .HasColumnType("decimal(65,30)");
 07328
 07329                    b.Property<string>("FboOzonSkuId")
 07330                        .HasMaxLength(50)
 07331                        .HasColumnType("varchar(50)");
 07332
 07333                    b.Property<string>("FbsOzonSkuId")
 07334                        .HasMaxLength(50)
 07335                        .HasColumnType("varchar(50)");
 07336
 07337                    b.Property<string>("ImageUrl")
 07338                        .HasMaxLength(2048)
 07339                        .HasColumnType("varchar(2048)");
 07340
 07341                    b.Property<string>("OzonProductId")
 07342                        .HasMaxLength(50)
 07343                        .HasColumnType("varchar(50)");
 07344
 07345                    b.Property<int?>("ReplacementProductId")
 07346                        .HasColumnType("int");
 07347
 07348                    b.Property<double?>("Volume")
 07349                        .HasColumnType("double");
 07350
 07351                    b.Property<double?>("VolumetricWeight")
 07352                        .HasColumnType("double");
 07353
 07354                    b.Property<decimal?>("Weight")
 07355                        .HasColumnType("decimal(65,30)");
 07356
 07357                    b.HasKey("Id");
 07358
 07359                    b.HasIndex("ReplacementProductId");
 07360
 07361                    b.ToTable("Products");
 07362                });
 7363
 07364            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 07365                {
 07366                    b.Property<long>("Id")
 07367                        .ValueGeneratedOnAdd()
 07368                        .HasColumnType("bigint");
 07369
 07370                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07371
 07372                    b.Property<int?>("ActiveStudioOrderId")
 07373                        .HasColumnType("int");
 07374
 07375                    b.Property<string>("Article")
 07376                        .IsRequired()
 07377                        .HasMaxLength(60)
 07378                        .HasColumnType("varchar(60)");
 07379
 07380                    b.Property<string>("ArticleId")
 07381                        .IsRequired()
 07382                        .HasMaxLength(40)
 07383                        .HasColumnType("varchar(40)");
 07384
 07385                    b.Property<string>("Brand")
 07386                        .IsRequired()
 07387                        .HasMaxLength(100)
 07388                        .HasColumnType("varchar(100)");
 07389
 07390                    b.Property<DateTime>("CreatedAtUtc")
 07391                        .HasColumnType("datetime(6)");
 07392
 07393                    b.Property<string>("CreatedBy")
 07394                        .HasMaxLength(450)
 07395                        .HasColumnType("varchar(450)");
 07396
 07397                    b.Property<string>("CurrencyCode")
 07398                        .IsRequired()
 07399                        .HasMaxLength(8)
 07400                        .HasColumnType("varchar(8)");
 07401
 07402                    b.Property<DateTime?>("DeliveryAtUtc")
 07403                        .HasColumnType("datetime(6)");
 07404
 07405                    b.Property<string>("LastError")
 07406                        .HasMaxLength(1000)
 07407                        .HasColumnType("varchar(1000)");
 07408
 07409                    b.Property<int>("Multi")
 07410                        .HasColumnType("int");
 07411
 07412                    b.Property<string>("PointCode")
 07413                        .HasMaxLength(120)
 07414                        .HasColumnType("varchar(120)");
 07415
 07416                    b.Property<string>("PointName")
 07417                        .HasMaxLength(300)
 07418                        .HasColumnType("varchar(300)");
 07419
 07420                    b.Property<string>("ProductCode")
 07421                        .HasMaxLength(120)
 07422                        .HasColumnType("varchar(120)");
 07423
 07424                    b.Property<string>("ProductName")
 07425                        .HasMaxLength(200)
 07426                        .HasColumnType("varchar(200)");
 07427
 07428                    b.Property<decimal>("Quantity")
 07429                        .HasPrecision(18, 3)
 07430                        .HasColumnType("decimal(18,3)");
 07431
 07432                    b.Property<decimal?>("SourcePrice")
 07433                        .HasPrecision(18, 4)
 07434                        .HasColumnType("decimal(18,4)");
 07435
 07436                    b.Property<string>("Status")
 07437                        .IsRequired()
 07438                        .HasMaxLength(30)
 07439                        .HasColumnType("varchar(30)");
 07440
 07441                    b.Property<int>("StudioOrderId")
 07442                        .HasColumnType("int");
 07443
 07444                    b.Property<string>("TestResultJson")
 07445                        .HasColumnType("longtext");
 07446
 07447                    b.Property<DateTime?>("TestedAtUtc")
 07448                        .HasColumnType("datetime(6)");
 07449
 07450                    b.Property<DateTime>("UpdatedAtUtc")
 07451                        .HasColumnType("datetime(6)");
 07452
 07453                    b.Property<string>("WarehouseId")
 07454                        .IsRequired()
 07455                        .HasMaxLength(40)
 07456                        .HasColumnType("varchar(40)");
 07457
 07458                    b.Property<string>("WarehouseName")
 07459                        .HasMaxLength(160)
 07460                        .HasColumnType("varchar(160)");
 07461
 07462                    b.HasKey("Id");
 07463
 07464                    b.HasIndex("ActiveStudioOrderId")
 07465                        .IsUnique()
 07466                        .HasDatabaseName("UX_ProfitLigaCartItems_ActiveOrder");
 07467
 07468                    b.HasIndex("CreatedAtUtc")
 07469                        .HasDatabaseName("IX_ProfitLigaCartItems_Created");
 07470
 07471                    b.HasIndex("StudioOrderId", "Status")
 07472                        .HasDatabaseName("IX_ProfitLigaCartItems_Order_Status");
 07473
 07474                    b.ToTable("ProfitLigaCartItems");
 07475                });
 7476
 07477            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 07478                {
 07479                    b.Property<long>("Id")
 07480                        .ValueGeneratedOnAdd()
 07481                        .HasColumnType("bigint");
 07482
 07483                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07484
 07485                    b.Property<DateTime>("CreatedAtUtc")
 07486                        .HasColumnType("datetime(6)");
 07487
 07488                    b.Property<string>("CreatedBy")
 07489                        .HasMaxLength(450)
 07490                        .HasColumnType("varchar(450)");
 07491
 07492                    b.Property<string>("DeliveryMethodId")
 07493                        .HasMaxLength(20)
 07494                        .HasColumnType("varchar(20)");
 07495
 07496                    b.Property<string>("DeliveryMethodName")
 07497                        .HasMaxLength(100)
 07498                        .HasColumnType("varchar(100)");
 07499
 07500                    b.Property<string>("OrderNumber")
 07501                        .IsRequired()
 07502                        .HasMaxLength(50)
 07503                        .HasColumnType("varchar(50)");
 07504
 07505                    b.Property<string>("PaymentId")
 07506                        .HasMaxLength(20)
 07507                        .HasColumnType("varchar(20)");
 07508
 07509                    b.Property<string>("PaymentName")
 07510                        .HasMaxLength(100)
 07511                        .HasColumnType("varchar(100)");
 07512
 07513                    b.Property<string>("PointCode")
 07514                        .HasMaxLength(120)
 07515                        .HasColumnType("varchar(120)");
 07516
 07517                    b.Property<string>("PointName")
 07518                        .HasMaxLength(300)
 07519                        .HasColumnType("varchar(300)");
 07520
 07521                    b.Property<string>("RequestJson")
 07522                        .HasColumnType("longtext");
 07523
 07524                    b.Property<string>("ResponseJson")
 07525                        .HasColumnType("longtext");
 07526
 07527                    b.Property<string>("Status")
 07528                        .IsRequired()
 07529                        .HasMaxLength(50)
 07530                        .HasColumnType("varchar(50)");
 07531
 07532                    b.HasKey("Id");
 07533
 07534                    b.HasIndex("OrderNumber")
 07535                        .IsUnique()
 07536                        .HasDatabaseName("UX_ProfitLigaOrders_Number");
 07537
 07538                    b.ToTable("ProfitLigaOrders");
 07539                });
 7540
 07541            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 07542                {
 07543                    b.Property<long>("Id")
 07544                        .ValueGeneratedOnAdd()
 07545                        .HasColumnType("bigint");
 07546
 07547                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07548
 07549                    b.Property<string>("Article")
 07550                        .IsRequired()
 07551                        .HasMaxLength(60)
 07552                        .HasColumnType("varchar(60)");
 07553
 07554                    b.Property<string>("ArticleId")
 07555                        .HasMaxLength(40)
 07556                        .HasColumnType("varchar(40)");
 07557
 07558                    b.Property<string>("Brand")
 07559                        .IsRequired()
 07560                        .HasMaxLength(100)
 07561                        .HasColumnType("varchar(100)");
 07562
 07563                    b.Property<string>("CurrencyCode")
 07564                        .HasMaxLength(8)
 07565                        .HasColumnType("varchar(8)");
 07566
 07567                    b.Property<string>("Error")
 07568                        .HasMaxLength(1000)
 07569                        .HasColumnType("varchar(1000)");
 07570
 07571                    b.Property<string>("ExternalLineId")
 07572                        .HasMaxLength(50)
 07573                        .HasColumnType("varchar(50)");
 07574
 07575                    b.Property<decimal?>("Price")
 07576                        .HasPrecision(18, 4)
 07577                        .HasColumnType("decimal(18,4)");
 07578
 07579                    b.Property<string>("ProductCode")
 07580                        .HasMaxLength(120)
 07581                        .HasColumnType("varchar(120)");
 07582
 07583                    b.Property<long?>("ProfitLigaCartItemId")
 07584                        .HasColumnType("bigint");
 07585
 07586                    b.Property<long>("ProfitLigaOrderId")
 07587                        .HasColumnType("bigint");
 07588
 07589                    b.Property<decimal>("Quantity")
 07590                        .HasPrecision(18, 3)
 07591                        .HasColumnType("decimal(18,3)");
 07592
 07593                    b.Property<int>("StudioOrderId")
 07594                        .HasColumnType("int");
 07595
 07596                    b.HasKey("Id");
 07597
 07598                    b.HasIndex("ProfitLigaCartItemId")
 07599                        .HasDatabaseName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 07600
 07601                    b.HasIndex("ProfitLigaOrderId")
 07602                        .HasDatabaseName("IX_ProfitLigaOrderItems_Order");
 07603
 07604                    b.HasIndex("StudioOrderId")
 07605                        .HasDatabaseName("FK_ProfitLigaOrderItems_Orders_StudioOrderId");
 07606
 07607                    b.ToTable("ProfitLigaOrderItems");
 07608                });
 7609
 07610            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 07611                {
 07612                    b.Property<long>("Id")
 07613                        .ValueGeneratedOnAdd()
 07614                        .HasColumnType("bigint");
 07615
 07616                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07617
 07618                    b.Property<string>("PointCode")
 07619                        .IsRequired()
 07620                        .HasMaxLength(120)
 07621                        .HasColumnType("varchar(120)");
 07622
 07623                    b.Property<string>("PointName")
 07624                        .HasMaxLength(300)
 07625                        .HasColumnType("varchar(300)");
 07626
 07627                    b.Property<int>("ShipmentWarehouseId")
 07628                        .HasColumnType("int");
 07629
 07630                    b.HasKey("Id");
 07631
 07632                    b.HasIndex("ShipmentWarehouseId")
 07633                        .IsUnique()
 07634                        .HasDatabaseName("UX_ProfitLigaPointMappings_Warehouse");
 07635
 07636                    b.ToTable("ProfitLigaPointMappings");
 07637                });
 7638
 07639            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 07640                {
 07641                    b.Property<long>("Id")
 07642                        .ValueGeneratedOnAdd()
 07643                        .HasColumnType("bigint");
 07644
 07645                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07646
 07647                    b.Property<int?>("ActiveStudioOrderId")
 07648                        .HasColumnType("int");
 07649
 07650                    b.Property<string>("AgreementCode")
 07651                        .HasMaxLength(80)
 07652                        .HasColumnType("varchar(80)");
 07653
 07654                    b.Property<string>("Article")
 07655                        .IsRequired()
 07656                        .HasMaxLength(120)
 07657                        .HasColumnType("varchar(120)");
 07658
 07659                    b.Property<string>("Brand")
 07660                        .IsRequired()
 07661                        .HasMaxLength(256)
 07662                        .HasColumnType("varchar(256)");
 07663
 07664                    b.Property<DateTime>("CreatedAtUtc")
 07665                        .HasColumnType("datetime(6)");
 07666
 07667                    b.Property<string>("CreatedBy")
 07668                        .HasMaxLength(450)
 07669                        .HasColumnType("varchar(450)");
 07670
 07671                    b.Property<string>("CurrencyCode")
 07672                        .IsRequired()
 07673                        .HasMaxLength(8)
 07674                        .HasColumnType("varchar(8)");
 07675
 07676                    b.Property<string>("DeliveryAddressCode")
 07677                        .HasMaxLength(80)
 07678                        .HasColumnType("varchar(80)");
 07679
 07680                    b.Property<DateTime?>("DeliveryAtUtc")
 07681                        .HasColumnType("datetime(6)");
 07682
 07683                    b.Property<string>("DeliveryType")
 07684                        .HasMaxLength(40)
 07685                        .HasColumnType("varchar(40)");
 07686
 07687                    b.Property<string>("Direction")
 07688                        .HasMaxLength(120)
 07689                        .HasColumnType("varchar(120)");
 07690
 07691                    b.Property<string>("ExternalBasketItemId")
 07692                        .HasMaxLength(120)
 07693                        .HasColumnType("varchar(120)");
 07694
 07695                    b.Property<string>("LastError")
 07696                        .HasMaxLength(1000)
 07697                        .HasColumnType("varchar(1000)");
 07698
 07699                    b.Property<string>("LocationCode")
 07700                        .HasMaxLength(80)
 07701                        .HasColumnType("varchar(80)");
 07702
 07703                    b.Property<string>("PriceId")
 07704                        .IsRequired()
 07705                        .HasMaxLength(512)
 07706                        .HasColumnType("varchar(512)");
 07707
 07708                    b.Property<string>("ProductName")
 07709                        .HasMaxLength(200)
 07710                        .HasColumnType("varchar(200)");
 07711
 07712                    b.Property<decimal>("Quantity")
 07713                        .HasPrecision(18, 3)
 07714                        .HasColumnType("decimal(18,3)");
 07715
 07716                    b.Property<decimal?>("SourcePrice")
 07717                        .HasPrecision(18, 4)
 07718                        .HasColumnType("decimal(18,4)");
 07719
 07720                    b.Property<string>("Status")
 07721                        .IsRequired()
 07722                        .HasMaxLength(30)
 07723                        .HasColumnType("varchar(30)");
 07724
 07725                    b.Property<int>("StudioOrderId")
 07726                        .HasColumnType("int");
 07727
 07728                    b.Property<DateTime>("UpdatedAtUtc")
 07729                        .HasColumnType("datetime(6)");
 07730
 07731                    b.HasKey("Id");
 07732
 07733                    b.HasIndex("ActiveStudioOrderId")
 07734                        .IsUnique()
 07735                        .HasDatabaseName("UX_ShateMCartItems_ActiveStudioOrderId");
 07736
 07737                    b.HasIndex("StudioOrderId")
 07738                        .HasDatabaseName("FK_ShateMCartItems_Orders_StudioOrderId");
 07739
 07740                    b.HasIndex("ExternalBasketItemId", "Status");
 07741
 07742                    b.ToTable("ShateMCartItems");
 07743                });
 7744
 07745            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 07746                {
 07747                    b.Property<long>("Id")
 07748                        .ValueGeneratedOnAdd()
 07749                        .HasColumnType("bigint");
 07750
 07751                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07752
 07753                    b.Property<string>("AgreementCode")
 07754                        .IsRequired()
 07755                        .HasMaxLength(80)
 07756                        .HasColumnType("varchar(80)");
 07757
 07758                    b.Property<DateTime>("CreatedAtUtc")
 07759                        .HasColumnType("datetime(6)");
 07760
 07761                    b.Property<string>("CreatedBy")
 07762                        .HasMaxLength(450)
 07763                        .HasColumnType("varchar(450)");
 07764
 07765                    b.Property<string>("DeliveryAddressCode")
 07766                        .HasMaxLength(80)
 07767                        .HasColumnType("varchar(80)");
 07768
 07769                    b.Property<string>("DeliveryType")
 07770                        .HasMaxLength(40)
 07771                        .HasColumnType("varchar(40)");
 07772
 07773                    b.Property<string>("ExternalOrderId")
 07774                        .HasMaxLength(120)
 07775                        .HasColumnType("varchar(120)");
 07776
 07777                    b.Property<string>("RequestJson")
 07778                        .HasColumnType("longtext");
 07779
 07780                    b.Property<string>("ResponseJson")
 07781                        .HasColumnType("longtext");
 07782
 07783                    b.Property<string>("Status")
 07784                        .IsRequired()
 07785                        .HasMaxLength(50)
 07786                        .HasColumnType("varchar(50)");
 07787
 07788                    b.HasKey("Id");
 07789
 07790                    b.HasIndex("ExternalOrderId")
 07791                        .IsUnique()
 07792                        .HasDatabaseName("UX_ShateMOrders_ExternalOrderId");
 07793
 07794                    b.ToTable("ShateMOrders");
 07795                });
 7796
 07797            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 07798                {
 07799                    b.Property<long>("Id")
 07800                        .ValueGeneratedOnAdd()
 07801                        .HasColumnType("bigint");
 07802
 07803                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07804
 07805                    b.Property<string>("CurrencyCode")
 07806                        .HasMaxLength(8)
 07807                        .HasColumnType("varchar(8)");
 07808
 07809                    b.Property<string>("Error")
 07810                        .HasMaxLength(1000)
 07811                        .HasColumnType("varchar(1000)");
 07812
 07813                    b.Property<string>("ExternalLineId")
 07814                        .HasMaxLength(120)
 07815                        .HasColumnType("varchar(120)");
 07816
 07817                    b.Property<decimal?>("Price")
 07818                        .HasPrecision(18, 4)
 07819                        .HasColumnType("decimal(18,4)");
 07820
 07821                    b.Property<string>("PriceId")
 07822                        .IsRequired()
 07823                        .HasMaxLength(512)
 07824                        .HasColumnType("varchar(512)");
 07825
 07826                    b.Property<decimal>("Quantity")
 07827                        .HasPrecision(18, 3)
 07828                        .HasColumnType("decimal(18,3)");
 07829
 07830                    b.Property<long?>("ShateMCartItemId")
 07831                        .HasColumnType("bigint");
 07832
 07833                    b.Property<long>("ShateMOrderId")
 07834                        .HasColumnType("bigint");
 07835
 07836                    b.Property<int>("StudioOrderId")
 07837                        .HasColumnType("int");
 07838
 07839                    b.HasKey("Id");
 07840
 07841                    b.HasIndex("ShateMOrderId", "StudioOrderId", "PriceId")
 07842                        .IsUnique()
 07843                        .HasDatabaseName("UX_ShateMOrderItems_Order_StudioOrder_Price");
 07844
 07845                    b.ToTable("ShateMOrderItems");
 07846                });
 7847
 07848            modelBuilder.Entity("OzonDomains.Models.Shipment", b =>
 07849                {
 07850                    b.Property<int>("Id")
 07851                        .ValueGeneratedOnAdd()
 07852                        .HasColumnType("int");
 07853
 07854                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07855
 07856                    b.Property<string>("ShipmentNumber")
 07857                        .IsRequired()
 07858                        .HasMaxLength(50)
 07859                        .HasColumnType("varchar(50)");
 07860
 07861                    b.HasKey("Id");
 07862
 07863                    b.HasIndex("ShipmentNumber")
 07864                        .IsUnique()
 07865                        .HasDatabaseName("UX_Shipments_ShipmentNumber");
 07866
 07867                    b.ToTable("Shipments");
 07868                });
 7869
 07870            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 07871                {
 07872                    b.Property<int>("Id")
 07873                        .ValueGeneratedOnAdd()
 07874                        .HasColumnType("int");
 07875
 07876                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 07877
 07878                    b.Property<string>("Conditions")
 07879                        .HasMaxLength(1000)
 07880                        .HasColumnType("text");
 07881
 07882                    b.Property<DateTime>("CreatedAt")
 07883                        .HasColumnType("datetime(6)");
 07884
 07885                    b.Property<string>("Description")
 07886                        .HasMaxLength(500)
 07887                        .HasColumnType("varchar(500)");
 07888
 07889                    b.Property<string>("DisplayName")
 07890                        .HasMaxLength(100)
 07891                        .HasColumnType("varchar(100)");
 07892
 07893                    b.Property<int?>("DisplayOrder")
 07894                        .HasColumnType("int");
 07895
 07896                    b.Property<int>("FromStatusId")
 07897                        .HasColumnType("int");
 07898
 07899                    b.Property<bool>("IsActive")
 07900                        .HasColumnType("tinyint(1)");
 07901
 07902                    b.Property<bool>("IsRepeatable")
 07903                        .HasColumnType("tinyint(1)");
 07904
 07905                    b.Property<string>("SystemName")
 07906                        .HasMaxLength(50)
 07907                        .HasColumnType("varchar(50)");
 07908
 07909                    b.Property<int>("ToStatusId")
 07910                        .HasColumnType("int");
 07911
 07912                    b.Property<int>("TransactionType")
 07913                        .HasColumnType("int");
 07914
 07915                    b.Property<DateTime?>("UpdatedAt")
 07916                        .HasColumnType("datetime(6)");
 07917
 07918                    b.HasKey("Id");
 07919
 07920                    b.HasIndex("DisplayOrder")
 07921                        .HasDatabaseName("IX_StatusTransitions_DisplayOrder");
 07922
 07923                    b.HasIndex("FromStatusId")
 07924                        .HasDatabaseName("IX_StatusTransitions_FromStatusId");
 07925
 07926                    b.HasIndex("IsActive")
 07927                        .HasDatabaseName("IX_StatusTransitions_IsActive");
 07928
 07929                    b.HasIndex("ToStatusId");
 07930
 07931                    b.HasIndex("FromStatusId", "ToStatusId", "TransactionType")
 07932                        .IsUnique()
 07933                        .HasDatabaseName("UQ_StatusTransitions_UniqueTransition");
 07934
 07935                    b.ToTable("StatusTransitions", t =>
 07936                        {
 07937                            t.HasCheckConstraint("CHK_StatusTransitions_DifferentStatuses", "`FromStatusId` <> `ToStatus
 07938                        });
 07939                });
 7940
 07941            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 07942                {
 07943                    b.Property<long>("Id")
 07944                        .ValueGeneratedOnAdd()
 07945                        .HasColumnType("bigint");
 07946
 07947                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 07948
 07949                    b.Property<string>("Comment")
 07950                        .HasMaxLength(500)
 07951                        .HasColumnType("text");
 07952
 07953                    b.Property<int>("EntityId")
 07954                        .HasColumnType("int");
 07955
 07956                    b.Property<string>("EntityType")
 07957                        .IsRequired()
 07958                        .HasMaxLength(50)
 07959                        .HasColumnType("varchar(50)");
 07960
 07961                    b.Property<int>("FromStatusId")
 07962                        .HasColumnType("int");
 07963
 07964                    b.Property<string>("Metadata")
 07965                        .HasColumnType("longtext");
 07966
 07967                    b.Property<DateTime>("PerformedAt")
 07968                        .HasColumnType("datetime(6)");
 07969
 07970                    b.Property<int?>("PerformedByUserId")
 07971                        .HasColumnType("int");
 07972
 07973                    b.Property<int?>("StatusTransitionId")
 07974                        .HasColumnType("int");
 07975
 07976                    b.Property<int>("ToStatusId")
 07977                        .HasColumnType("int");
 07978
 07979                    b.Property<int?>("TransactionType")
 07980                        .HasColumnType("int");
 07981
 07982                    b.HasKey("Id");
 07983
 07984                    b.HasIndex("FromStatusId")
 07985                        .HasDatabaseName("IX_FromStatusId");
 07986
 07987                    b.HasIndex("PerformedAt")
 07988                        .HasDatabaseName("IX_PerformedAt");
 07989
 07990                    b.HasIndex("StatusTransitionId")
 07991                        .HasDatabaseName("IX_StatusTransitionId");
 07992
 07993                    b.HasIndex("ToStatusId")
 07994                        .HasDatabaseName("IX_ToStatusId");
 07995
 07996                    b.HasIndex("TransactionType")
 07997                        .HasDatabaseName("IX_TransactionType");
 07998
 07999                    b.HasIndex("EntityType", "EntityId")
 08000                        .HasDatabaseName("IX_Entity");
 08001
 08002                    b.ToTable("StatusTransitionHistory");
 08003                });
 8004
 08005            modelBuilder.Entity("OzonDomains.Models.Supplier", b =>
 08006                {
 08007                    b.Property<int>("Id")
 08008                        .ValueGeneratedOnAdd()
 08009                        .HasColumnType("int");
 08010
 08011                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08012
 08013                    b.Property<int?>("AdditionalTerm")
 08014                        .HasColumnType("int");
 08015
 08016                    b.Property<decimal?>("CostFactor")
 08017                        .HasColumnType("decimal(65,30)");
 08018
 08019                    b.Property<string>("CsvUrl")
 08020                        .HasMaxLength(500)
 08021                        .HasColumnType("varchar(250)");
 08022
 08023                    b.Property<int>("CurrencyCode")
 08024                        .HasColumnType("int");
 08025
 08026                    b.Property<int?>("ExpectedDeliveryHours")
 08027                        .HasColumnType("int");
 08028
 08029                    b.Property<string>("INNCode")
 08030                        .HasMaxLength(20)
 08031                        .HasColumnType("varchar(20)");
 08032
 08033                    b.Property<bool>("IsReSeller")
 08034                        .HasColumnType("tinyint(1)");
 08035
 08036                    b.Property<bool>("IsVatApplicable")
 08037                        .HasColumnType("tinyint(1)");
 08038
 08039                    b.Property<string>("Name")
 08040                        .HasMaxLength(50)
 08041                        .HasColumnType("varchar(50)");
 08042
 08043                    b.Property<string>("Site")
 08044                        .HasMaxLength(500)
 08045                        .HasColumnType("varchar(500)");
 08046
 08047                    b.Property<decimal?>("WeightFactor")
 08048                        .HasColumnType("decimal(65,30)");
 08049
 08050                    b.Property<int>("WeightFactorCurrencyCode")
 08051                        .HasColumnType("int");
 08052
 08053                    b.HasKey("Id");
 08054
 08055                    b.ToTable("Suppliers");
 08056                });
 8057
 08058            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 08059                {
 08060                    b.Property<long>("Id")
 08061                        .ValueGeneratedOnAdd()
 08062                        .HasColumnType("bigint");
 08063
 08064                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08065
 08066                    b.Property<string>("Caption")
 08067                        .HasMaxLength(255)
 08068                        .HasColumnType("varchar(255)");
 08069
 08070                    b.Property<string>("Code")
 08071                        .HasMaxLength(255)
 08072                        .HasColumnType("varchar(255)");
 08073
 08074                    b.Property<string>("CostPrice")
 08075                        .HasMaxLength(80)
 08076                        .HasColumnType("varchar(80)");
 08077
 08078                    b.Property<string>("CostPriceFormatted")
 08079                        .HasMaxLength(80)
 08080                        .HasColumnType("varchar(80)");
 08081
 08082                    b.Property<string>("CurrencyCode")
 08083                        .HasMaxLength(32)
 08084                        .HasColumnType("varchar(32)");
 08085
 08086                    b.Property<string>("DeliveryDays")
 08087                        .HasMaxLength(80)
 08088                        .HasColumnType("varchar(80)");
 08089
 08090                    b.Property<int>("DeliveryDaysMax")
 08091                        .HasColumnType("int");
 08092
 08093                    b.Property<int>("DeliveryDaysMin")
 08094                        .HasColumnType("int");
 08095
 08096                    b.Property<string>("Description")
 08097                        .HasColumnType("longtext");
 08098
 08099                    b.Property<string>("Direction")
 08100                        .HasMaxLength(255)
 08101                        .HasColumnType("varchar(255)");
 08102
 08103                    b.Property<int>("ExtraDeliveryHours")
 08104                        .HasColumnType("int");
 08105
 08106                    b.Property<string>("ItemHash")
 08107                        .HasMaxLength(255)
 08108                        .HasColumnType("varchar(255)");
 08109
 08110                    b.Property<string>("ItemId")
 08111                        .HasMaxLength(255)
 08112                        .HasColumnType("varchar(255)");
 08113
 08114                    b.Property<int>("MinQuantity")
 08115                        .HasColumnType("int");
 08116
 08117                    b.Property<string>("Price")
 08118                        .HasMaxLength(80)
 08119                        .HasColumnType("varchar(80)");
 08120
 08121                    b.Property<string>("PriceDescription")
 08122                        .HasColumnType("longtext");
 08123
 08124                    b.Property<string>("Producer")
 08125                        .HasMaxLength(255)
 08126                        .HasColumnType("varchar(255)");
 08127
 08128                    b.Property<string>("ProviderDataJson")
 08129                        .HasColumnType("longtext");
 08130
 08131                    b.Property<long>("RequestId")
 08132                        .HasColumnType("bigint");
 08133
 08134                    b.Property<string>("Rest")
 08135                        .HasMaxLength(80)
 08136                        .HasColumnType("varchar(80)");
 08137
 08138                    b.Property<string>("SiteUrl")
 08139                        .HasMaxLength(1000)
 08140                        .HasColumnType("varchar(1000)");
 08141
 08142                    b.Property<string>("SourceCurrencyCode")
 08143                        .HasMaxLength(32)
 08144                        .HasColumnType("varchar(32)");
 08145
 08146                    b.Property<decimal?>("SourcePrice")
 08147                        .HasColumnType("decimal(18,4)");
 08148
 08149                    b.Property<string>("Title")
 08150                        .HasMaxLength(255)
 08151                        .HasColumnType("varchar(255)");
 08152
 08153                    b.HasKey("Id");
 08154
 08155                    b.HasIndex("RequestId");
 08156
 08157                    b.ToTable("SupplierQuotationOffers");
 08158                });
 8159
 08160            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 08161                {
 08162                    b.Property<long>("Id")
 08163                        .ValueGeneratedOnAdd()
 08164                        .HasColumnType("bigint");
 08165
 08166                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08167
 08168                    b.Property<string>("Article")
 08169                        .IsRequired()
 08170                        .HasMaxLength(255)
 08171                        .HasColumnType("varchar(255)");
 08172
 08173                    b.Property<string>("Brand")
 08174                        .HasMaxLength(255)
 08175                        .HasColumnType("varchar(255)");
 08176
 08177                    b.Property<DateTime>("CompletedAtUtc")
 08178                        .HasColumnType("datetime(6)");
 08179
 08180                    b.Property<long>("DurationMs")
 08181                        .HasColumnType("bigint");
 08182
 08183                    b.Property<string>("ErrorMessage")
 08184                        .HasMaxLength(2000)
 08185                        .HasColumnType("varchar(2000)");
 08186
 08187                    b.Property<int>("OffersCount")
 08188                        .HasColumnType("int");
 08189
 08190                    b.Property<int>("OrderId")
 08191                        .HasColumnType("int");
 08192
 08193                    b.Property<int>("ProductId")
 08194                        .HasColumnType("int");
 08195
 08196                    b.Property<string>("ProviderKey")
 08197                        .IsRequired()
 08198                        .HasMaxLength(64)
 08199                        .HasColumnType("varchar(64)");
 08200
 08201                    b.Property<string>("RequestParametersJson")
 08202                        .HasColumnType("longtext");
 08203
 08204                    b.Property<DateTime>("RequestedAtUtc")
 08205                        .HasColumnType("datetime(6)");
 08206
 08207                    b.Property<string>("Status")
 08208                        .IsRequired()
 08209                        .HasMaxLength(16)
 08210                        .HasColumnType("varchar(16)");
 08211
 08212                    b.Property<int?>("SupplierId")
 08213                        .HasColumnType("int");
 08214
 08215                    b.HasKey("Id");
 08216
 08217                    b.HasIndex("SupplierId");
 08218
 08219                    b.HasIndex("OrderId", "RequestedAtUtc")
 08220                        .HasDatabaseName("IX_SupplierQuotationRequests_Order_RequestedAtUtc");
 08221
 08222                    b.HasIndex("ProductId", "RequestedAtUtc")
 08223                        .HasDatabaseName("IX_SupplierQuotationRequests_Product_RequestedAtUtc");
 08224
 08225                    b.ToTable("SupplierQuotationRequests");
 08226                });
 8227
 08228            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 08229                {
 08230                    b.Property<long>("Id")
 08231                        .ValueGeneratedOnAdd()
 08232                        .HasColumnType("bigint");
 08233
 08234                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08235
 08236                    b.Property<int?>("ActiveOrderId")
 08237                        .HasColumnType("int");
 08238
 08239                    b.Property<long?>("CartItemId")
 08240                        .HasColumnType("bigint");
 08241
 08242                    b.Property<DateTime>("CreatedAt")
 08243                        .HasColumnType("datetime(6)");
 08244
 08245                    b.Property<string>("CreatedBy")
 08246                        .HasMaxLength(450)
 08247                        .HasColumnType("varchar(450)");
 08248
 08249                    b.Property<int?>("DeliveryDaysMax")
 08250                        .HasColumnType("int");
 08251
 08252                    b.Property<int?>("DeliveryDaysMin")
 08253                        .HasColumnType("int");
 08254
 08255                    b.Property<string>("Direction")
 08256                        .HasMaxLength(255)
 08257                        .HasColumnType("varchar(255)");
 08258
 08259                    b.Property<DateTime?>("ExpectedDeliveryAt")
 08260                        .HasColumnType("datetime(6)");
 08261
 08262                    b.Property<string>("ExternalBasketItemId")
 08263                        .HasMaxLength(50)
 08264                        .HasColumnType("varchar(50)");
 08265
 08266                    b.Property<string>("ExternalLineId")
 08267                        .HasMaxLength(50)
 08268                        .HasColumnType("varchar(50)");
 08269
 08270                    b.Property<string>("ExternalOrderId")
 08271                        .HasMaxLength(50)
 08272                        .HasColumnType("varchar(50)");
 08273
 08274                    b.Property<string>("ExternalOrderNumber")
 08275                        .HasMaxLength(50)
 08276                        .HasColumnType("varchar(50)");
 08277
 08278                    b.Property<DateTime?>("LastStatusChangeAt")
 08279                        .HasColumnType("datetime(6)");
 08280
 08281                    b.Property<DateTime?>("LastSyncedAt")
 08282                        .HasColumnType("datetime(6)");
 08283
 08284                    b.Property<int>("OrderId")
 08285                        .HasColumnType("int");
 08286
 08287                    b.Property<DateTime?>("OrderedAt")
 08288                        .HasColumnType("datetime(6)");
 08289
 08290                    b.Property<string>("ProviderKey")
 08291                        .IsRequired()
 08292                        .HasMaxLength(64)
 08293                        .HasColumnType("varchar(64)");
 08294
 08295                    b.Property<decimal?>("QuantityConfirmed")
 08296                        .HasPrecision(18, 3)
 08297                        .HasColumnType("decimal(18,3)");
 08298
 08299                    b.Property<decimal?>("QuantityOrdered")
 08300                        .HasPrecision(18, 3)
 08301                        .HasColumnType("decimal(18,3)");
 08302
 08303                    b.Property<decimal?>("QuantityRejected")
 08304                        .HasPrecision(18, 3)
 08305                        .HasColumnType("decimal(18,3)");
 08306
 08307                    b.Property<decimal?>("QuantityShipped")
 08308                        .HasPrecision(18, 3)
 08309                        .HasColumnType("decimal(18,3)");
 08310
 08311                    b.Property<string>("Stage")
 08312                        .IsRequired()
 08313                        .HasMaxLength(20)
 08314                        .HasColumnType("varchar(20)");
 08315
 08316                    b.Property<int?>("SupplierId")
 08317                        .HasColumnType("int");
 08318
 08319                    b.Property<int?>("SupplierStatusId")
 08320                        .HasColumnType("int");
 08321
 08322                    b.Property<string>("SyncError")
 08323                        .HasMaxLength(1000)
 08324                        .HasColumnType("varchar(1000)");
 08325
 08326                    b.Property<DateTime>("UpdatedAt")
 08327                        .HasColumnType("datetime(6)");
 08328
 08329                    b.HasKey("Id");
 08330
 08331                    b.HasIndex("ExternalOrderNumber");
 08332
 08333                    b.HasIndex("OrderId");
 08334
 08335                    b.HasIndex("SupplierStatusId");
 08336
 08337                    b.HasIndex("ProviderKey", "ActiveOrderId")
 08338                        .IsUnique()
 08339                        .HasDatabaseName("UX_OrderSupplierStates_Provider_ActiveOrderId");
 08340
 08341                    b.HasIndex("ProviderKey", "Stage", "LastSyncedAt")
 08342                        .HasDatabaseName("IX_OrderSupplierStates_Provider_Stage_LastSyncedAt");
 08343
 08344                    b.ToTable("OrderSupplierStates");
 08345                });
 8346
 08347            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 08348                {
 08349                    b.Property<long>("Id")
 08350                        .ValueGeneratedOnAdd()
 08351                        .HasColumnType("bigint");
 08352
 08353                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08354
 08355                    b.Property<string>("Comment")
 08356                        .HasMaxLength(500)
 08357                        .HasColumnType("varchar(500)");
 08358
 08359                    b.Property<string>("FromStage")
 08360                        .HasMaxLength(20)
 08361                        .HasColumnType("varchar(20)");
 08362
 08363                    b.Property<int?>("FromSupplierStatusId")
 08364                        .HasColumnType("int");
 08365
 08366                    b.Property<int?>("OrderHistoryId")
 08367                        .HasColumnType("int");
 08368
 08369                    b.Property<int>("OrderId")
 08370                        .HasColumnType("int");
 08371
 08372                    b.Property<long>("OrderSupplierStateId")
 08373                        .HasColumnType("bigint");
 08374
 08375                    b.Property<DateTime>("PerformedAt")
 08376                        .HasColumnType("datetime(6)");
 08377
 08378                    b.Property<string>("PerformedBy")
 08379                        .HasMaxLength(450)
 08380                        .HasColumnType("varchar(450)");
 08381
 08382                    b.Property<string>("Source")
 08383                        .IsRequired()
 08384                        .HasMaxLength(30)
 08385                        .HasColumnType("varchar(30)");
 08386
 08387                    b.Property<string>("ToStage")
 08388                        .IsRequired()
 08389                        .HasMaxLength(20)
 08390                        .HasColumnType("varchar(20)");
 08391
 08392                    b.Property<int?>("ToSupplierStatusId")
 08393                        .HasColumnType("int");
 08394
 08395                    b.HasKey("Id");
 08396
 08397                    b.HasIndex("OrderHistoryId");
 08398
 08399                    b.HasIndex("OrderSupplierStateId")
 08400                        .HasDatabaseName("IX_OrderSupplierStateHistory_StateId");
 08401
 08402                    b.HasIndex("OrderId", "PerformedAt");
 08403
 08404                    b.ToTable("OrderSupplierStateHistory");
 08405                });
 8406
 08407            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 08408                {
 08409                    b.Property<int>("Id")
 08410                        .ValueGeneratedOnAdd()
 08411                        .HasColumnType("int");
 08412
 08413                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08414
 08415                    b.Property<DateTime>("CreatedAt")
 08416                        .HasColumnType("datetime(6)");
 08417
 08418                    b.Property<string>("ExternalCode")
 08419                        .HasMaxLength(64)
 08420                        .HasColumnType("varchar(64)");
 08421
 08422                    b.Property<bool>("IsFinal")
 08423                        .HasColumnType("tinyint(1)");
 08424
 08425                    b.Property<string>("Name")
 08426                        .IsRequired()
 08427                        .HasMaxLength(200)
 08428                        .HasColumnType("varchar(200)");
 08429
 08430                    b.Property<string>("ProviderKey")
 08431                        .IsRequired()
 08432                        .HasMaxLength(64)
 08433                        .HasColumnType("varchar(64)");
 08434
 08435                    b.Property<int?>("SortOrder")
 08436                        .HasColumnType("int");
 08437
 08438                    b.Property<int?>("StatusColorId")
 08439                        .HasColumnType("int");
 08440
 08441                    b.Property<string>("StatusKind")
 08442                        .IsRequired()
 08443                        .HasMaxLength(10)
 08444                        .HasColumnType("varchar(10)");
 08445
 08446                    b.Property<int?>("SupplierId")
 08447                        .HasColumnType("int");
 08448
 08449                    b.HasKey("Id");
 08450
 08451                    b.HasIndex("StatusColorId");
 08452
 08453                    b.HasIndex("SupplierId");
 08454
 08455                    b.HasIndex("ProviderKey", "StatusKind", "ExternalCode")
 08456                        .HasDatabaseName("IX_SupplierStatuses_Provider_Kind_ExternalCode");
 08457
 08458                    b.HasIndex("ProviderKey", "StatusKind", "Name")
 08459                        .IsUnique()
 08460                        .HasDatabaseName("UX_SupplierStatuses_Provider_Kind_Name");
 08461
 08462                    b.ToTable("SupplierStatuses");
 08463                });
 8464
 08465            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 08466                {
 08467                    b.Property<int>("Id")
 08468                        .ValueGeneratedOnAdd()
 08469                        .HasColumnType("int");
 08470
 08471                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08472
 08473                    b.Property<string>("Comment")
 08474                        .HasColumnType("longtext");
 08475
 08476                    b.Property<string>("CreateBy")
 08477                        .HasMaxLength(50)
 08478                        .HasColumnType("varchar(50)");
 08479
 08480                    b.Property<DateTime?>("CreatedDateTime")
 08481                        .HasColumnType("datetime(6)");
 08482
 08483                    b.Property<int?>("Type")
 08484                        .HasColumnType("int");
 08485
 08486                    b.HasKey("Id");
 08487
 08488                    b.ToTable("Transactions");
 08489                });
 8490
 08491            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 08492                {
 08493                    b.Property<long>("Id")
 08494                        .ValueGeneratedOnAdd()
 08495                        .HasColumnType("bigint");
 08496
 08497                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08498
 08499                    b.Property<int?>("AccessProfileId")
 08500                        .HasColumnType("int");
 08501
 08502                    b.Property<string>("Comment")
 08503                        .HasMaxLength(1000)
 08504                        .HasColumnType("varchar(1000)");
 08505
 08506                    b.Property<DateTime>("CompletedAtUtc")
 08507                        .HasColumnType("datetime(6)");
 08508
 08509                    b.Property<DateTime>("CreatedAtUtc")
 08510                        .HasColumnType("datetime(6)");
 08511
 08512                    b.Property<int>("DurationSeconds")
 08513                        .HasColumnType("int");
 08514
 08515                    b.Property<int>("OrdersCountFinal")
 08516                        .HasColumnType("int");
 08517
 08518                    b.Property<DateTime>("StartedAtUtc")
 08519                        .HasColumnType("datetime(6)");
 08520
 08521                    b.Property<string>("TrackingKey")
 08522                        .IsRequired()
 08523                        .HasMaxLength(64)
 08524                        .HasColumnType("varchar(64)");
 08525
 08526                    b.Property<long?>("TrackingSessionId")
 08527                        .HasColumnType("bigint");
 08528
 08529                    b.Property<long>("TransactionId")
 08530                        .HasColumnType("bigint");
 08531
 08532                    b.Property<string>("TransactionType")
 08533                        .IsRequired()
 08534                        .HasMaxLength(64)
 08535                        .HasColumnType("varchar(64)");
 08536
 08537                    b.Property<string>("TransactionUrl")
 08538                        .IsRequired()
 08539                        .HasMaxLength(1000)
 08540                        .HasColumnType("varchar(1000)");
 08541
 08542                    b.Property<string>("UserName")
 08543                        .IsRequired()
 08544                        .HasMaxLength(256)
 08545                        .HasColumnType("varchar(256)");
 08546
 08547                    b.HasKey("Id");
 08548
 08549                    b.HasIndex("AccessProfileId")
 08550                        .HasDatabaseName("IX_TransactionTimeTrackingResults_AccessProfileId");
 08551
 08552                    b.HasIndex("TrackingKey")
 08553                        .IsUnique()
 08554                        .HasDatabaseName("UX_TransactionTimeTrackingResults_TrackingKey");
 08555
 08556                    b.HasIndex("TrackingSessionId")
 08557                        .HasDatabaseName("FK_TransactionTimeTrackingResults_SessionId");
 08558
 08559                    b.HasIndex("TransactionId");
 08560
 08561                    b.HasIndex("TransactionType", "CompletedAtUtc");
 08562
 08563                    b.HasIndex("UserName", "CompletedAtUtc");
 08564
 08565                    b.ToTable("TransactionTimeTrackingResults");
 08566                });
 8567
 08568            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingSession", b =>
 08569                {
 08570                    b.Property<long>("Id")
 08571                        .ValueGeneratedOnAdd()
 08572                        .HasColumnType("bigint");
 08573
 08574                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08575
 08576                    b.Property<int?>("AccessProfileId")
 08577                        .HasColumnType("int");
 08578
 08579                    b.Property<string>("ClientIp")
 08580                        .HasMaxLength(64)
 08581                        .HasColumnType("varchar(64)");
 08582
 08583                    b.Property<DateTime?>("CompletedAtUtc")
 08584                        .HasColumnType("datetime(6)");
 08585
 08586                    b.Property<DateTime>("CreatedAtUtc")
 08587                        .HasColumnType("datetime(6)");
 08588
 08589                    b.Property<bool>("IsAbandoned")
 08590                        .HasColumnType("tinyint(1)");
 08591
 08592                    b.Property<bool>("IsCompleted")
 08593                        .HasColumnType("tinyint(1)");
 08594
 08595                    b.Property<DateTime?>("LastSeenAtUtc")
 08596                        .HasColumnType("datetime(6)");
 08597
 08598                    b.Property<string>("OrderIdsJson")
 08599                        .HasColumnType("longtext");
 08600
 08601                    b.Property<int>("OrdersCountInitial")
 08602                        .HasColumnType("int");
 08603
 08604                    b.Property<string>("SourceUrl")
 08605                        .HasMaxLength(1000)
 08606                        .HasColumnType("varchar(1000)");
 08607
 08608                    b.Property<DateTime>("StartedAtUtc")
 08609                        .HasColumnType("datetime(6)");
 08610
 08611                    b.Property<string>("TrackingKey")
 08612                        .IsRequired()
 08613                        .HasMaxLength(64)
 08614                        .HasColumnType("varchar(64)");
 08615
 08616                    b.Property<string>("TransactionType")
 08617                        .IsRequired()
 08618                        .HasMaxLength(64)
 08619                        .HasColumnType("varchar(64)");
 08620
 08621                    b.Property<string>("UserAgent")
 08622                        .HasMaxLength(512)
 08623                        .HasColumnType("varchar(512)");
 08624
 08625                    b.Property<string>("UserName")
 08626                        .IsRequired()
 08627                        .HasMaxLength(256)
 08628                        .HasColumnType("varchar(256)");
 08629
 08630                    b.HasKey("Id");
 08631
 08632                    b.HasIndex("AccessProfileId")
 08633                        .HasDatabaseName("IX_TransactionTimeTrackingSessions_AccessProfileId");
 08634
 08635                    b.HasIndex("TrackingKey")
 08636                        .IsUnique()
 08637                        .HasDatabaseName("UX_TransactionTimeTrackingSessions_TrackingKey");
 08638
 08639                    b.HasIndex("TransactionType", "StartedAtUtc");
 08640
 08641                    b.HasIndex("UserName", "StartedAtUtc");
 08642
 08643                    b.HasIndex("IsCompleted", "IsAbandoned", "StartedAtUtc")
 08644                        .HasDatabaseName("IX_TransactionTimeTrackingSessionsAbandoned_StartedAtUtc");
 08645
 08646                    b.ToTable("TransactionTimeTrackingSessions");
 08647                });
 8648
 08649            modelBuilder.Entity("OzonDomains.Models.TransactionTypeSetting", b =>
 08650                {
 08651                    b.Property<int>("TransactionType")
 08652                        .HasColumnType("int");
 08653
 08654                    b.Property<string>("Color")
 08655                        .HasMaxLength(16)
 08656                        .HasColumnType("varchar(16)");
 08657
 08658                    b.Property<string>("DefaultsJson")
 08659                        .HasColumnType("text");
 08660
 08661                    b.Property<int?>("DisplayOrder")
 08662                        .HasColumnType("int");
 08663
 08664                    b.Property<string>("Group")
 08665                        .HasMaxLength(60)
 08666                        .HasColumnType("varchar(60)");
 08667
 08668                    b.Property<string>("Hint")
 08669                        .HasMaxLength(1000)
 08670                        .HasColumnType("varchar(1000)");
 08671
 08672                    b.Property<string>("Icon")
 08673                        .HasMaxLength(80)
 08674                        .HasColumnType("varchar(80)");
 08675
 08676                    b.Property<bool>("IsEnabled")
 08677                        .HasColumnType("tinyint(1)");
 08678
 08679                    b.Property<string>("ShortName")
 08680                        .HasMaxLength(40)
 08681                        .HasColumnType("varchar(40)");
 08682
 08683                    b.Property<string>("Title")
 08684                        .HasMaxLength(100)
 08685                        .HasColumnType("varchar(100)");
 08686
 08687                    b.Property<DateTime>("UpdatedAt")
 08688                        .HasColumnType("datetime(6)");
 08689
 08690                    b.Property<string>("UpdatedBy")
 08691                        .HasMaxLength(255)
 08692                        .HasColumnType("varchar(255)");
 08693
 08694                    b.Property<bool>("UseGrid")
 08695                        .HasColumnType("tinyint(1)");
 08696
 08697                    b.HasKey("TransactionType");
 08698
 08699                    b.ToTable("TransactionTypeSettings");
 08700                });
 8701
 08702            modelBuilder.Entity("OzonDomains.Models.UserSidebarSetting", b =>
 08703                {
 08704                    b.Property<int>("Id")
 08705                        .ValueGeneratedOnAdd()
 08706                        .HasColumnType("int");
 08707
 08708                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08709
 08710                    b.Property<string>("Key")
 08711                        .IsRequired()
 08712                        .HasMaxLength(64)
 08713                        .HasColumnType("varchar(64)");
 08714
 08715                    b.Property<DateTime>("UpdatedAt")
 08716                        .HasColumnType("datetime(6)");
 08717
 08718                    b.Property<string>("UserId")
 08719                        .IsRequired()
 08720                        .HasMaxLength(255)
 08721                        .HasColumnType("varchar(255)");
 08722
 08723                    b.Property<string>("Value")
 08724                        .IsRequired()
 08725                        .HasColumnType("longtext");
 08726
 08727                    b.Property<long>("Version")
 08728                        .HasColumnType("bigint");
 08729
 08730                    b.HasKey("Id");
 08731
 08732                    b.HasIndex("UserId", "Key")
 08733                        .IsUnique();
 08734
 08735                    b.ToTable("UserSidebarSettings");
 08736                });
 8737
 08738            modelBuilder.Entity("OzonDomains.Models.Warehouse", b =>
 08739                {
 08740                    b.Property<int>("Id")
 08741                        .ValueGeneratedOnAdd()
 08742                        .HasColumnType("int");
 08743
 08744                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08745
 08746                    b.Property<string>("Name")
 08747                        .HasMaxLength(50)
 08748                        .HasColumnType("varchar(50)");
 08749
 08750                    b.HasKey("Id");
 08751
 08752                    b.ToTable("Warehouses");
 08753                });
 8754
 08755            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 08756                {
 08757                    b.Property<int>("Id")
 08758                        .ValueGeneratedOnAdd()
 08759                        .HasColumnType("int");
 08760
 08761                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 08762
 08763                    b.Property<string>("BitrixWarehouseName")
 08764                        .IsRequired()
 08765                        .HasColumnType("varchar(200)");
 08766
 08767                    b.Property<string>("DeliveryType")
 08768                        .HasColumnType("varchar(100)");
 08769
 08770                    b.Property<int?>("OzonClientId")
 08771                        .HasColumnType("int");
 08772
 08773                    b.Property<string>("OzonWarehouseId")
 08774                        .HasColumnType("varchar(32)");
 08775
 08776                    b.Property<string>("OzonWarehouseName")
 08777                        .IsRequired()
 08778                        .HasColumnType("varchar(200)");
 08779
 08780                    b.Property<int>("Priority")
 08781                        .HasColumnType("int");
 08782
 08783                    b.Property<string>("ReturnBitrixWarehouseName")
 08784                        .HasColumnType("varchar(255)");
 08785
 08786                    b.Property<int?>("SupplierId")
 08787                        .HasColumnType("int");
 08788
 08789                    b.Property<string>("TransitBitrixWarehouseName")
 08790                        .HasColumnType("varchar(255)");
 08791
 08792                    b.HasKey("Id");
 08793
 08794                    b.HasIndex("OzonClientId")
 08795                        .HasDatabaseName("FK_WarehouseMapping_OzonClient");
 08796
 08797                    b.HasIndex("SupplierId");
 08798
 08799                    b.ToTable("WarehouseMapping");
 08800                });
 8801
 08802            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 08803                {
 08804                    b.Property<long>("Id")
 08805                        .ValueGeneratedOnAdd()
 08806                        .HasColumnType("bigint");
 08807
 08808                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08809
 08810                    b.Property<decimal?>("AccountingPriceUnit")
 08811                        .HasColumnType("decimal(18,4)");
 08812
 08813                    b.Property<string>("Article")
 08814                        .HasMaxLength(128)
 08815                        .HasColumnType("varchar(128)");
 08816
 08817                    b.Property<decimal?>("B1Qty")
 08818                        .HasColumnType("decimal(18,4)");
 08819
 08820                    b.Property<decimal?>("B2Qty")
 08821                        .HasColumnType("decimal(18,4)");
 08822
 08823                    b.Property<decimal?>("C0")
 08824                        .HasColumnType("decimal(18,4)");
 08825
 08826                    b.Property<decimal?>("C1ExistMinus5Percent")
 08827                        .HasColumnType("decimal(18,4)");
 08828
 08829                    b.Property<decimal?>("C1PercentToC0")
 08830                        .HasColumnType("decimal(18,4)");
 08831
 08832                    b.Property<decimal?>("ExistPrice")
 08833                        .HasColumnType("decimal(18,4)");
 08834
 08835                    b.Property<decimal?>("M1Qty")
 08836                        .HasColumnType("decimal(18,4)");
 08837
 08838                    b.Property<decimal?>("M2Qty")
 08839                        .HasColumnType("decimal(18,4)");
 08840
 08841                    b.Property<decimal?>("M3Qty")
 08842                        .HasColumnType("decimal(18,4)");
 08843
 08844                    b.Property<string>("Manufacturer")
 08845                        .HasMaxLength(255)
 08846                        .HasColumnType("varchar(255)");
 08847
 08848                    b.Property<decimal?>("PriceDiffAccountingMinusSale")
 08849                        .HasColumnType("decimal(18,4)");
 08850
 08851                    b.Property<string>("ProductName")
 08852                        .HasMaxLength(512)
 08853                        .HasColumnType("varchar(512)");
 08854
 08855                    b.Property<string>("RowKey")
 08856                        .IsRequired()
 08857                        .HasMaxLength(128)
 08858                        .HasColumnType("varchar(128)");
 08859
 08860                    b.Property<string>("SaleFlag")
 08861                        .HasMaxLength(128)
 08862                        .HasColumnType("varchar(128)");
 08863
 08864                    b.Property<decimal?>("SalePriceUnit")
 08865                        .HasColumnType("decimal(18,4)");
 08866
 08867                    b.Property<int>("SourceRowNumber")
 08868                        .HasColumnType("int");
 08869
 08870                    b.Property<string>("SourceSheetName")
 08871                        .IsRequired()
 08872                        .HasMaxLength(128)
 08873                        .HasColumnType("varchar(128)");
 08874
 08875                    b.Property<string>("SourceType")
 08876                        .IsRequired()
 08877                        .HasMaxLength(32)
 08878                        .HasColumnType("varchar(32)");
 08879
 08880                    b.Property<DateTime>("SourceUpdatedAtUtc")
 08881                        .HasColumnType("datetime(6)");
 08882
 08883                    b.Property<decimal?>("StockAmountByC0")
 08884                        .HasColumnType("decimal(18,4)");
 08885
 08886                    b.Property<long>("SyncRunId")
 08887                        .HasColumnType("bigint");
 08888
 08889                    b.Property<DateTime>("SyncedAtUtc")
 08890                        .HasColumnType("datetime(6)");
 08891
 08892                    b.Property<decimal?>("TotalCost")
 08893                        .HasColumnType("decimal(18,4)");
 08894
 08895                    b.Property<decimal?>("UnitCost")
 08896                        .HasColumnType("decimal(18,4)");
 08897
 08898                    b.Property<string>("Warehouse")
 08899                        .HasMaxLength(32)
 08900                        .HasColumnType("varchar(32)");
 08901
 08902                    b.HasKey("Id");
 08903
 08904                    b.HasIndex("Article");
 08905
 08906                    b.HasIndex("Manufacturer");
 08907
 08908                    b.HasIndex("RowKey")
 08909                        .IsUnique()
 08910                        .HasDatabaseName("UX_WarehouseStockSnapshot_RowKey");
 08911
 08912                    b.HasIndex("SyncRunId")
 08913                        .HasDatabaseName("FK_WarehouseStockSnapshot_SyncRun");
 08914
 08915                    b.HasIndex("SyncedAtUtc");
 08916
 08917                    b.HasIndex("Warehouse");
 08918
 08919                    b.ToTable("WarehouseStockSnapshot");
 08920                });
 8921
 08922            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 08923                {
 08924                    b.Property<long>("Id")
 08925                        .ValueGeneratedOnAdd()
 08926                        .HasColumnType("bigint");
 08927
 08928                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08929
 08930                    b.Property<DateTime?>("CompletedAtUtc")
 08931                        .HasColumnType("datetime(6)");
 08932
 08933                    b.Property<DateTime>("CreatedAtUtc")
 08934                        .HasColumnType("datetime(6)");
 08935
 08936                    b.Property<string>("ErrorMessage")
 08937                        .HasColumnType("text");
 08938
 08939                    b.Property<int>("RowsRead")
 08940                        .HasColumnType("int");
 08941
 08942                    b.Property<int>("RowsSaved")
 08943                        .HasColumnType("int");
 08944
 08945                    b.Property<string>("SourceFileName")
 08946                        .HasMaxLength(255)
 08947                        .HasColumnType("varchar(255)");
 08948
 08949                    b.Property<string>("SourceType")
 08950                        .IsRequired()
 08951                        .HasMaxLength(32)
 08952                        .HasColumnType("varchar(32)");
 08953
 08954                    b.Property<DateTime>("StartedAtUtc")
 08955                        .HasColumnType("datetime(6)");
 08956
 08957                    b.Property<string>("Status")
 08958                        .IsRequired()
 08959                        .HasMaxLength(32)
 08960                        .HasColumnType("varchar(32)");
 08961
 08962                    b.Property<string>("TriggeredBy")
 08963                        .HasMaxLength(255)
 08964                        .HasColumnType("varchar(255)");
 08965
 08966                    b.HasKey("Id");
 08967
 08968                    b.HasIndex("StartedAtUtc");
 08969
 08970                    b.HasIndex("Status");
 08971
 08972                    b.ToTable("WarehouseStockSyncRuns");
 08973                });
 8974
 08975            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 08976                {
 08977                    b.Property<long>("Id")
 08978                        .ValueGeneratedOnAdd()
 08979                        .HasColumnType("bigint");
 08980
 08981                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
 08982
 08983                    b.Property<int?>("ActiveStudioOrderId")
 08984                        .HasColumnType("int");
 08985
 08986                    b.Property<string>("Article")
 08987                        .IsRequired()
 08988                        .HasMaxLength(80)
 08989                        .HasColumnType("varchar(80)");
 08990
 08991                    b.Property<string>("Brand")
 08992                        .IsRequired()
 08993                        .HasMaxLength(120)
 08994                        .HasColumnType("varchar(120)");
 08995
 08996                    b.Property<string>("CodeDocB")
 08997                        .IsRequired()
 08998                        .HasMaxLength(40)
 08999                        .HasColumnType("varchar(40)");
 09000
 09001                    b.Property<long>("CodeOrder")
 09002                        .HasColumnType("bigint");
 09003
 09004                    b.Property<int>("CodeRegion")
 09005                        .HasColumnType("int");
 09006
 09007                    b.Property<DateTime>("CreatedAtUtc")
 09008                        .HasColumnType("datetime(6)");
 09009
 09010                    b.Property<string>("CreatedBy")
 09011                        .HasMaxLength(450)
 09012                        .HasColumnType("varchar(450)");
 09013
 09014                    b.Property<int>("DeliveryDays")
 09015                        .HasColumnType("int");
 09016
 09017                    b.Property<int?>("ExternalStatusCode")
 09018                        .HasColumnType("int");
 09019
 09020                    b.Property<string>("ExternalStatusName")
 09021                        .HasMaxLength(120)
 09022                        .HasColumnType("varchar(120)");
 09023
 09024                    b.Property<string>("LastError")
 09025                        .HasMaxLength(1000)
 09026                        .HasColumnType("varchar(1000)");
 09027
 09028                    b.Property<decimal?>("MinSumOrder")
 09029                        .HasPrecision(18, 4)
 09030                        .HasColumnType("decimal(18,4)");
 09031
 09032                    b.Property<int>("MinimumQuantity")
 09033                        .HasColumnType("int");
 09034
 09035                    b.Property<DateTime?>("OrderedAtUtc")
 09036                        .HasColumnType("datetime(6)");
 09037
 09038                    b.Property<string>("ProductName")
 09039                        .HasMaxLength(255)
 09040                        .HasColumnType("varchar(255)");
 09041
 09042                    b.Property<string>("ProviderKey")
 09043                        .IsRequired()
 09044                        .HasMaxLength(64)
 09045                        .HasColumnType("varchar(64)");
 09046
 09047                    b.Property<int?>("QtyMax")
 09048                        .HasColumnType("int");
 09049
 09050                    b.Property<int>("Quantity")
 09051                        .HasColumnType("int");
 09052
 09053                    b.Property<string>("SellerLocation")
 09054                        .HasMaxLength(200)
 09055                        .HasColumnType("varchar(200)");
 09056
 09057                    b.Property<string>("SellerName")
 09058                        .HasMaxLength(200)
 09059                        .HasColumnType("varchar(200)");
 09060
 09061                    b.Property<string>("SellerUserKey")
 09062                        .HasMaxLength(255)
 09063                        .HasColumnType("varchar(255)");
 09064
 09065                    b.Property<decimal?>("SourcePrice")
 09066                        .HasPrecision(18, 4)
 09067                        .HasColumnType("decimal(18,4)");
 09068
 09069                    b.Property<string>("Status")
 09070                        .IsRequired()
 09071                        .HasMaxLength(20)
 09072                        .HasColumnType("varchar(20)");
 09073
 09074                    b.Property<int>("StudioOrderId")
 09075                        .HasColumnType("int");
 09076
 09077                    b.Property<DateTime?>("TestedAtUtc")
 09078                        .HasColumnType("datetime(6)");
 09079
 09080                    b.Property<DateTime>("UpdatedAtUtc")
 09081                        .HasColumnType("datetime(6)");
 09082
 09083                    b.HasKey("Id");
 09084
 09085                    b.HasIndex("ProviderKey", "ActiveStudioOrderId")
 09086                        .IsUnique();
 09087
 09088                    b.HasIndex("ProviderKey", "CodeOrder");
 09089
 09090                    b.HasIndex("StudioOrderId", "Status");
 09091
 09092                    b.ToTable("ZZapCartItems");
 09093                });
 9094
 09095            modelBuilder.Entity("OzonDomains.StatusColor", b =>
 09096                {
 09097                    b.Property<int>("Id")
 09098                        .ValueGeneratedOnAdd()
 09099                        .HasColumnType("int");
 09100
 09101                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09102
 09103                    b.Property<string>("ColorCode")
 09104                        .IsRequired()
 09105                        .HasMaxLength(20)
 09106                        .HasColumnType("varchar(20)");
 09107
 09108                    b.HasKey("Id");
 09109
 09110                    b.ToTable("StatusColors");
 09111                });
 9112
 09113            modelBuilder.Entity("OzonRepositories.Data.Bitrix.PriceHistory", b =>
 09114                {
 09115                    b.Property<int>("Id")
 09116                        .ValueGeneratedOnAdd()
 09117                        .HasColumnType("int");
 09118
 09119                    MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
 09120
 09121                    b.Property<string>("Article")
 09122                        .IsRequired()
 09123                        .HasColumnType("varchar(100)");
 09124
 09125                    b.Property<string>("Author")
 09126                        .HasColumnType("varchar(100)");
 09127
 09128                    b.Property<int>("BitrixId")
 09129                        .HasColumnType("int");
 09130
 09131                    b.Property<DateTime>("CreateDateTime")
 09132                        .HasColumnType("datetime");
 09133
 09134                    b.Property<string>("Currency")
 09135                        .HasColumnType("varchar(10)");
 09136
 09137                    b.Property<decimal>("PriceValue")
 09138                        .HasColumnType("decimal(18,2)");
 09139
 09140                    b.Property<decimal>("RegistrationPrice")
 09141                        .HasColumnType("decimal(18,2)");
 09142
 09143                    b.Property<string>("ValueSource")
 09144                        .HasColumnType("varchar(100)");
 09145
 09146                    b.HasKey("Id");
 09147
 09148                    b.HasIndex("Article")
 09149                        .HasDatabaseName("IX_PriceHistories_Article");
 09150
 09151                    b.HasIndex("BitrixId")
 09152                        .HasDatabaseName("IX_PriceHistories_BitrixId");
 09153
 09154                    b.HasIndex("CreateDateTime")
 09155                        .HasDatabaseName("IX_PriceHistories_CreateDateTime");
 09156
 09157                    b.HasIndex("Article", "CreateDateTime")
 09158                        .HasDatabaseName("IX_PriceHistories_Article_CreateDateTime");
 09159
 09160                    b.ToTable("PriceHistories");
 09161                });
 9162
 09163            modelBuilder.Entity("AccessProfileDataScopeSet", b =>
 09164                {
 09165                    b.HasOne("OzonDomains.Models.AccessControl.AccessProfile", null)
 09166                        .WithMany()
 09167                        .HasForeignKey("AccessProfilesId")
 09168                        .OnDelete(DeleteBehavior.Cascade)
 09169                        .IsRequired();
 09170
 09171                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", null)
 09172                        .WithMany()
 09173                        .HasForeignKey("DataScopeSetsId")
 09174                        .OnDelete(DeleteBehavior.Cascade)
 09175                        .IsRequired();
 09176                });
 9177
 09178            modelBuilder.Entity("OzonDomains.Delivery", b =>
 09179                {
 09180                    b.HasOne("OzonDomains.Models.DeliveryProvider", "Provider")
 09181                        .WithMany("Deliveries")
 09182                        .HasForeignKey("ProviderId")
 09183                        .OnDelete(DeleteBehavior.Cascade)
 09184                        .IsRequired()
 09185                        .HasConstraintName("Deliveries_ibfk_1");
 09186
 09187                    b.Navigation("Provider");
 09188                });
 9189
 09190            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSetItem", b =>
 09191                {
 09192                    b.HasOne("OzonDomains.Models.AccessControl.DataScopeSet", "DataScopeSet")
 09193                        .WithMany("Items")
 09194                        .HasForeignKey("DataScopeSetId")
 09195                        .OnDelete(DeleteBehavior.Cascade)
 09196                        .IsRequired()
 09197                        .HasConstraintName("FK_DataScopeSetItems_DataScopeSets");
 09198
 09199                    b.Navigation("DataScopeSet");
 09200                });
 9201
 09202            modelBuilder.Entity("OzonDomains.Models.ApiSupplierSettings", b =>
 09203                {
 09204                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 09205                        .WithMany()
 09206                        .HasForeignKey("SupplierId")
 09207                        .OnDelete(DeleteBehavior.SetNull);
 09208
 09209                    b.Navigation("Supplier");
 09210                });
 9211
 09212            modelBuilder.Entity("OzonDomains.Models.ApiSupplierWarehouse", b =>
 09213                {
 09214                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 09215                        .WithMany()
 09216                        .HasForeignKey("WarehouseId")
 09217                        .OnDelete(DeleteBehavior.Cascade)
 09218                        .IsRequired()
 09219                        .HasConstraintName("FK_ApiSupplierWarehouses_Warehouses");
 09220
 09221                    b.Navigation("Warehouse");
 09222                });
 9223
 09224            modelBuilder.Entity("OzonDomains.Models.AppStatus", b =>
 09225                {
 09226                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 09227                        .WithMany()
 09228                        .HasForeignKey("StatusColorId")
 09229                        .HasConstraintName("FK_AppStatuses_StatusColors");
 09230
 09231                    b.Navigation("StatusColor");
 09232                });
 9233
 09234            modelBuilder.Entity("OzonDomains.Models.ArmtekCartItem", b =>
 09235                {
 09236                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09237                        .WithMany()
 09238                        .HasForeignKey("StudioOrderId")
 09239                        .OnDelete(DeleteBehavior.Restrict)
 09240                        .IsRequired();
 09241
 09242                    b.Navigation("StudioOrder");
 09243                });
 9244
 09245            modelBuilder.Entity("OzonDomains.Models.ArmtekDeliveryAddressMapping", b =>
 09246                {
 09247                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09248                        .WithMany()
 09249                        .HasForeignKey("ShipmentWarehouseId")
 09250                        .OnDelete(DeleteBehavior.Restrict)
 09251                        .IsRequired();
 09252
 09253                    b.Navigation("ShipmentWarehouse");
 09254                });
 9255
 09256            modelBuilder.Entity("OzonDomains.Models.ArmtekOrderItem", b =>
 09257                {
 09258                    b.HasOne("OzonDomains.Models.ArmtekCartItem", "ArmtekCartItem")
 09259                        .WithMany()
 09260                        .HasForeignKey("ArmtekCartItemId")
 09261                        .OnDelete(DeleteBehavior.SetNull)
 09262                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekCartItems");
 09263
 09264                    b.HasOne("OzonDomains.Models.ArmtekOrder", "ArmtekOrder")
 09265                        .WithMany("Items")
 09266                        .HasForeignKey("ArmtekOrderId")
 09267                        .OnDelete(DeleteBehavior.Cascade)
 09268                        .IsRequired()
 09269                        .HasConstraintName("FK_ArmtekOrderItems_ArmtekOrders");
 09270
 09271                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09272                        .WithMany()
 09273                        .HasForeignKey("StudioOrderId")
 09274                        .OnDelete(DeleteBehavior.Restrict)
 09275                        .IsRequired();
 09276
 09277                    b.Navigation("ArmtekCartItem");
 09278
 09279                    b.Navigation("ArmtekOrder");
 09280
 09281                    b.Navigation("StudioOrder");
 09282                });
 9283
 09284            modelBuilder.Entity("OzonDomains.Models.AssemblyListRunItem", b =>
 09285                {
 09286                    b.HasOne("OzonDomains.Models.AssemblyListRun", "Run")
 09287                        .WithMany("Items")
 09288                        .HasForeignKey("RunId")
 09289                        .OnDelete(DeleteBehavior.Cascade)
 09290                        .IsRequired();
 09291
 09292                    b.Navigation("Run");
 09293                });
 9294
 09295            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 09296                {
 09297                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Page")
 09298                        .WithMany("Fields")
 09299                        .HasForeignKey("PageId")
 09300                        .OnDelete(DeleteBehavior.SetNull);
 09301
 09302                    b.Navigation("Page");
 09303                });
 9304
 09305            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 09306                {
 09307                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "Parent")
 09308                        .WithMany("Children")
 09309                        .HasForeignKey("ParentId")
 09310                        .OnDelete(DeleteBehavior.Restrict);
 09311
 09312                    b.Navigation("Parent");
 09313                });
 9314
 09315            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleDataScope", b =>
 09316                {
 09317                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09318                        .WithMany("DataScopes")
 09319                        .HasForeignKey("AppRoleId")
 09320                        .OnDelete(DeleteBehavior.Cascade)
 09321                        .IsRequired();
 09322
 09323                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09324                        .WithMany("RoleLinks")
 09325                        .HasForeignKey("DataScopeId")
 09326                        .OnDelete(DeleteBehavior.Cascade)
 09327                        .IsRequired();
 09328
 09329                    b.Navigation("AppRole");
 09330
 09331                    b.Navigation("DataScope");
 09332                });
 9333
 09334            modelBuilder.Entity("OzonDomains.Models.Authorization.RoleFieldPermission", b =>
 09335                {
 09336                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09337                        .WithMany("RolePermissions")
 09338                        .HasForeignKey("AppFieldId")
 09339                        .OnDelete(DeleteBehavior.Cascade)
 09340                        .IsRequired();
 09341
 09342                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09343                        .WithMany("FieldPermissions")
 09344                        .HasForeignKey("AppRoleId")
 09345                        .OnDelete(DeleteBehavior.Cascade)
 09346                        .IsRequired();
 09347
 09348                    b.Navigation("AppField");
 09349
 09350                    b.Navigation("AppRole");
 09351                });
 9352
 09353            modelBuilder.Entity("OzonDomains.Models.Authorization.RolePagePermission", b =>
 09354                {
 09355                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09356                        .WithMany("RolePermissions")
 09357                        .HasForeignKey("AppPageId")
 09358                        .OnDelete(DeleteBehavior.Cascade)
 09359                        .IsRequired();
 09360
 09361                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09362                        .WithMany("PagePermissions")
 09363                        .HasForeignKey("AppRoleId")
 09364                        .OnDelete(DeleteBehavior.Cascade)
 09365                        .IsRequired();
 09366
 09367                    b.Navigation("AppPage");
 09368
 09369                    b.Navigation("AppRole");
 09370                });
 9371
 09372            modelBuilder.Entity("OzonDomains.Models.Authorization.UserAppRole", b =>
 09373                {
 09374                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "AppRole")
 09375                        .WithMany("UserLinks")
 09376                        .HasForeignKey("AppRoleId")
 09377                        .OnDelete(DeleteBehavior.Cascade)
 09378                        .IsRequired();
 09379
 09380                    b.Navigation("AppRole");
 09381                });
 9382
 09383            modelBuilder.Entity("OzonDomains.Models.Authorization.UserDataScope", b =>
 09384                {
 09385                    b.HasOne("OzonDomains.Models.Authorization.DataScope", "DataScope")
 09386                        .WithMany("UserLinks")
 09387                        .HasForeignKey("DataScopeId")
 09388                        .OnDelete(DeleteBehavior.Cascade)
 09389                        .IsRequired();
 09390
 09391                    b.Navigation("DataScope");
 09392                });
 9393
 09394            modelBuilder.Entity("OzonDomains.Models.Authorization.UserFieldOverride", b =>
 09395                {
 09396                    b.HasOne("OzonDomains.Models.Authorization.AppField", "AppField")
 09397                        .WithMany("UserOverrides")
 09398                        .HasForeignKey("AppFieldId")
 09399                        .OnDelete(DeleteBehavior.Cascade)
 09400                        .IsRequired();
 09401
 09402                    b.Navigation("AppField");
 09403                });
 9404
 09405            modelBuilder.Entity("OzonDomains.Models.Authorization.UserPageOverride", b =>
 09406                {
 09407                    b.HasOne("OzonDomains.Models.Authorization.AppPage", "AppPage")
 09408                        .WithMany("UserOverrides")
 09409                        .HasForeignKey("AppPageId")
 09410                        .OnDelete(DeleteBehavior.Cascade)
 09411                        .IsRequired();
 09412
 09413                    b.Navigation("AppPage");
 09414                });
 9415
 09416            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 09417                {
 09418                    b.HasOne("OzonDomains.Models.BackgroundJobSchedule", "Schedule")
 09419                        .WithMany("Executions")
 09420                        .HasForeignKey("ScheduleId")
 09421                        .HasConstraintName("fk_execution_schedule");
 09422
 09423                    b.Navigation("Schedule");
 09424                });
 9425
 09426            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 09427                {
 09428                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09429                        .WithMany()
 09430                        .HasForeignKey("OzonClientId")
 09431                        .HasConstraintName("fk_schedule_ozon_client");
 09432
 09433                    b.Navigation("OzonClient");
 09434                });
 9435
 09436            modelBuilder.Entity("OzonDomains.Models.BackgroundJobStep", b =>
 09437                {
 09438                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09439                        .WithMany("Steps")
 09440                        .HasForeignKey("ExecutionId")
 09441                        .OnDelete(DeleteBehavior.Cascade)
 09442                        .IsRequired()
 09443                        .HasConstraintName("fk_step_execution");
 09444
 09445                    b.Navigation("Execution");
 09446                });
 9447
 09448            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 09449                {
 09450                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09451                        .WithMany("OrderMatches")
 09452                        .HasForeignKey("ExecutionId")
 09453                        .OnDelete(DeleteBehavior.Cascade)
 09454                        .IsRequired()
 09455                        .HasConstraintName("fk_match_execution");
 09456
 09457                    b.HasOne("OzonDomains.Models.Order", "Order")
 09458                        .WithMany()
 09459                        .HasForeignKey("OrderId")
 09460                        .HasConstraintName("fk_match_order");
 09461
 09462                    b.HasOne("OzonDomains.Models.BackgroundReportLoad", "ReportLoad")
 09463                        .WithMany()
 09464                        .HasForeignKey("ReportLoadId")
 09465                        .HasConstraintName("fk_match_report");
 09466
 09467                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09468                        .WithMany()
 09469                        .HasForeignKey("StepId")
 09470                        .HasConstraintName("fk_match_step");
 09471
 09472                    b.Navigation("Execution");
 09473
 09474                    b.Navigation("Order");
 09475
 09476                    b.Navigation("ReportLoad");
 09477
 09478                    b.Navigation("Step");
 09479                });
 9480
 09481            modelBuilder.Entity("OzonDomains.Models.BackgroundReportLoad", b =>
 09482                {
 09483                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09484                        .WithMany("ReportLoads")
 09485                        .HasForeignKey("ExecutionId")
 09486                        .OnDelete(DeleteBehavior.Cascade)
 09487                        .IsRequired()
 09488                        .HasConstraintName("fk_report_execution");
 09489
 09490                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09491                        .WithMany()
 09492                        .HasForeignKey("OzonClientId")
 09493                        .OnDelete(DeleteBehavior.Cascade)
 09494                        .IsRequired()
 09495                        .HasConstraintName("fk_report_ozon_client");
 09496
 09497                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09498                        .WithMany()
 09499                        .HasForeignKey("StepId")
 09500                        .HasConstraintName("fk_report_step");
 09501
 09502                    b.Navigation("Execution");
 09503
 09504                    b.Navigation("OzonClient");
 09505
 09506                    b.Navigation("Step");
 09507                });
 9508
 09509            modelBuilder.Entity("OzonDomains.Models.BackgroundTransactionResult", b =>
 09510                {
 09511                    b.HasOne("OzonDomains.Models.BackgroundJobExecution", "Execution")
 09512                        .WithMany("TransactionResults")
 09513                        .HasForeignKey("ExecutionId")
 09514                        .OnDelete(DeleteBehavior.Cascade)
 09515                        .IsRequired()
 09516                        .HasConstraintName("fk_result_execution");
 09517
 09518                    b.HasOne("OzonDomains.Models.Order", "Order")
 09519                        .WithMany()
 09520                        .HasForeignKey("OrderId")
 09521                        .OnDelete(DeleteBehavior.Cascade)
 09522                        .IsRequired()
 09523                        .HasConstraintName("fk_result_order");
 09524
 09525                    b.HasOne("OzonDomains.Models.BackgroundOrderMatch", "OrderMatch")
 09526                        .WithMany("TransactionResults")
 09527                        .HasForeignKey("OrderMatchId")
 09528                        .HasConstraintName("fk_result_match");
 09529
 09530                    b.HasOne("OzonDomains.Models.BackgroundJobStep", "Step")
 09531                        .WithMany()
 09532                        .HasForeignKey("StepId")
 09533                        .HasConstraintName("fk_result_step");
 09534
 09535                    b.HasOne("OzonDomains.Models.Transaction", "Transaction")
 09536                        .WithMany()
 09537                        .HasForeignKey("TransactionId")
 09538                        .HasConstraintName("fk_result_transaction");
 09539
 09540                    b.Navigation("Execution");
 09541
 09542                    b.Navigation("Order");
 09543
 09544                    b.Navigation("OrderMatch");
 09545
 09546                    b.Navigation("Step");
 09547
 09548                    b.Navigation("Transaction");
 09549                });
 9550
 09551            modelBuilder.Entity("OzonDomains.Models.BergCartItem", b =>
 09552                {
 09553                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09554                        .WithMany()
 09555                        .HasForeignKey("StudioOrderId")
 09556                        .OnDelete(DeleteBehavior.Restrict)
 09557                        .IsRequired();
 09558
 09559                    b.Navigation("StudioOrder");
 09560                });
 9561
 09562            modelBuilder.Entity("OzonDomains.Models.BergDeliveryAddressMapping", b =>
 09563                {
 09564                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09565                        .WithMany()
 09566                        .HasForeignKey("ShipmentWarehouseId")
 09567                        .OnDelete(DeleteBehavior.Restrict)
 09568                        .IsRequired()
 09569                        .HasConstraintName("FK_BergDeliveryAddressMappings_Warehouses");
 09570
 09571                    b.Navigation("ShipmentWarehouse");
 09572                });
 9573
 09574            modelBuilder.Entity("OzonDomains.Models.BergOrderItem", b =>
 09575                {
 09576                    b.HasOne("OzonDomains.Models.BergCartItem", null)
 09577                        .WithMany()
 09578                        .HasForeignKey("BergCartItemId")
 09579                        .OnDelete(DeleteBehavior.SetNull)
 09580                        .HasConstraintName("FK_BergOrderItems_BergCartItems");
 09581
 09582                    b.HasOne("OzonDomains.Models.BergOrder", "BergOrder")
 09583                        .WithMany("Items")
 09584                        .HasForeignKey("BergOrderId")
 09585                        .OnDelete(DeleteBehavior.Cascade)
 09586                        .IsRequired()
 09587                        .HasConstraintName("FK_BergOrderItems_BergOrders");
 09588
 09589                    b.HasOne("OzonDomains.Models.Order", null)
 09590                        .WithMany()
 09591                        .HasForeignKey("StudioOrderId")
 09592                        .OnDelete(DeleteBehavior.Restrict)
 09593                        .IsRequired();
 09594
 09595                    b.Navigation("BergOrder");
 09596                });
 9597
 09598            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveItem", b =>
 09599                {
 09600                    b.HasOne("OzonDomains.Models.BitrixStockArchiveExecution", "Execution")
 09601                        .WithMany("Items")
 09602                        .HasForeignKey("ExecutionId")
 09603                        .OnDelete(DeleteBehavior.Cascade)
 09604                        .IsRequired()
 09605                        .HasConstraintName("fk_archive_item_execution");
 09606
 09607                    b.Navigation("Execution");
 09608                });
 9609
 09610            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 09611                {
 09612                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09613                        .WithMany()
 09614                        .HasForeignKey("OzonClientId")
 09615                        .OnDelete(DeleteBehavior.Cascade)
 09616                        .IsRequired();
 09617
 09618                    b.Navigation("OzonClient");
 09619                });
 9620
 09621            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoScheduleRun", b =>
 09622                {
 09623                    b.HasOne("OzonDomains.Models.BitrixStockAutoSchedule", "Schedule")
 09624                        .WithMany("Runs")
 09625                        .HasForeignKey("ScheduleId")
 09626                        .OnDelete(DeleteBehavior.Cascade)
 09627                        .IsRequired()
 09628                        .HasConstraintName("fk_auto_run_schedule");
 09629
 09630                    b.Navigation("Schedule");
 09631                });
 9632
 09633            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearItem", b =>
 09634                {
 09635                    b.HasOne("OzonDomains.Models.BitrixStockClearExecution", "Execution")
 09636                        .WithMany("Items")
 09637                        .HasForeignKey("ExecutionId")
 09638                        .OnDelete(DeleteBehavior.Cascade)
 09639                        .IsRequired()
 09640                        .HasConstraintName("fk_clear_item_execution");
 09641
 09642                    b.Navigation("Execution");
 09643                });
 9644
 09645            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushItem", b =>
 09646                {
 09647                    b.HasOne("OzonDomains.Models.BitrixStockPushExecution", "Execution")
 09648                        .WithMany("Items")
 09649                        .HasForeignKey("ExecutionId")
 09650                        .OnDelete(DeleteBehavior.Cascade)
 09651                        .IsRequired()
 09652                        .HasConstraintName("fk_push_item_execution");
 09653
 09654                    b.Navigation("Execution");
 09655                });
 9656
 09657            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveItem", b =>
 09658                {
 09659                    b.HasOne("OzonDomains.Models.BitrixStockUnarchiveExecution", "Execution")
 09660                        .WithMany("Items")
 09661                        .HasForeignKey("ExecutionId")
 09662                        .OnDelete(DeleteBehavior.Cascade)
 09663                        .IsRequired()
 09664                        .HasConstraintName("fk_unarchive_item_execution");
 09665
 09666                    b.Navigation("Execution");
 09667                });
 9668
 09669            modelBuilder.Entity("OzonDomains.Models.ClientStatus", b =>
 09670                {
 09671                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 09672                        .WithMany()
 09673                        .HasForeignKey("StatusColorId")
 09674                        .HasConstraintName("FK_clientstatuses_StatusColors_StatusColorId");
 09675
 09676                    b.Navigation("StatusColor");
 09677                });
 9678
 09679            modelBuilder.Entity("OzonDomains.Models.ColumnMapping", b =>
 09680                {
 09681                    b.HasOne("OzonDomains.Models.OzonClient", "SelectedClient")
 09682                        .WithMany()
 09683                        .HasForeignKey("SelectedClientId");
 09684
 09685                    b.HasOne("OzonDomains.Models.Manufacturer", "SelectedManufacturer")
 09686                        .WithMany()
 09687                        .HasForeignKey("SelectedManufacturerId");
 09688
 09689                    b.HasOne("OzonDomains.Models.Supplier", "SelectedSupplier")
 09690                        .WithMany()
 09691                        .HasForeignKey("SelectedSupplierId");
 09692
 09693                    b.HasOne("OzonDomains.Models.Warehouse", "SelectedWarehouse")
 09694                        .WithMany()
 09695                        .HasForeignKey("SelectedWarehouseId");
 09696
 09697                    b.Navigation("SelectedClient");
 09698
 09699                    b.Navigation("SelectedManufacturer");
 09700
 09701                    b.Navigation("SelectedSupplier");
 09702
 09703                    b.Navigation("SelectedWarehouse");
 09704                });
 9705
 09706            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 09707                {
 09708                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 09709                        .WithMany("Attachments")
 09710                        .HasForeignKey("EmailMessageInboxId")
 09711                        .OnDelete(DeleteBehavior.Cascade)
 09712                        .IsRequired()
 09713                        .HasConstraintName("FK_EmailAttachmentInboxes_EmailMessageInboxes");
 09714
 09715                    b.Navigation("EmailMessage");
 09716                });
 9717
 09718            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentProcessingResult", b =>
 09719                {
 09720                    b.HasOne("OzonDomains.Models.EmailAttachmentInbox", "Attachment")
 09721                        .WithMany("ProcessingResults")
 09722                        .HasForeignKey("EmailAttachmentInboxId")
 09723                        .OnDelete(DeleteBehavior.Cascade)
 09724                        .IsRequired()
 09725                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailAttachmentInboxes");
 09726
 09727                    b.HasOne("OzonDomains.Models.EmailMessageInbox", "EmailMessage")
 09728                        .WithMany()
 09729                        .HasForeignKey("EmailMessageInboxId")
 09730                        .OnDelete(DeleteBehavior.Cascade)
 09731                        .IsRequired()
 09732                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailMessageInboxes");
 09733
 09734                    b.HasOne("OzonDomains.Models.EmailRoutingRule", "Rule")
 09735                        .WithMany()
 09736                        .HasForeignKey("EmailRoutingRuleId")
 09737                        .OnDelete(DeleteBehavior.SetNull)
 09738                        .HasConstraintName("FK_EmailAttachmentProcessingResults_EmailRoutingRules");
 09739
 09740                    b.Navigation("Attachment");
 09741
 09742                    b.Navigation("EmailMessage");
 09743
 09744                    b.Navigation("Rule");
 09745                });
 9746
 09747            modelBuilder.Entity("OzonDomains.Models.ExcludedArticle", b =>
 09748                {
 09749                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 09750                        .WithMany()
 09751                        .HasForeignKey("OzonClientId")
 09752                        .OnDelete(DeleteBehavior.Cascade)
 09753                        .IsRequired()
 09754                        .HasConstraintName("FK_ExcludedArticles_OzonClients");
 09755
 09756                    b.Navigation("OzonClient");
 09757                });
 9758
 09759            modelBuilder.Entity("OzonDomains.Models.FavoritPartsCartItem", b =>
 09760                {
 09761                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09762                        .WithMany()
 09763                        .HasForeignKey("StudioOrderId")
 09764                        .OnDelete(DeleteBehavior.Restrict)
 09765                        .IsRequired();
 09766
 09767                    b.Navigation("StudioOrder");
 09768                });
 9769
 09770            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrderItem", b =>
 09771                {
 09772                    b.HasOne("OzonDomains.Models.FavoritPartsCartItem", "FavoritPartsCartItem")
 09773                        .WithMany()
 09774                        .HasForeignKey("FavoritPartsCartItemId")
 09775                        .OnDelete(DeleteBehavior.SetNull)
 09776                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsCartItems");
 09777
 09778                    b.HasOne("OzonDomains.Models.FavoritPartsOrder", "FavoritPartsOrder")
 09779                        .WithMany("Items")
 09780                        .HasForeignKey("FavoritPartsOrderId")
 09781                        .OnDelete(DeleteBehavior.Cascade)
 09782                        .IsRequired()
 09783                        .HasConstraintName("FK_FavoritPartsOrderItems_FavoritPartsOrders");
 09784
 09785                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09786                        .WithMany()
 09787                        .HasForeignKey("StudioOrderId")
 09788                        .OnDelete(DeleteBehavior.Restrict)
 09789                        .IsRequired();
 09790
 09791                    b.Navigation("FavoritPartsCartItem");
 09792
 09793                    b.Navigation("FavoritPartsOrder");
 09794
 09795                    b.Navigation("StudioOrder");
 09796                });
 9797
 09798            modelBuilder.Entity("OzonDomains.Models.FidStatItem", b =>
 09799                {
 09800                    b.HasOne("OzonDomains.Models.FidStatSnapshot", "Snapshot")
 09801                        .WithMany("Items")
 09802                        .HasForeignKey("SnapshotId")
 09803                        .OnDelete(DeleteBehavior.Cascade)
 09804                        .IsRequired()
 09805                        .HasConstraintName("FK_FidStatItems_Snapshot");
 09806
 09807                    b.Navigation("Snapshot");
 09808                });
 9809
 09810            modelBuilder.Entity("OzonDomains.Models.ForumAutoCartItem", b =>
 09811                {
 09812                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09813                        .WithMany()
 09814                        .HasForeignKey("StudioOrderId")
 09815                        .OnDelete(DeleteBehavior.Restrict)
 09816                        .IsRequired();
 09817
 09818                    b.Navigation("StudioOrder");
 09819                });
 9820
 09821            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrderItem", b =>
 09822                {
 09823                    b.HasOne("OzonDomains.Models.ForumAutoCartItem", "ForumAutoCartItem")
 09824                        .WithMany()
 09825                        .HasForeignKey("ForumAutoCartItemId")
 09826                        .OnDelete(DeleteBehavior.SetNull)
 09827                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoCartItems");
 09828
 09829                    b.HasOne("OzonDomains.Models.ForumAutoOrder", "ForumAutoOrder")
 09830                        .WithMany("Items")
 09831                        .HasForeignKey("ForumAutoOrderId")
 09832                        .OnDelete(DeleteBehavior.Cascade)
 09833                        .IsRequired()
 09834                        .HasConstraintName("FK_ForumAutoOrderItems_ForumAutoOrders");
 09835
 09836                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09837                        .WithMany()
 09838                        .HasForeignKey("StudioOrderId")
 09839                        .OnDelete(DeleteBehavior.Restrict)
 09840                        .IsRequired();
 09841
 09842                    b.Navigation("ForumAutoCartItem");
 09843
 09844                    b.Navigation("ForumAutoOrder");
 09845
 09846                    b.Navigation("StudioOrder");
 09847                });
 9848
 09849            modelBuilder.Entity("OzonDomains.Models.InterpartsWarehouseLogin", b =>
 09850                {
 09851                    b.HasOne("OzonDomains.Models.Warehouse", "Warehouse")
 09852                        .WithMany()
 09853                        .HasForeignKey("WarehouseId")
 09854                        .OnDelete(DeleteBehavior.Cascade)
 09855                        .IsRequired();
 09856
 09857                    b.Navigation("Warehouse");
 09858                });
 9859
 09860            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedRow", b =>
 09861                {
 09862                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 09863                        .WithMany("MatchedRows")
 09864                        .HasForeignKey("MatchedResultId");
 09865                });
 9866
 09867            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchingColumn", b =>
 09868                {
 09869                    b.HasOne("OzonDomains.Models.MatchedRowSys.MatchedResult", null)
 09870                        .WithMany("MatchedColumns")
 09871                        .HasForeignKey("MatchedResultId");
 09872
 09873                    b.HasOne("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", null)
 09874                        .WithMany("MatchingColumns")
 09875                        .HasForeignKey("SavedMatchingColumnId");
 09876                });
 9877
 09878            modelBuilder.Entity("OzonDomains.Models.MikadoCartItem", b =>
 09879                {
 09880                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09881                        .WithMany()
 09882                        .HasForeignKey("StudioOrderId")
 09883                        .OnDelete(DeleteBehavior.Restrict)
 09884                        .IsRequired()
 09885                        .HasConstraintName("FK_MikadoCartItems_Orders");
 09886
 09887                    b.Navigation("StudioOrder");
 09888                });
 9889
 09890            modelBuilder.Entity("OzonDomains.Models.MlAutoCartItem", b =>
 09891                {
 09892                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09893                        .WithMany()
 09894                        .HasForeignKey("StudioOrderId")
 09895                        .OnDelete(DeleteBehavior.Cascade)
 09896                        .IsRequired()
 09897                        .HasConstraintName("FK_MlAutoCartItems_Orders");
 09898
 09899                    b.Navigation("StudioOrder");
 09900                });
 9901
 09902            modelBuilder.Entity("OzonDomains.Models.MlAutoDeliveryAddressMapping", b =>
 09903                {
 09904                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09905                        .WithMany()
 09906                        .HasForeignKey("ShipmentWarehouseId")
 09907                        .OnDelete(DeleteBehavior.Restrict)
 09908                        .IsRequired()
 09909                        .HasConstraintName("FK_MlAutoDeliveryAddressMappings_Warehouses");
 09910
 09911                    b.Navigation("ShipmentWarehouse");
 09912                });
 9913
 09914            modelBuilder.Entity("OzonDomains.Models.MlAutoOrderItem", b =>
 09915                {
 09916                    b.HasOne("OzonDomains.Models.MlAutoOrder", "MlAutoOrder")
 09917                        .WithMany("Items")
 09918                        .HasForeignKey("MlAutoOrderId")
 09919                        .OnDelete(DeleteBehavior.Cascade)
 09920                        .IsRequired()
 09921                        .HasConstraintName("FK_MlAutoOrderItems_Orders");
 09922
 09923                    b.Navigation("MlAutoOrder");
 09924                });
 9925
 09926            modelBuilder.Entity("OzonDomains.Models.MlAutoRuCartItem", b =>
 09927                {
 09928                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09929                        .WithMany()
 09930                        .HasForeignKey("StudioOrderId")
 09931                        .OnDelete(DeleteBehavior.Cascade)
 09932                        .IsRequired()
 09933                        .HasConstraintName("FK_MlAutoRuCartItems_Orders");
 09934
 09935                    b.Navigation("StudioOrder");
 09936                });
 9937
 09938            modelBuilder.Entity("OzonDomains.Models.MlAutoRuDeliveryAddressMapping", b =>
 09939                {
 09940                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 09941                        .WithMany()
 09942                        .HasForeignKey("ShipmentWarehouseId")
 09943                        .OnDelete(DeleteBehavior.Restrict)
 09944                        .IsRequired()
 09945                        .HasConstraintName("FK_MlAutoRuDeliveryAddressMappings_Warehouses");
 09946
 09947                    b.Navigation("ShipmentWarehouse");
 09948                });
 9949
 09950            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrderItem", b =>
 09951                {
 09952                    b.HasOne("OzonDomains.Models.MlAutoRuOrder", "MlAutoRuOrder")
 09953                        .WithMany("Items")
 09954                        .HasForeignKey("MlAutoRuOrderId")
 09955                        .OnDelete(DeleteBehavior.Cascade)
 09956                        .IsRequired()
 09957                        .HasConstraintName("FK_MlAutoRuOrderItems_Orders");
 09958
 09959                    b.Navigation("MlAutoRuOrder");
 09960                });
 9961
 09962            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraCartItem", b =>
 09963                {
 09964                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09965                        .WithMany()
 09966                        .HasForeignKey("StudioOrderId")
 09967                        .OnDelete(DeleteBehavior.Restrict)
 09968                        .IsRequired()
 09969                        .HasConstraintName("FK_MoskvorechieIstraCartItems_StudioOrder");
 09970
 09971                    b.Navigation("StudioOrder");
 09972                });
 9973
 09974            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrderItem", b =>
 09975                {
 09976                    b.HasOne("OzonDomains.Models.MoskvorechieIstraOrder", "MoskvorechieIstraOrder")
 09977                        .WithMany("Items")
 09978                        .HasForeignKey("MoskvorechieIstraOrderId")
 09979                        .OnDelete(DeleteBehavior.Cascade)
 09980                        .IsRequired()
 09981                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_Order");
 09982
 09983                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09984                        .WithMany()
 09985                        .HasForeignKey("StudioOrderId")
 09986                        .OnDelete(DeleteBehavior.Restrict)
 09987                        .IsRequired()
 09988                        .HasConstraintName("FK_MoskvorechieIstraOrderItems_StudioOrder");
 09989
 09990                    b.Navigation("MoskvorechieIstraOrder");
 09991
 09992                    b.Navigation("StudioOrder");
 09993                });
 9994
 09995            modelBuilder.Entity("OzonDomains.Models.MotexCartItem", b =>
 09996                {
 09997                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 09998                        .WithMany()
 09999                        .HasForeignKey("StudioOrderId")
 010000                        .OnDelete(DeleteBehavior.Restrict)
 010001                        .IsRequired();
 010002
 010003                    b.Navigation("StudioOrder");
 010004                });
 10005
 010006            modelBuilder.Entity("OzonDomains.Models.MotexOrderItem", b =>
 010007                {
 010008                    b.HasOne("OzonDomains.Models.MotexOrder", "MotexOrder")
 010009                        .WithMany("Items")
 010010                        .HasForeignKey("MotexOrderId")
 010011                        .OnDelete(DeleteBehavior.Cascade)
 010012                        .IsRequired();
 010013
 010014                    b.Navigation("MotexOrder");
 010015                });
 10016
 010017            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 010018                {
 010019                    b.HasOne("OzonDomains.Models.AppStatus", "AppStatus")
 010020                        .WithMany()
 010021                        .HasForeignKey("AppStatusId");
 010022
 010023                    b.HasOne("OzonDomains.Models.ClientStatus", "ClientStatus")
 010024                        .WithMany()
 010025                        .HasForeignKey("ClientStatusId");
 010026
 010027                    b.HasOne("OzonDomains.Delivery", "Delivery")
 010028                        .WithMany("Orders")
 010029                        .HasForeignKey("DeliveryId");
 010030
 010031                    b.HasOne("OzonDomains.Models.EtProducer", "EtProducer")
 010032                        .WithMany()
 010033                        .HasForeignKey("EtProducerId")
 010034                        .OnDelete(DeleteBehavior.Restrict);
 010035
 010036                    b.HasOne("OzonDomains.Models.OrdersFileMetadata", "ExcelFileData")
 010037                        .WithMany()
 010038                        .HasForeignKey("ExcelFileDataId");
 010039
 010040                    b.HasOne("OzonDomains.Models.Manufacturer", "Manufacturer")
 010041                        .WithMany()
 010042                        .HasForeignKey("ManufacturerId");
 010043
 010044                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010045                        .WithMany()
 010046                        .HasForeignKey("OzonClientId");
 010047
 010048                    b.HasOne("OzonDomains.Models.Product", "ProductInfo")
 010049                        .WithMany()
 010050                        .HasForeignKey("ProductInfoId");
 010051
 010052                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010053                        .WithMany()
 010054                        .HasForeignKey("ShipmentWarehouseId");
 010055
 010056                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010057                        .WithMany()
 010058                        .HasForeignKey("SupplierId");
 010059
 010060                    b.HasOne("OzonDomains.Models.Transaction", null)
 010061                        .WithMany("Orders")
 010062                        .HasForeignKey("TransactionId");
 010063
 010064                    b.HasOne("OzonDomains.Models.Currency", "Сurrency")
 010065                        .WithMany()
 010066                        .HasForeignKey("СurrencyId");
 010067
 010068                    b.Navigation("AppStatus");
 010069
 010070                    b.Navigation("ClientStatus");
 010071
 010072                    b.Navigation("Delivery");
 010073
 010074                    b.Navigation("EtProducer");
 010075
 010076                    b.Navigation("ExcelFileData");
 010077
 010078                    b.Navigation("Manufacturer");
 010079
 010080                    b.Navigation("OzonClient");
 010081
 010082                    b.Navigation("ProductInfo");
 010083
 010084                    b.Navigation("ShipmentWarehouse");
 010085
 010086                    b.Navigation("Supplier");
 010087
 010088                    b.Navigation("Сurrency");
 010089                });
 10090
 010091            modelBuilder.Entity("OzonDomains.Models.OrderArchive", b =>
 010092                {
 010093                    b.HasOne("OzonDomains.Models.Order", "Order")
 010094                        .WithOne("OrderArchive")
 010095                        .HasForeignKey("OzonDomains.Models.OrderArchive", "OrderId")
 010096                        .OnDelete(DeleteBehavior.Cascade)
 010097                        .IsRequired();
 010098
 010099                    b.Navigation("Order");
 010100                });
 10101
 010102            modelBuilder.Entity("OzonDomains.Models.OrderCalculationSnapshot", b =>
 010103                {
 010104                    b.HasOne("OzonDomains.Models.Order", "Order")
 010105                        .WithMany()
 010106                        .HasForeignKey("OrderId")
 010107                        .OnDelete(DeleteBehavior.Cascade)
 010108                        .IsRequired();
 010109
 010110                    b.Navigation("Order");
 010111                });
 10112
 010113            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 010114                {
 010115                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010116                        .WithMany()
 010117                        .HasForeignKey("StatusColorId")
 010118                        .HasConstraintName("FK_ItemStatuses_StatusColors");
 010119
 010120                    b.Navigation("StatusColor");
 010121                });
 10122
 010123            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 010124                {
 010125                    b.HasOne("OzonDomains.Models.OrderCarts.CartStatus", "CartStatus")
 010126                        .WithMany("OrderCarts")
 010127                        .HasForeignKey("CartStatusId")
 010128                        .HasConstraintName("ordercarts_ibfk_1");
 010129
 010130                    b.Navigation("CartStatus");
 010131                });
 10132
 010133            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderItem", b =>
 010134                {
 010135                    b.HasOne("OzonDomains.Models.OrderCarts.ItemStatus", "ItemStatus")
 010136                        .WithMany("OrderItems")
 010137                        .HasForeignKey("ItemStatusId")
 010138                        .HasConstraintName("orderitems_ibfk_1");
 010139
 010140                    b.HasOne("OzonDomains.Models.OrderCarts.OrderCart", "OrderCart")
 010141                        .WithMany("OrderItems")
 010142                        .HasForeignKey("OrderCartId")
 010143                        .OnDelete(DeleteBehavior.Cascade)
 010144                        .IsRequired()
 010145                        .HasConstraintName("orderitems_ibfk_2");
 010146
 010147                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010148                        .WithMany()
 010149                        .HasForeignKey("StudioOrderId");
 010150
 010151                    b.Navigation("ItemStatus");
 010152
 010153                    b.Navigation("OrderCart");
 010154
 010155                    b.Navigation("StudioOrder");
 010156                });
 10157
 010158            modelBuilder.Entity("OzonDomains.Models.OrderControlRule", b =>
 010159                {
 010160                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010161                        .WithMany()
 010162                        .HasForeignKey("TargetAppRoleId")
 010163                        .OnDelete(DeleteBehavior.Restrict)
 010164                        .IsRequired();
 010165
 010166                    b.Navigation("TargetAppRole");
 010167                });
 10168
 010169            modelBuilder.Entity("OzonDomains.Models.OrderControlTask", b =>
 010170                {
 010171                    b.HasOne("OzonDomains.Models.Order", "Order")
 010172                        .WithMany()
 010173                        .HasForeignKey("OrderId")
 010174                        .OnDelete(DeleteBehavior.Cascade)
 010175                        .IsRequired();
 010176
 010177                    b.HasOne("OzonDomains.Models.OrderControlRule", "Rule")
 010178                        .WithMany()
 010179                        .HasForeignKey("RuleId")
 010180                        .OnDelete(DeleteBehavior.Restrict)
 010181                        .IsRequired();
 010182
 010183                    b.HasOne("OzonDomains.Models.Authorization.AppRole", "TargetAppRole")
 010184                        .WithMany()
 010185                        .HasForeignKey("TargetAppRoleId")
 010186                        .OnDelete(DeleteBehavior.Restrict)
 010187                        .IsRequired();
 010188
 010189                    b.Navigation("Order");
 010190
 010191                    b.Navigation("Rule");
 010192
 010193                    b.Navigation("TargetAppRole");
 010194                });
 10195
 010196            modelBuilder.Entity("OzonDomains.Models.OrderControlTaskEvent", b =>
 010197                {
 010198                    b.HasOne("OzonDomains.Models.OrderControlTask", "Task")
 010199                        .WithMany()
 010200                        .HasForeignKey("TaskId")
 010201                        .OnDelete(DeleteBehavior.Cascade)
 010202                        .IsRequired();
 010203
 010204                    b.Navigation("Task");
 010205                });
 10206
 010207            modelBuilder.Entity("OzonDomains.Models.OrderExtension", b =>
 010208                {
 010209                    b.HasOne("OzonDomains.Models.Order", "Order")
 010210                        .WithMany("OrderExtensions")
 010211                        .HasForeignKey("OrderId")
 010212                        .OnDelete(DeleteBehavior.Cascade)
 010213                        .IsRequired()
 010214                        .HasConstraintName("FK_OrderExtensions_Orders");
 010215
 010216                    b.Navigation("Order");
 010217                });
 10218
 010219            modelBuilder.Entity("OzonDomains.Models.OrderExtraExpense", b =>
 010220                {
 010221                    b.HasOne("OzonDomains.Models.ExpenseType", "ExpenseType")
 010222                        .WithMany("OrderExtraExpenses")
 010223                        .HasForeignKey("ExpenseTypeId")
 010224                        .OnDelete(DeleteBehavior.Cascade)
 010225                        .IsRequired()
 010226                        .HasConstraintName("FK_OrderExtraExpenses_ExpenseType");
 010227
 010228                    b.HasOne("OzonDomains.Models.Order", "Order")
 010229                        .WithMany("ExtraExpenses")
 010230                        .HasForeignKey("OrderId")
 010231                        .OnDelete(DeleteBehavior.Cascade)
 010232                        .IsRequired()
 010233                        .HasConstraintName("FK_OrderExtraExpenses_Order");
 010234
 010235                    b.Navigation("ExpenseType");
 010236
 010237                    b.Navigation("Order");
 010238                });
 10239
 010240            modelBuilder.Entity("OzonDomains.Models.OrderHistory", b =>
 010241                {
 010242                    b.HasOne("OzonDomains.Models.Order", "Order")
 010243                        .WithMany()
 010244                        .HasForeignKey("OrderId")
 010245                        .OnDelete(DeleteBehavior.Cascade)
 010246                        .IsRequired()
 010247                        .HasConstraintName("FK_OrdersHistory_Orders_OrderId");
 010248
 010249                    b.Navigation("Order");
 010250                });
 10251
 010252            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPostingLink", b =>
 010253                {
 010254                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 010255                        .WithMany()
 010256                        .HasForeignKey("OrderHistoryId")
 010257                        .OnDelete(DeleteBehavior.Cascade)
 010258                        .IsRequired()
 010259                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_History");
 010260
 010261                    b.HasOne("OzonDomains.Models.OrderHistoryOneCPosting", "Posting")
 010262                        .WithMany("HistoryLinks")
 010263                        .HasForeignKey("PostingId")
 010264                        .OnDelete(DeleteBehavior.Cascade)
 010265                        .IsRequired()
 010266                        .HasConstraintName("FK_OrderHistoryOneCPostingLinks_Posting");
 010267
 010268                    b.Navigation("OrderHistory");
 010269
 010270                    b.Navigation("Posting");
 010271                });
 10272
 010273            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionCondition", b =>
 010274                {
 010275                    b.HasOne("OzonDomains.Models.OrderOzonPromotionSnapshot", "Snapshot")
 010276                        .WithMany("Conditions")
 010277                        .HasForeignKey("SnapshotId")
 010278                        .OnDelete(DeleteBehavior.Cascade)
 010279                        .IsRequired()
 010280                        .HasConstraintName("FK_OzonPromoCondition_Snapshot");
 010281
 010282                    b.Navigation("Snapshot");
 010283                });
 10284
 010285            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 010286                {
 010287                    b.HasOne("OzonDomains.Models.Order", "Order")
 010288                        .WithOne("OzonPromotionSnapshot")
 010289                        .HasForeignKey("OzonDomains.Models.OrderOzonPromotionSnapshot", "OrderId")
 010290                        .OnDelete(DeleteBehavior.Cascade)
 010291                        .IsRequired();
 010292
 010293                    b.Navigation("Order");
 010294                });
 10295
 010296            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 010297                {
 010298                    b.HasOne("OzonDomains.Models.Order", null)
 010299                        .WithOne("OrderPrice")
 010300                        .HasForeignKey("OzonDomains.Models.OrderPrice", "OrderId")
 010301                        .OnDelete(DeleteBehavior.Cascade)
 010302                        .IsRequired();
 010303                });
 10304
 010305            modelBuilder.Entity("OzonDomains.Models.OrderReturn", b =>
 010306                {
 010307                    b.HasOne("OzonDomains.Models.Order", "Order")
 010308                        .WithMany()
 010309                        .HasForeignKey("OrderId")
 010310                        .HasConstraintName("FK_OrderReturns_Orders");
 010311
 010312                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010313                        .WithMany()
 010314                        .HasForeignKey("OzonClientId")
 010315                        .OnDelete(DeleteBehavior.Cascade)
 010316                        .IsRequired()
 010317                        .HasConstraintName("FK_OrderReturns_OzonClients");
 010318
 010319                    b.Navigation("Order");
 010320
 010321                    b.Navigation("OzonClient");
 010322                });
 10323
 010324            modelBuilder.Entity("OzonDomains.Models.OzonChatOrder", b =>
 010325                {
 010326                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010327                        .WithMany()
 010328                        .HasForeignKey("ClientId")
 010329                        .OnDelete(DeleteBehavior.Cascade)
 010330                        .IsRequired()
 010331                        .HasConstraintName("FK_OzonChatOrders_OzonClient");
 010332
 010333                    b.HasOne("OzonDomains.Models.Order", "Order")
 010334                        .WithMany()
 010335                        .HasForeignKey("OrderId")
 010336                        .OnDelete(DeleteBehavior.Cascade)
 010337                        .IsRequired()
 010338                        .HasConstraintName("FK_OzonChatOrders_Order");
 010339
 010340                    b.Navigation("Client");
 010341
 010342                    b.Navigation("Order");
 010343                });
 10344
 010345            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseStatistic", b =>
 010346                {
 010347                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010348                        .WithMany()
 010349                        .HasForeignKey("ClientId")
 010350                        .OnDelete(DeleteBehavior.Cascade)
 010351                        .IsRequired()
 010352                        .HasConstraintName("FK_OzonChatResponseStatistics_OzonClient");
 010353
 010354                    b.HasOne("OzonDomains.Models.Order", "Order")
 010355                        .WithMany()
 010356                        .HasForeignKey("OrderId")
 010357                        .HasConstraintName("FK_OzonChatResponseStatistics_Order");
 010358
 010359                    b.Navigation("Client");
 010360
 010361                    b.Navigation("Order");
 010362                });
 10363
 010364            modelBuilder.Entity("OzonDomains.Models.OzonChatResponseTime", b =>
 010365                {
 010366                    b.HasOne("OzonDomains.Models.OzonClient", "Client")
 010367                        .WithMany()
 010368                        .HasForeignKey("ClientId")
 010369                        .OnDelete(DeleteBehavior.Cascade)
 010370                        .IsRequired();
 010371
 010372                    b.Navigation("Client");
 010373                });
 10374
 010375            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 010376                {
 010377                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", "Batch")
 010378                        .WithMany("Acts")
 010379                        .HasForeignKey("BatchId")
 010380                        .OnDelete(DeleteBehavior.Cascade)
 010381                        .IsRequired();
 010382
 010383                    b.Navigation("Batch");
 010384                });
 10385
 010386            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverActItem", b =>
 010387                {
 010388                    b.HasOne("OzonDomains.Models.OzonHandover.OzonHandoverAct", "Act")
 010389                        .WithMany("Items")
 010390                        .HasForeignKey("ActId")
 010391                        .OnDelete(DeleteBehavior.Cascade)
 010392                        .IsRequired();
 010393
 010394                    b.HasOne("OzonDomains.Models.Order", "Order")
 010395                        .WithMany()
 010396                        .HasForeignKey("OrderId");
 010397
 010398                    b.Navigation("Act");
 010399
 010400                    b.Navigation("Order");
 010401                });
 10402
 010403            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 010404                {
 010405                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010406                        .WithMany()
 010407                        .HasForeignKey("OzonClientId")
 010408                        .OnDelete(DeleteBehavior.Restrict)
 010409                        .IsRequired();
 010410
 010411                    b.Navigation("OzonClient");
 010412                });
 10413
 010414            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellationOrder", b =>
 010415                {
 010416                    b.HasOne("OzonDomains.Models.OzonPostingCancellation", "Cancellation")
 010417                        .WithMany("OrderLinks")
 010418                        .HasForeignKey("CancellationId")
 010419                        .OnDelete(DeleteBehavior.Cascade)
 010420                        .IsRequired()
 010421                        .HasConstraintName("FK_OzonPostingCancellationOrders_Cancellations_CancellationId");
 010422
 010423                    b.HasOne("OzonDomains.Models.Order", "Order")
 010424                        .WithMany()
 010425                        .HasForeignKey("OrderId")
 010426                        .OnDelete(DeleteBehavior.Cascade)
 010427                        .IsRequired();
 010428
 010429                    b.Navigation("Cancellation");
 010430
 010431                    b.Navigation("Order");
 010432                });
 10433
 010434            modelBuilder.Entity("OzonDomains.Models.PriceIndexes", b =>
 010435                {
 010436                    b.HasOne("OzonDomains.Models.OrderPrice", null)
 010437                        .WithOne("PriceIndexes")
 010438                        .HasForeignKey("OzonDomains.Models.PriceIndexes", "OrderPriceId")
 010439                        .OnDelete(DeleteBehavior.Cascade)
 010440                        .IsRequired();
 010441                });
 10442
 010443            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 010444                {
 010445                    b.HasOne("OzonDomains.Models.Product", "ReplacementProduct")
 010446                        .WithMany("ReplacedProducts")
 010447                        .HasForeignKey("ReplacementProductId")
 010448                        .OnDelete(DeleteBehavior.Restrict);
 010449
 010450                    b.Navigation("ReplacementProduct");
 010451                });
 10452
 010453            modelBuilder.Entity("OzonDomains.Models.ProfitLigaCartItem", b =>
 010454                {
 010455                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010456                        .WithMany()
 010457                        .HasForeignKey("StudioOrderId")
 010458                        .OnDelete(DeleteBehavior.Restrict)
 010459                        .IsRequired();
 010460
 010461                    b.Navigation("StudioOrder");
 010462                });
 10463
 010464            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrderItem", b =>
 010465                {
 010466                    b.HasOne("OzonDomains.Models.ProfitLigaCartItem", "ProfitLigaCartItem")
 010467                        .WithMany()
 010468                        .HasForeignKey("ProfitLigaCartItemId")
 010469                        .OnDelete(DeleteBehavior.SetNull)
 010470                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaCartItems");
 010471
 010472                    b.HasOne("OzonDomains.Models.ProfitLigaOrder", "ProfitLigaOrder")
 010473                        .WithMany("Items")
 010474                        .HasForeignKey("ProfitLigaOrderId")
 010475                        .OnDelete(DeleteBehavior.Cascade)
 010476                        .IsRequired()
 010477                        .HasConstraintName("FK_ProfitLigaOrderItems_ProfitLigaOrders");
 010478
 010479                    b.HasOne("OzonDomains.Models.Order", null)
 010480                        .WithMany()
 010481                        .HasForeignKey("StudioOrderId")
 010482                        .OnDelete(DeleteBehavior.Restrict)
 010483                        .IsRequired();
 010484
 010485                    b.Navigation("ProfitLigaCartItem");
 010486
 010487                    b.Navigation("ProfitLigaOrder");
 010488                });
 10489
 010490            modelBuilder.Entity("OzonDomains.Models.ProfitLigaPointMapping", b =>
 010491                {
 010492                    b.HasOne("OzonDomains.Models.Warehouse", "ShipmentWarehouse")
 010493                        .WithMany()
 010494                        .HasForeignKey("ShipmentWarehouseId")
 010495                        .OnDelete(DeleteBehavior.Restrict)
 010496                        .IsRequired()
 010497                        .HasConstraintName("FK_ProfitLigaPointMappings_Warehouses");
 010498
 010499                    b.Navigation("ShipmentWarehouse");
 010500                });
 10501
 010502            modelBuilder.Entity("OzonDomains.Models.ShateMCartItem", b =>
 010503                {
 010504                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010505                        .WithMany()
 010506                        .HasForeignKey("StudioOrderId")
 010507                        .OnDelete(DeleteBehavior.Restrict)
 010508                        .IsRequired();
 010509
 010510                    b.Navigation("StudioOrder");
 010511                });
 10512
 010513            modelBuilder.Entity("OzonDomains.Models.ShateMOrderItem", b =>
 010514                {
 010515                    b.HasOne("OzonDomains.Models.ShateMOrder", "ShateMOrder")
 010516                        .WithMany("Items")
 010517                        .HasForeignKey("ShateMOrderId")
 010518                        .OnDelete(DeleteBehavior.Cascade)
 010519                        .IsRequired()
 010520                        .HasConstraintName("FK_ShateMOrderItems_Orders");
 010521
 010522                    b.Navigation("ShateMOrder");
 010523                });
 10524
 010525            modelBuilder.Entity("OzonDomains.Models.StatusTransition", b =>
 010526                {
 010527                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 010528                        .WithMany()
 010529                        .HasForeignKey("FromStatusId")
 010530                        .OnDelete(DeleteBehavior.Restrict)
 010531                        .IsRequired()
 010532                        .HasConstraintName("StatusTransitions_ibfk_1");
 010533
 010534                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 010535                        .WithMany()
 010536                        .HasForeignKey("ToStatusId")
 010537                        .OnDelete(DeleteBehavior.Restrict)
 010538                        .IsRequired()
 010539                        .HasConstraintName("StatusTransitions_ibfk_2");
 010540
 010541                    b.Navigation("FromStatus");
 010542
 010543                    b.Navigation("ToStatus");
 010544                });
 10545
 010546            modelBuilder.Entity("OzonDomains.Models.StatusTransitionHistory", b =>
 010547                {
 010548                    b.HasOne("OzonDomains.Models.AppStatus", "FromStatus")
 010549                        .WithMany()
 010550                        .HasForeignKey("FromStatusId")
 010551                        .OnDelete(DeleteBehavior.Restrict)
 010552                        .IsRequired()
 010553                        .HasConstraintName("StatusTransitionHistory_ibfk_2");
 010554
 010555                    b.HasOne("OzonDomains.Models.StatusTransition", "StatusTransition")
 010556                        .WithMany()
 010557                        .HasForeignKey("StatusTransitionId")
 010558                        .OnDelete(DeleteBehavior.Restrict)
 010559                        .HasConstraintName("StatusTransitionHistory_ibfk_1");
 010560
 010561                    b.HasOne("OzonDomains.Models.AppStatus", "ToStatus")
 010562                        .WithMany()
 010563                        .HasForeignKey("ToStatusId")
 010564                        .OnDelete(DeleteBehavior.Restrict)
 010565                        .IsRequired()
 010566                        .HasConstraintName("StatusTransitionHistory_ibfk_3");
 010567
 010568                    b.Navigation("FromStatus");
 010569
 010570                    b.Navigation("StatusTransition");
 010571
 010572                    b.Navigation("ToStatus");
 010573                });
 10574
 010575            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationOffer", b =>
 010576                {
 010577                    b.HasOne("OzonDomains.Models.SupplierQuotationRequest", "Request")
 010578                        .WithMany("Offers")
 010579                        .HasForeignKey("RequestId")
 010580                        .OnDelete(DeleteBehavior.Cascade)
 010581                        .IsRequired()
 010582                        .HasConstraintName("FK_SupplierQuotationOffers_Requests");
 010583
 010584                    b.Navigation("Request");
 010585                });
 10586
 010587            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 010588                {
 010589                    b.HasOne("OzonDomains.Models.Order", "Order")
 010590                        .WithMany()
 010591                        .HasForeignKey("OrderId")
 010592                        .OnDelete(DeleteBehavior.Restrict)
 010593                        .IsRequired()
 010594                        .HasConstraintName("FK_SupplierQuotationRequests_Orders");
 010595
 010596                    b.HasOne("OzonDomains.Models.Product", "Product")
 010597                        .WithMany()
 010598                        .HasForeignKey("ProductId")
 010599                        .OnDelete(DeleteBehavior.Restrict)
 010600                        .IsRequired()
 010601                        .HasConstraintName("FK_SupplierQuotationRequests_Products");
 010602
 010603                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010604                        .WithMany()
 010605                        .HasForeignKey("SupplierId")
 010606                        .OnDelete(DeleteBehavior.SetNull)
 010607                        .HasConstraintName("FK_SupplierQuotationRequests_Suppliers");
 010608
 010609                    b.Navigation("Order");
 010610
 010611                    b.Navigation("Product");
 010612
 010613                    b.Navigation("Supplier");
 010614                });
 10615
 010616            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierState", b =>
 010617                {
 010618                    b.HasOne("OzonDomains.Models.Order", "Order")
 010619                        .WithMany()
 010620                        .HasForeignKey("OrderId")
 010621                        .OnDelete(DeleteBehavior.Restrict)
 010622                        .IsRequired();
 010623
 010624                    b.HasOne("OzonDomains.Models.SupplierStatuses.SupplierStatus", "SupplierStatus")
 010625                        .WithMany()
 010626                        .HasForeignKey("SupplierStatusId")
 010627                        .OnDelete(DeleteBehavior.SetNull);
 010628
 010629                    b.Navigation("Order");
 010630
 010631                    b.Navigation("SupplierStatus");
 010632                });
 10633
 010634            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.OrderSupplierStateHistory", b =>
 010635                {
 010636                    b.HasOne("OzonDomains.Models.OrderHistory", "OrderHistory")
 010637                        .WithMany()
 010638                        .HasForeignKey("OrderHistoryId")
 010639                        .OnDelete(DeleteBehavior.SetNull)
 010640                        .HasConstraintName("FK_OrderSupplierStateHistory_OrderHistory_OrderHistoryId");
 010641
 010642                    b.HasOne("OzonDomains.Models.SupplierStatuses.OrderSupplierState", "OrderSupplierState")
 010643                        .WithMany()
 010644                        .HasForeignKey("OrderSupplierStateId")
 010645                        .OnDelete(DeleteBehavior.Cascade)
 010646                        .IsRequired()
 010647                        .HasConstraintName("FK_OrderSupplierStateHistory_States_OrderSupplierStateId");
 010648
 010649                    b.Navigation("OrderHistory");
 010650
 010651                    b.Navigation("OrderSupplierState");
 010652                });
 10653
 010654            modelBuilder.Entity("OzonDomains.Models.SupplierStatuses.SupplierStatus", b =>
 010655                {
 010656                    b.HasOne("OzonDomains.StatusColor", "StatusColor")
 010657                        .WithMany()
 010658                        .HasForeignKey("StatusColorId")
 010659                        .OnDelete(DeleteBehavior.SetNull);
 010660
 010661                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010662                        .WithMany()
 010663                        .HasForeignKey("SupplierId")
 010664                        .OnDelete(DeleteBehavior.SetNull);
 010665
 010666                    b.Navigation("StatusColor");
 010667
 010668                    b.Navigation("Supplier");
 010669                });
 10670
 010671            modelBuilder.Entity("OzonDomains.Models.TransactionTimeTrackingResult", b =>
 010672                {
 010673                    b.HasOne("OzonDomains.Models.TransactionTimeTrackingSession", "TrackingSession")
 010674                        .WithMany()
 010675                        .HasForeignKey("TrackingSessionId")
 010676                        .OnDelete(DeleteBehavior.SetNull)
 010677                        .HasConstraintName("FK_TransactionTimeTrackingResults_SessionId");
 010678
 010679                    b.Navigation("TrackingSession");
 010680                });
 10681
 010682            modelBuilder.Entity("OzonDomains.Models.WarehouseMapping", b =>
 010683                {
 010684                    b.HasOne("OzonDomains.Models.OzonClient", "OzonClient")
 010685                        .WithMany()
 010686                        .HasForeignKey("OzonClientId")
 010687                        .HasConstraintName("FK_WarehouseMapping_OzonClient");
 010688
 010689                    b.HasOne("OzonDomains.Models.Supplier", "Supplier")
 010690                        .WithMany()
 010691                        .HasForeignKey("SupplierId");
 010692
 010693                    b.Navigation("OzonClient");
 010694
 010695                    b.Navigation("Supplier");
 010696                });
 10697
 010698            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSnapshot", b =>
 010699                {
 010700                    b.HasOne("OzonDomains.Models.WarehouseStockSyncRun", "SyncRun")
 010701                        .WithMany("SnapshotRows")
 010702                        .HasForeignKey("SyncRunId")
 010703                        .OnDelete(DeleteBehavior.Restrict)
 010704                        .IsRequired()
 010705                        .HasConstraintName("FK_WarehouseStockSnapshot_SyncRun");
 010706
 010707                    b.Navigation("SyncRun");
 010708                });
 10709
 010710            modelBuilder.Entity("OzonDomains.Models.ZZapCartItem", b =>
 010711                {
 010712                    b.HasOne("OzonDomains.Models.Order", "StudioOrder")
 010713                        .WithMany()
 010714                        .HasForeignKey("StudioOrderId")
 010715                        .OnDelete(DeleteBehavior.Restrict)
 010716                        .IsRequired();
 010717
 010718                    b.Navigation("StudioOrder");
 010719                });
 10720
 010721            modelBuilder.Entity("OzonDomains.Delivery", b =>
 010722                {
 010723                    b.Navigation("Orders");
 010724                });
 10725
 010726            modelBuilder.Entity("OzonDomains.Models.AccessControl.DataScopeSet", b =>
 010727                {
 010728                    b.Navigation("Items");
 010729                });
 10730
 010731            modelBuilder.Entity("OzonDomains.Models.ArmtekOrder", b =>
 010732                {
 010733                    b.Navigation("Items");
 010734                });
 10735
 010736            modelBuilder.Entity("OzonDomains.Models.AssemblyListRun", b =>
 010737                {
 010738                    b.Navigation("Items");
 010739                });
 10740
 010741            modelBuilder.Entity("OzonDomains.Models.Authorization.AppField", b =>
 010742                {
 010743                    b.Navigation("RolePermissions");
 010744
 010745                    b.Navigation("UserOverrides");
 010746                });
 10747
 010748            modelBuilder.Entity("OzonDomains.Models.Authorization.AppPage", b =>
 010749                {
 010750                    b.Navigation("Children");
 010751
 010752                    b.Navigation("Fields");
 010753
 010754                    b.Navigation("RolePermissions");
 010755
 010756                    b.Navigation("UserOverrides");
 010757                });
 10758
 010759            modelBuilder.Entity("OzonDomains.Models.Authorization.AppRole", b =>
 010760                {
 010761                    b.Navigation("DataScopes");
 010762
 010763                    b.Navigation("FieldPermissions");
 010764
 010765                    b.Navigation("PagePermissions");
 010766
 010767                    b.Navigation("UserLinks");
 010768                });
 10769
 010770            modelBuilder.Entity("OzonDomains.Models.Authorization.DataScope", b =>
 010771                {
 010772                    b.Navigation("RoleLinks");
 010773
 010774                    b.Navigation("UserLinks");
 010775                });
 10776
 010777            modelBuilder.Entity("OzonDomains.Models.BackgroundJobExecution", b =>
 010778                {
 010779                    b.Navigation("OrderMatches");
 010780
 010781                    b.Navigation("ReportLoads");
 010782
 010783                    b.Navigation("Steps");
 010784
 010785                    b.Navigation("TransactionResults");
 010786                });
 10787
 010788            modelBuilder.Entity("OzonDomains.Models.BackgroundJobSchedule", b =>
 010789                {
 010790                    b.Navigation("Executions");
 010791                });
 10792
 010793            modelBuilder.Entity("OzonDomains.Models.BackgroundOrderMatch", b =>
 010794                {
 010795                    b.Navigation("TransactionResults");
 010796                });
 10797
 010798            modelBuilder.Entity("OzonDomains.Models.BergOrder", b =>
 010799                {
 010800                    b.Navigation("Items");
 010801                });
 10802
 010803            modelBuilder.Entity("OzonDomains.Models.BitrixStockArchiveExecution", b =>
 010804                {
 010805                    b.Navigation("Items");
 010806                });
 10807
 010808            modelBuilder.Entity("OzonDomains.Models.BitrixStockAutoSchedule", b =>
 010809                {
 010810                    b.Navigation("Runs");
 010811                });
 10812
 010813            modelBuilder.Entity("OzonDomains.Models.BitrixStockClearExecution", b =>
 010814                {
 010815                    b.Navigation("Items");
 010816                });
 10817
 010818            modelBuilder.Entity("OzonDomains.Models.BitrixStockPushExecution", b =>
 010819                {
 010820                    b.Navigation("Items");
 010821                });
 10822
 010823            modelBuilder.Entity("OzonDomains.Models.BitrixStockUnarchiveExecution", b =>
 010824                {
 010825                    b.Navigation("Items");
 010826                });
 10827
 010828            modelBuilder.Entity("OzonDomains.Models.DeliveryProvider", b =>
 010829                {
 010830                    b.Navigation("Deliveries");
 010831                });
 10832
 010833            modelBuilder.Entity("OzonDomains.Models.EmailAttachmentInbox", b =>
 010834                {
 010835                    b.Navigation("ProcessingResults");
 010836                });
 10837
 010838            modelBuilder.Entity("OzonDomains.Models.EmailMessageInbox", b =>
 010839                {
 010840                    b.Navigation("Attachments");
 010841                });
 10842
 010843            modelBuilder.Entity("OzonDomains.Models.ExpenseType", b =>
 010844                {
 010845                    b.Navigation("OrderExtraExpenses");
 010846                });
 10847
 010848            modelBuilder.Entity("OzonDomains.Models.FavoritPartsOrder", b =>
 010849                {
 010850                    b.Navigation("Items");
 010851                });
 10852
 010853            modelBuilder.Entity("OzonDomains.Models.FidStatSnapshot", b =>
 010854                {
 010855                    b.Navigation("Items");
 010856                });
 10857
 010858            modelBuilder.Entity("OzonDomains.Models.ForumAutoOrder", b =>
 010859                {
 010860                    b.Navigation("Items");
 010861                });
 10862
 010863            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.MatchedResult", b =>
 010864                {
 010865                    b.Navigation("MatchedColumns");
 010866
 010867                    b.Navigation("MatchedRows");
 010868                });
 10869
 010870            modelBuilder.Entity("OzonDomains.Models.MatchedRowSys.SavedMatchingColumn", b =>
 010871                {
 010872                    b.Navigation("MatchingColumns");
 010873                });
 10874
 010875            modelBuilder.Entity("OzonDomains.Models.MlAutoOrder", b =>
 010876                {
 010877                    b.Navigation("Items");
 010878                });
 10879
 010880            modelBuilder.Entity("OzonDomains.Models.MlAutoRuOrder", b =>
 010881                {
 010882                    b.Navigation("Items");
 010883                });
 10884
 010885            modelBuilder.Entity("OzonDomains.Models.MoskvorechieIstraOrder", b =>
 010886                {
 010887                    b.Navigation("Items");
 010888                });
 10889
 010890            modelBuilder.Entity("OzonDomains.Models.MotexOrder", b =>
 010891                {
 010892                    b.Navigation("Items");
 010893                });
 10894
 010895            modelBuilder.Entity("OzonDomains.Models.Order", b =>
 010896                {
 010897                    b.Navigation("ExtraExpenses");
 010898
 010899                    b.Navigation("OrderArchive");
 010900
 010901                    b.Navigation("OrderExtensions");
 010902
 010903                    b.Navigation("OrderPrice");
 010904
 010905                    b.Navigation("OzonPromotionSnapshot");
 010906                });
 10907
 010908            modelBuilder.Entity("OzonDomains.Models.OrderCarts.CartStatus", b =>
 010909                {
 010910                    b.Navigation("OrderCarts");
 010911                });
 10912
 010913            modelBuilder.Entity("OzonDomains.Models.OrderCarts.ItemStatus", b =>
 010914                {
 010915                    b.Navigation("OrderItems");
 010916                });
 10917
 010918            modelBuilder.Entity("OzonDomains.Models.OrderCarts.OrderCart", b =>
 010919                {
 010920                    b.Navigation("OrderItems");
 010921                });
 10922
 010923            modelBuilder.Entity("OzonDomains.Models.OrderHistoryOneCPosting", b =>
 010924                {
 010925                    b.Navigation("HistoryLinks");
 010926                });
 10927
 010928            modelBuilder.Entity("OzonDomains.Models.OrderOzonPromotionSnapshot", b =>
 010929                {
 010930                    b.Navigation("Conditions");
 010931                });
 10932
 010933            modelBuilder.Entity("OzonDomains.Models.OrderPrice", b =>
 010934                {
 010935                    b.Navigation("PriceIndexes");
 010936                });
 10937
 010938            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverAct", b =>
 010939                {
 010940                    b.Navigation("Items");
 010941                });
 10942
 010943            modelBuilder.Entity("OzonDomains.Models.OzonHandover.OzonHandoverImportBatch", b =>
 010944                {
 010945                    b.Navigation("Acts");
 010946                });
 10947
 010948            modelBuilder.Entity("OzonDomains.Models.OzonPostingCancellation", b =>
 010949                {
 010950                    b.Navigation("OrderLinks");
 010951                });
 10952
 010953            modelBuilder.Entity("OzonDomains.Models.Product", b =>
 010954                {
 010955                    b.Navigation("ReplacedProducts");
 010956                });
 10957
 010958            modelBuilder.Entity("OzonDomains.Models.ProfitLigaOrder", b =>
 010959                {
 010960                    b.Navigation("Items");
 010961                });
 10962
 010963            modelBuilder.Entity("OzonDomains.Models.ShateMOrder", b =>
 010964                {
 010965                    b.Navigation("Items");
 010966                });
 10967
 010968            modelBuilder.Entity("OzonDomains.Models.SupplierQuotationRequest", b =>
 010969                {
 010970                    b.Navigation("Offers");
 010971                });
 10972
 010973            modelBuilder.Entity("OzonDomains.Models.Transaction", b =>
 010974                {
 010975                    b.Navigation("Orders");
 010976                });
 10977
 010978            modelBuilder.Entity("OzonDomains.Models.WarehouseStockSyncRun", b =>
 010979                {
 010980                    b.Navigation("SnapshotRows");
 010981                });
 10982#pragma warning restore 612, 618
 010983        }
 10984    }
 10985}