< Summary

Information
Class: OzonDomains.Models.OzonChatResponseTime
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/OzonChatResponseTime.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 59
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
get_Id()100%210%
get_ChatId()100%210%
get_ClientId()100%210%
get_UserName()100%210%
get_Minutes()100%210%
get_RecordedAt()100%210%
get_CreatedAt()100%210%
get_Client()100%210%

File(s)

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

#LineLine coverage
 1using System;
 2using System.ComponentModel.DataAnnotations;
 3using System.ComponentModel.DataAnnotations.Schema;
 4
 5namespace OzonDomains.Models
 6{
 7    /// <summary>
 8    /// Ручной трекинг времени ответа менеджера/пользователя на чат Ozon.
 9    /// Пользователь сам указывает затраченное время (в минутах).
 10    /// </summary>
 11    [Table("OzonChatResponseTimes")]
 12    public class OzonChatResponseTime
 13    {
 14        [Key]
 15        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 016        public long Id { get; set; }
 17
 18        /// <summary>
 19        /// ID чата в системе Ozon
 20        /// </summary>
 21        [Required]
 22        [MaxLength(100)]
 023        public string ChatId { get; set; } = string.Empty;
 24
 25        /// <summary>
 26        /// ID клиента Ozon в нашей системе
 27        /// </summary>
 28        [Required]
 029        public int ClientId { get; set; }
 30
 31        /// <summary>
 32        /// Имя пользователя, который указал время
 33        /// </summary>
 34        [Required]
 35        [MaxLength(200)]
 036        public string UserName { get; set; } = string.Empty;
 37
 38        /// <summary>
 39        /// Затраченное время в минутах
 40        /// </summary>
 41        [Required]
 042        public int Minutes { get; set; }
 43
 44        /// <summary>
 45        /// Дата и время, когда запись была сделана (UTC)
 46        /// </summary>
 47        [Required]
 048        public DateTime RecordedAt { get; set; } = DateTime.UtcNow;
 49
 50        /// <summary>
 51        /// Дата создания записи в БД
 52        /// </summary>
 053        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 54
 55        // навигация
 56        [ForeignKey(nameof(ClientId))]
 057        public virtual OzonClient? Client { get; set; }
 58    }
 59}