littleshop/LittleShop/DTOs/BotSessionDto.cs
2025-08-27 18:02:39 +01:00

54 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
namespace LittleShop.DTOs;
public class BotSessionDto
{
public Guid Id { get; set; }
public Guid BotId { get; set; }
public string SessionIdentifier { get; set; } = string.Empty;
public string Platform { get; set; } = string.Empty;
public DateTime StartedAt { get; set; }
public DateTime LastActivityAt { get; set; }
public DateTime? EndedAt { get; set; }
public int OrderCount { get; set; }
public int MessageCount { get; set; }
public decimal TotalSpent { get; set; }
public string Language { get; set; } = string.Empty;
public string Country { get; set; } = string.Empty;
public bool IsAnonymous { get; set; }
public Dictionary<string, object> Metadata { get; set; } = new();
}
public class CreateBotSessionDto
{
public string SessionIdentifier { get; set; } = string.Empty;
public string Platform { get; set; } = string.Empty;
public string Language { get; set; } = "en";
public string Country { get; set; } = string.Empty;
public bool IsAnonymous { get; set; } = true;
public Dictionary<string, object> Metadata { get; set; } = new();
}
public class UpdateBotSessionDto
{
public int? OrderCount { get; set; }
public int? MessageCount { get; set; }
public decimal? TotalSpent { get; set; }
public bool? EndSession { get; set; }
public Dictionary<string, object>? Metadata { get; set; }
}
public class BotSessionSummaryDto
{
public int TotalSessions { get; set; }
public int ActiveSessions { get; set; }
public int CompletedSessions { get; set; }
public decimal AverageSessionDuration { get; set; } // in minutes
public decimal AverageOrdersPerSession { get; set; }
public decimal AverageSpendPerSession { get; set; }
public Dictionary<string, int> SessionsByPlatform { get; set; } = new();
public Dictionary<string, int> SessionsByCountry { get; set; } = new();
public Dictionary<string, int> SessionsByLanguage { get; set; } = new();
}