From a640703f2da8815dc26ad1600a6f206be1624379 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 1 Jun 2022 22:10:32 +0200 Subject: feat: Initial after clean slate --- .../src/Endpoints/V1/Entries/EntryQueryPayload.cs | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 server/src/Endpoints/V1/Entries/EntryQueryPayload.cs (limited to 'server/src/Endpoints/V1/Entries/EntryQueryPayload.cs') 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; + +/// +/// Query model for querying time entries. +/// +public class EntryQueryPayload +{ + /// + /// Duration to filter with. + /// + public TimeEntryQueryDuration Duration { get; set; } + + /// + /// List of categories to filter with. + /// + public List Categories { get; set; } + + /// + /// List of labels to filter with. + /// + public List Labels { get; set; } + + /// + /// Date range to filter with, only respected if Duration is set to TimeEntryQueryDuration.DATE_RANGE. + /// + /// + public QueryDateRange DateRange { get; set; } + + /// + /// Spesific date to filter with, only respected if Duration is set to TimeEntryQueryDuration.SPECIFIC_DATE. + /// + /// + public DateTime SpecificDate { get; set; } + + /// + /// Optional page number to show, goes well with PageSize. + /// + public int Page { get; set; } + + /// + /// Optional page size to show, goes well with Page. + /// + public int PageSize { get; set; } + + /// + /// Represents a date range. + /// + public class QueryDateRange + { + /// + /// Range start + /// + public DateTime From { get; set; } + + /// + /// Range end + /// + public DateTime To { get; set; } + } +} -- cgit v1.3