first things

This commit is contained in:
Roland Fieger
2021-09-22 12:37:40 +02:00
parent 074df0adec
commit 5e15db793b
53 changed files with 2065 additions and 229 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Datamodels.BusinessModels
{
public enum GeneralResults
{
Success = 0,
DatabaseError = 1,
GeneralError = 2,
LogicWarning = 3,
Created = 4,
Updated = 5,
Deleted = 6
}
public class ResultObject
{
public GeneralResults GeneralResult { get; set; } = GeneralResults.Success;
public string UserMessage { get; set; }
public string ServerMessage { get; set; }
public string StackTrace { get; set; }
}
public class DataResult<T> : ResultObject
{
public T Data { get; set; }
public long TotalCount { get; set; }
public long Skip { get; set; }
public long Take { get; set; }
public TimeSpan Duration { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
namespace Datamodels.BusinessModels
{
public enum SortDirections
{
Ascending,
Descending
}
public sealed class SortModel
{
public int SortFieldOrder { get; set; }
public string SortFieldName { get; set; }
public SortDirections SortDirection { get; set; } = SortDirections.Ascending;
}
}