< Summary

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

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Models/RemoteService.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
 8namespace Api.Auth.Models;
 9
 10[Table("remote_services")]
 11public class RemoteService : IEntityMetadata
 12{
 113    public static string TheInstanceServiceName => "The Instance Service";
 14    public static Guid TheInstanceServiceId =>
 115        new Guid("00000000-0000-7000-8000-000000000000").WithPostfix(IdPostfix);
 16
 117    public static byte IdPostfix => (byte)IdPostfixes.RemoteService;
 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    public required string Name { get; set; }
 26
 27    public bool IsInstanceService { get; set; }
 28
 129    public List<string> AllowedJobs { get; set; } = [];
 30    public required UserPermissionBits DefaultInstanceWidePermisssion { get; set; }
 31
 32    [ForeignKey(nameof(Owner))]
 33    public Guid? OwnerId { get; set; }
 34
 35    // Navigation Properties
 36    public UserEF? Owner { get; set; }
 137    public List<RemoteServiceUserPermission> UserPermissions { get; set; } = null!;
 38}