< Summary

Information
Class: OzonDomains.Models.BackgroundJobSchedule
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/BackgroundJobSchedule.cs
Line coverage
84%
Covered lines: 11
Uncovered lines: 2
Coverable lines: 13
Total lines: 45
Line coverage: 84.6%
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_Name()100%11100%
get_JobType()100%11100%
get_CronExpression()100%11100%
get_IsActive()100%11100%
get_LastRunTime()100%210%
get_NextRunTime()100%11100%
get_OzonClientId()100%11100%
get_DaysBack()100%11100%
get_CreatedAt()100%11100%
get_UpdatedAt()100%11100%
get_OzonClient()100%210%
get_Executions()100%11100%

File(s)

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

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2using System.ComponentModel.DataAnnotations.Schema;
 3
 4namespace OzonDomains.Models;
 5
 6[Table("BackgroundJobSchedules")]
 7public class BackgroundJobSchedule
 8{
 9    [Key]
 10    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 5511    public int Id { get; set; }
 12
 13    [Required]
 14    [MaxLength(200)]
 3615    public string Name { get; set; } = string.Empty;
 16
 17    [Required]
 18    [MaxLength(100)]
 4319    public string JobType { get; set; } = string.Empty;
 20
 21    [Required]
 22    [MaxLength(100)]
 4723    public string CronExpression { get; set; } = string.Empty;
 24
 3325    public bool IsActive { get; set; } = true;
 26
 027    public DateTime? LastRunTime { get; set; }
 28
 1329    public DateTime? NextRunTime { get; set; }
 30
 231    public int? OzonClientId { get; set; }
 32
 33    /// <summary>Для TransactionJobs всегда 1 — вчера по MSK.</summary>
 34    [Range(1, 1, ErrorMessage = "День отбора: только 1 (вчера).")]
 3435    public int DaysBack { get; set; } = 1;
 36
 2037    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
 38
 3039    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 40
 41    [ForeignKey(nameof(OzonClientId))]
 042    public virtual OzonClient? OzonClient { get; set; }
 43
 1444    public virtual ICollection<BackgroundJobExecution> Executions { get; set; } = new List<BackgroundJobExecution>();
 45}