< Summary

Information
Class: OzonRepositories.Migrations.ApplicationDbContextModelSnapshot
Assembly: OzonRepositories
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/ApplicationDbContextModelSnapshot.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 11840
Coverable lines: 11840
Total lines: 12199
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
BuildModel(...)100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonRepositories/Migrations/ApplicationDbContextModelSnapshot.cs

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