< Summary

Information
Class: Api.Auth.Models.UserEF
Assembly: Api
File(s): /home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/User.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 38
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_IdPostfix()100%11100%
.ctor()100%11100%

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/User.cs

#LineLine coverage
 1// SPDX-FileCopyrightText: 2026 Alper Çelik <alper@alper-celik.dev>
 2//
 3// SPDX-License-Identifier: AGPL-3.0-or-later
 4
 5using System.ComponentModel.DataAnnotations;
 6using System.ComponentModel.DataAnnotations.Schema;
 7using Microsoft.EntityFrameworkCore;
 8using Microsoft.EntityFrameworkCore.Metadata.Builders;
 9
 10namespace Api.Auth.Models;
 11
 12[Table("users")]
 13[Index(nameof(Email), IsUnique = true)]
 14[Index(nameof(Admin))]
 15public class UserEF : IEntityMetadata
 16{
 117    public static byte IdPostfix => (byte)IdPostfixes.User;
 18
 19    [Key]
 20    public Guid Id { get; set; }
 21    public int RowVersion { get; set; }
 22    public NodaTime.Instant MetadataAddedAt { get; set; }
 23    public NodaTime.Instant MetadataUpdatedAt { get; set; }
 24
 25    [EmailAddress]
 26    public required string Email { get; set; }
 27
 128    public bool EmailVerified { get; set; } = false;
 29
 30    public required string PasswordHash { get; set; }
 31
 132    public bool Admin { get; set; } = false;
 33}
 34
 35public class UserEntityTypeConfiguration : IEntityTypeConfiguration<UserEF>
 36{
 37    public void Configure(EntityTypeBuilder<UserEF> builder) { }
 38}

Methods/Properties

get_IdPostfix()
.ctor()