This commit is contained in:
Meik
2025-11-11 11:03:42 +01:00
commit dc3e8a2e4c
582 changed files with 191465 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
namespace FasdDesktopUi.Basics.Services.Models
{
public sealed class TicketOverviewCountsChangedEventArgs : EventArgs
{
public TicketOverviewCountsChangedEventArgs(IReadOnlyList<TileCountChange> changes, IReadOnlyDictionary<string, TileCounts> currentCounts)
{
Changes = changes;
CurrentCounts = currentCounts;
}
public IReadOnlyList<TileCountChange> Changes { get; }
public IReadOnlyDictionary<string, TileCounts> CurrentCounts { get; }
}
public readonly struct TileCountChange
{
public TileCountChange(string key, TileScope scope, int oldCount, int newCount)
{
Key = key;
Scope = scope;
OldCount = oldCount;
NewCount = newCount;
}
public string Key { get; }
public TileScope Scope { get; }
public int OldCount { get; }
public int NewCount { get; }
public int Delta => NewCount - OldCount;
}
public readonly struct TileCounts
{
public static TileCounts Empty => new TileCounts(0, 0);
public TileCounts(int personal, int role)
{
Personal = personal;
Role = role;
}
public int Personal { get; }
public int Role { get; }
}
public enum TileScope
{
Personal,
Role
}
}