< Summary

Information
Class: OzonDomains.Models.Partners.Partner
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Partners/Partner.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 57
Line coverage: 100%
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_Email()100%11100%
get_Login()100%11100%
get_PasswordHash()100%11100%
get_GoogleEmail()100%11100%
get_IsActive()100%11100%
get_SecurityStamp()100%11100%
get_FailedLoginCount()100%11100%
get_LockoutUntilUtc()100%11100%
get_LastLoginAtUtc()100%11100%
get_CreatedAtUtc()100%11100%
get_NotificationChannels()100%11100%
get_NotificationEmail()100%11100%
get_TelegramChatId()100%11100%
get_Rules()100%11100%
get_Permissions()100%11100%
get_LoginCodes()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Partners/Partner.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace OzonDomains.Models.Partners;
 4
 5/// <summary>Партнёр: внешний пользователь кабинета PartnerOffice. Одна компания — один логин.</summary>
 6public class Partner
 7{
 2408    public long Id { get; set; }
 9
 10    /// <summary>Название компании, для отображения владельцу.</summary>
 11    [MaxLength(200)]
 16312    public string Name { get; set; } = null!;
 13
 14    /// <summary>Почта партнёра: на неё приходят приглашение и коды входа. Нижний регистр, уникальна.</summary>
 15    [MaxLength(320)]
 20716    public string? Email { get; set; }
 17
 18    /// <summary>Устарело: вход по паролю убран. Остаётся техническим идентификатором для журнала аудита.</summary>
 19    [MaxLength(100)]
 14220    public string Login { get; set; } = null!;
 21
 22    /// <summary>Устарело: вход по паролю убран. У новых партнёров пусто.</summary>
 23    [MaxLength(500)]
 9324    public string PasswordHash { get; set; } = null!;
 25
 26    /// <summary>Google-почта. Если указана, партнёр может входить через Google.</summary>
 27    [MaxLength(320)]
 8728    public string? GoogleEmail { get; set; }
 29
 20030    public bool IsActive { get; set; } = true;
 31
 32    /// <summary>Меняется при смене пароля и блокировке: сессии со старым значением недействительны.</summary>
 33    [MaxLength(64)]
 10534    public string SecurityStamp { get; set; } = Guid.NewGuid().ToString("N");
 35
 4636    public int FailedLoginCount { get; set; }
 37
 4138    public DateTime? LockoutUntilUtc { get; set; }
 39
 5440    public DateTime? LastLoginAtUtc { get; set; }
 41
 14442    public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
 43
 5244    public PartnerNotificationChannels NotificationChannels { get; set; } = PartnerNotificationChannels.None;
 45
 46    [MaxLength(320)]
 5247    public string? NotificationEmail { get; set; }
 48
 49    [MaxLength(64)]
 5250    public string? TelegramChatId { get; set; }
 51
 15452    public List<PartnerRule> Rules { get; set; } = new();
 53
 16154    public List<PartnerPermission> Permissions { get; set; } = new();
 55
 9756    public List<PartnerLoginCode> LoginCodes { get; set; } = new();
 57}