Add customer communication system

This commit is contained in:
sysadmin
2025-08-27 18:02:39 +01:00
parent 1f7c0af497
commit eae5be3e7c
136 changed files with 14552 additions and 97 deletions

View File

@@ -0,0 +1,44 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace LittleShop.Models;
public class BotSession
{
public Guid Id { get; set; }
[Required]
public Guid BotId { get; set; }
[Required]
[StringLength(256)]
public string SessionIdentifier { get; set; } = string.Empty; // Hashed user ID
[StringLength(100)]
public string Platform { get; set; } = string.Empty; // Telegram, Discord, etc.
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; }
[StringLength(50)]
public string Language { get; set; } = "en";
[StringLength(100)]
public string Country { get; set; } = string.Empty;
public bool IsAnonymous { get; set; }
public string Metadata { get; set; } = "{}"; // JSON for additional session data
// Navigation property
public virtual Bot Bot { get; set; } = null!;
}