< Summary

Information
Class: OzonDomains.Models.TransactionTimeTrackingResult
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/TransactionTimeTrackingModels.cs
Line coverage
93%
Covered lines: 14
Uncovered lines: 1
Coverable lines: 15
Total lines: 90
Line coverage: 93.3%
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
get_Id()100%11100%
get_TrackingSessionId()100%11100%
get_TrackingKey()100%11100%
get_UserName()100%11100%
get_AccessProfileId()100%11100%
get_TransactionType()100%11100%
get_OrdersCountFinal()100%11100%
get_StartedAtUtc()100%11100%
get_CompletedAtUtc()100%11100%
get_DurationSeconds()100%11100%
get_TransactionId()100%11100%
get_TransactionUrl()100%11100%
get_Comment()100%11100%
get_CreatedAtUtc()100%11100%
get_TrackingSession()100%210%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("TransactionTimeTrackingSessions")]
 7public class TransactionTimeTrackingSession
 8{
 9    [Key]
 10    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 11    public long Id { get; set; }
 12
 13    [Required]
 14    [MaxLength(64)]
 15    public string TrackingKey { get; set; } = string.Empty;
 16
 17    [Required]
 18    [MaxLength(256)]
 19    public string UserName { get; set; } = string.Empty;
 20
 21    public int? AccessProfileId { get; set; }
 22
 23    [Required]
 24    [MaxLength(64)]
 25    public string TransactionType { get; set; } = string.Empty;
 26
 27    public int OrdersCountInitial { get; set; }
 28
 29    [Column(TypeName = "longtext")]
 30    public string? OrderIdsJson { get; set; }
 31
 32    public DateTime StartedAtUtc { get; set; } = DateTime.UtcNow;
 33    public DateTime? LastSeenAtUtc { get; set; }
 34    public bool IsCompleted { get; set; }
 35    public DateTime? CompletedAtUtc { get; set; }
 36    public bool IsAbandoned { get; set; }
 37
 38    [MaxLength(1000)]
 39    public string? SourceUrl { get; set; }
 40
 41    [MaxLength(64)]
 42    public string? ClientIp { get; set; }
 43
 44    [MaxLength(512)]
 45    public string? UserAgent { get; set; }
 46
 47    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 48}
 49
 50[Table("TransactionTimeTrackingResults")]
 51public class TransactionTimeTrackingResult
 52{
 53    [Key]
 54    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 955    public long Id { get; set; }
 56
 957    public long? TrackingSessionId { get; set; }
 58
 59    [Required]
 60    [MaxLength(64)]
 1761    public string TrackingKey { get; set; } = string.Empty;
 62
 63    [Required]
 64    [MaxLength(256)]
 1865    public string UserName { get; set; } = string.Empty;
 66
 967    public int? AccessProfileId { get; set; }
 68
 69    [Required]
 70    [MaxLength(64)]
 1871    public string TransactionType { get; set; } = string.Empty;
 72
 1173    public int OrdersCountFinal { get; set; }
 974    public DateTime StartedAtUtc { get; set; }
 975    public DateTime CompletedAtUtc { get; set; }
 1276    public int DurationSeconds { get; set; }
 1177    public long TransactionId { get; set; }
 78
 79    [Required]
 80    [MaxLength(1000)]
 1781    public string TransactionUrl { get; set; } = string.Empty;
 82
 83    [MaxLength(1000)]
 1184    public string? Comment { get; set; }
 85
 1686    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 87
 88    [ForeignKey(nameof(TrackingSessionId))]
 089    public virtual TransactionTimeTrackingSession? TrackingSession { get; set; }
 90}