diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-01 22:10:32 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-01 22:10:32 +0200 |
| commit | a640703f2da8815dc26ad1600a6f206be1624379 (patch) | |
| tree | dbda195fb5783d16487e557e06471cf848b75427 /server/src/Endpoints/V1/Entries/EntryQueryPayload.cs | |
| download | greatoffice-a640703f2da8815dc26ad1600a6f206be1624379.tar.xz greatoffice-a640703f2da8815dc26ad1600a6f206be1624379.zip | |
feat: Initial after clean slate
Diffstat (limited to 'server/src/Endpoints/V1/Entries/EntryQueryPayload.cs')
| -rw-r--r-- | server/src/Endpoints/V1/Entries/EntryQueryPayload.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/server/src/Endpoints/V1/Entries/EntryQueryPayload.cs b/server/src/Endpoints/V1/Entries/EntryQueryPayload.cs new file mode 100644 index 0000000..763ac8b --- /dev/null +++ b/server/src/Endpoints/V1/Entries/EntryQueryPayload.cs @@ -0,0 +1,60 @@ +namespace IOL.GreatOffice.Api.Endpoints.V1.Entries; + +/// <summary> +/// Query model for querying time entries. +/// </summary> +public class EntryQueryPayload +{ + /// <summary> + /// Duration to filter with. + /// </summary> + public TimeEntryQueryDuration Duration { get; set; } + + /// <summary> + /// List of categories to filter with. + /// </summary> + public List<TimeCategory.TimeCategoryDto> Categories { get; set; } + + /// <summary> + /// List of labels to filter with. + /// </summary> + public List<TimeLabel.TimeLabelDto> Labels { get; set; } + + /// <summary> + /// Date range to filter with, only respected if Duration is set to TimeEntryQueryDuration.DATE_RANGE. + /// </summary> + /// <see cref="TimeEntryQueryDuration"/> + public QueryDateRange DateRange { get; set; } + + /// <summary> + /// Spesific date to filter with, only respected if Duration is set to TimeEntryQueryDuration.SPECIFIC_DATE. + /// </summary> + /// <see cref="TimeEntryQueryDuration"/> + public DateTime SpecificDate { get; set; } + + /// <summary> + /// Optional page number to show, goes well with PageSize. + /// </summary> + public int Page { get; set; } + + /// <summary> + /// Optional page size to show, goes well with Page. + /// </summary> + public int PageSize { get; set; } + + /// <summary> + /// Represents a date range. + /// </summary> + public class QueryDateRange + { + /// <summary> + /// Range start + /// </summary> + public DateTime From { get; set; } + + /// <summary> + /// Range end + /// </summary> + public DateTime To { get; set; } + } +} |
