< Summary

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

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/RemoteServiceUserPermission.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.Schema;
 6using Microsoft.EntityFrameworkCore;
 7using NodaTime;
 8
 9namespace Api.Auth.Models;
 10
 11[PrimaryKey(nameof(RemoteServiceId), nameof(UserId))]
 12public class RemoteServiceUserPermission : ITokenTime
 13{
 14    [ForeignKey(nameof(RemoteService))]
 15    public Guid RemoteServiceId { get; set; }
 16
 17    [ForeignKey(nameof(User))]
 18    public Guid UserId { get; set; }
 19
 20    public required UserPermissionBits Permissions { get; set; }
 21
 22    public Instant CreationTime { get; set; }
 23
 24    public Instant? LastUsed { get; set; }
 25
 26    // Navigation Properties
 127    public RemoteService RemoteService { get; set; } = null;
 128    public UserEF User { get; set; } = null!;
 29}

Methods/Properties

.ctor()