mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-26 23:49:57 +01:00
* Add reporting feature * Remove nodatime * Add summaries * work... * Add chart title * Fix error * Allow to set hour in the field * UI updates * Fix fake data * ViewDefinitions can be dynamic * Add items sold * Sticky table headers * Update JS and remove jQuery usages * JS click fix * Handle tag all invoices for app * fix dup row in items report * Can cancel invoice request * Add tests * Fake data for items sold * Rename Items to Products, improve navigation F5 * Use bordered table for summaries --------- Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
34 lines
885 B
C#
34 lines
885 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace BTCPayServer.Services.Reporting
|
|
{
|
|
public record QueryContext
|
|
{
|
|
public QueryContext(string storeId, DateTimeOffset from, DateTimeOffset to)
|
|
{
|
|
StoreId = storeId;
|
|
From = from;
|
|
To = to;
|
|
}
|
|
public string StoreId { get; }
|
|
public DateTimeOffset From { get; }
|
|
public DateTimeOffset To { get; }
|
|
public ViewDefinition? ViewDefinition { get; set; }
|
|
|
|
public IList<object> AddData()
|
|
{
|
|
var l = CreateData();
|
|
Data.Add(l);
|
|
return l;
|
|
}
|
|
|
|
public IList<object> CreateData()
|
|
{
|
|
return new List<object>(ViewDefinition.Fields.Count);
|
|
}
|
|
|
|
public IList<IList<object>> Data { get; set; } = new List<IList<object>>();
|
|
}
|
|
}
|