refactor: reorganize Application layer into folder structure
This commit is contained in:
39
src/GreenHome.Application/Interfaces/IAIQueryService.cs
Normal file
39
src/GreenHome.Application/Interfaces/IAIQueryService.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using GreenHome.Domain;
|
||||
|
||||
namespace GreenHome.Application;
|
||||
|
||||
/// <summary>
|
||||
/// Service for managing AI queries and their history
|
||||
/// </summary>
|
||||
public interface IAIQueryService
|
||||
{
|
||||
/// <summary>
|
||||
/// Saves an AI query to the database
|
||||
/// </summary>
|
||||
Task<AIQuery> SaveQueryAsync(AIQuery query, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets AI query history for a specific device
|
||||
/// </summary>
|
||||
Task<List<AIQuery>> GetDeviceQueriesAsync(int deviceId, int take = 50, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets AI query history for a specific user
|
||||
/// </summary>
|
||||
Task<List<AIQuery>> GetUserQueriesAsync(int userId, int take = 50, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets total token usage for a device
|
||||
/// </summary>
|
||||
Task<int> GetDeviceTotalTokensAsync(int deviceId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets total token usage for a user
|
||||
/// </summary>
|
||||
Task<int> GetUserTotalTokensAsync(int userId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets AI query statistics (totals, averages, today's usage)
|
||||
/// </summary>
|
||||
Task<AIQueryStats> GetStatsAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user