| Class: | Api.Works.DTOs.TagGetDTO |
|---|---|
| Assembly: | Api |
| File(s): | /home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Works/DTOs/TagDTOs.cs |
| Covered lines: | 0 |
|---|---|
| Uncovered lines: | 9 |
| Coverable lines: | 9 |
| Total lines: | 43 |
| Line coverage: | 0% |
| 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% | 2 | 1 | 0% |
| # | 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; | |||
6 | | |||
7 | using Api.Works.Models; | |||
8 | | |||
9 | using Riok.Mapperly.Abstractions; | |||
10 | | |||
11 | namespace Api.Works.DTOs; | |||
12 | | |||
13 | public record class TagQueryDTO( | |||
14 | string[] TagTypes, | |||
15 | TagSortOption[] SortOptions, | |||
16 | Guid[] WorkIds, | |||
17 | Guid[] TagIds, | |||
18 | [Range(0, 1000)] int PageSize = 30, | |||
19 | [Range(1, int.MaxValue)] int Page = 1 | |||
20 | ); | |||
21 | | |||
22 | public enum TagSortOption | |||
23 | { | |||
24 | Id, | |||
25 | TagType, | |||
26 | TagName | |||
27 | } | |||
28 | | |||
| 0 | 29 | public record TagGetDTO( | ||
| 0 | 30 | Guid Id, | ||
| 0 | 31 | int RowVersion, | ||
| 0 | 32 | NodaTime.Instant MetadataAddedAt, | ||
| 0 | 33 | NodaTime.Instant MetadataUpdatedAt, | ||
| 0 | 34 | | ||
| 0 | 35 | string TagType, | ||
| 0 | 36 | string TagName | ||
| 0 | 37 | ) : IEntityMetadata; | ||
38 | | |||
39 | [Mapper] | |||
40 | public static partial class TagGetDTOMapper | |||
41 | { | |||
42 | public static partial IQueryable<TagGetDTO> ProjectToDTO(this IQueryable<WorkTag> q); | |||
43 | } |