< Summary

Information
Class: OzonDomains.Models.ColumnMapping
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ColumnMapping.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 45
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/ColumnMapping.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.ComponentModel.DataAnnotations;
 4using System.ComponentModel.DataAnnotations.Schema;
 5using System.Text.Json;
 6
 7namespace OzonDomains.Models
 8{
 9    public class ColumnMapping
 10    {
 21011        public int Id { get; set; }
 12
 13        [MaxLength(50)]
 28214        public string MappingName { get; set; } = null!;
 15
 15516        public int? SelectedClientId { get; set; }
 317        public virtual OzonClient? SelectedClient { get; set; } = null;
 18
 15519        public string? SelectedStatus { get; set; }
 20
 15521        public int? SelectedManufacturerId { get; set; }
 322        public virtual Manufacturer? SelectedManufacturer { get; set; } = null;
 23
 15524        public int? SelectedWarehouseId { get; set; }
 325        public virtual Warehouse? SelectedWarehouse { get; set; }  = null;
 26
 15527        public int? SelectedSupplierId { get; set; }
 328        public virtual Supplier? SelectedSupplier { get; set; } = null;
 29
 15530        public CurrencyCode? SelectedCurrencyCode { get; set; }
 31
 32        [NotMapped]
 33033        public Dictionary<string, string> ColumnMappings { get; set; } = new();
 34
 35        public string ColumnMappingsSerialized
 36        {
 137            get => JsonSerializer.Serialize(ColumnMappings);
 238            set => ColumnMappings = JsonSerializer.Deserialize<Dictionary<string, string>>(value) ?? new();
 39        }
 40
 15541        public bool ManufacturerFromArticle {  get; set; } = false;
 42
 43    }
 44
 45}