< Summary

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

File(s)

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

#LineLine coverage
 1// SPDX-FileCopyrightText: 2026 Alper Çelik <[email protected]>
 2//
 3// SPDX-License-Identifier: AGPL-3.0-or-later
 4
 5using System.ComponentModel.DataAnnotations;
 6using System.ComponentModel.DataAnnotations.Schema;
 7
 8using Microsoft.EntityFrameworkCore;
 9using Microsoft.EntityFrameworkCore.Metadata.Builders;
 10
 11namespace Api.Auth.Models;
 12
 13[Table("users")]
 14[Index(nameof(Email), IsUnique = true)]
 15public class User
 16{
 17    public const string UserHandleAcceptedRegex = @"^[a-zA-Z0-9_\-]{3,30}$";
 18
 19    [Key]
 20    public Guid Id { get; set; }
 21
 22    [EmailAddress]
 23    public required string Email { get; set; }
 24
 025    public bool EmailVerified { get; set; } = false;
 26
 27    public required string PasswordHash { get; set; }
 28
 029    public bool Admin { get; set; } = false;
 30}
 31
 32public class UserEntityTypeConfiguration : IEntityTypeConfiguration<User>
 33{
 34    public void Configure(EntityTypeBuilder<User> builder)
 35    {
 36    }
 37}

Methods/Properties

.ctor()