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