| Class: | Api.Auth.Models.RemoteServiceUserPermission |
|---|---|
| Assembly: | Api |
| File(s): | /home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/RemoteServiceUserPermission.cs |
| Covered lines: | 2 |
|---|---|
| Uncovered lines: | 0 |
| Coverable lines: | 2 |
| Total lines: | 29 |
| Line coverage: | 100% |
| Covered branches: | 0 |
|---|---|
| Total branches: | 0 |
| Branch coverage: | N/A |
Feature is only available for sponsors
Upgrade to PRO version| Method | Branch coverage | Crap Score | Cyclomatic complexity | Line coverage |
|---|---|---|---|---|
| .ctor() | 100% | 1 | 1 | 100% |
| # | Line | Line coverage | ||
|---|---|---|---|---|
1 | // SPDX-FileCopyrightText: 2026 Alper Çelik <[email protected]> | |||
2 | // | |||
3 | // SPDX-License-Identifier: AGPL-3.0-or-later | |||
4 | | |||
5 | using System.ComponentModel.DataAnnotations.Schema; | |||
6 | using Microsoft.EntityFrameworkCore; | |||
7 | using NodaTime; | |||
8 | | |||
9 | namespace Api.Auth.Models; | |||
10 | | |||
11 | [PrimaryKey(nameof(RemoteServiceId), nameof(UserId))] | |||
12 | public 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 | |||
| 1 | 27 | public RemoteService RemoteService { get; set; } = null; | ||
| 1 | 28 | public UserEF User { get; set; } = null!; | ||
29 | } |