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

58 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using LittleShop.Enums;
namespace LittleShop.Models;
public class Bot
{
public Guid Id { get; set; }
[Required]
[StringLength(256)]
public string BotKey { get; set; } = string.Empty;
[Required]
[StringLength(100)]
public string Name { get; set; } = string.Empty;
[StringLength(500)]
public string Description { get; set; } = string.Empty;
public BotType Type { get; set; }
public BotStatus Status { get; set; }
public string Settings { get; set; } = "{}"; // JSON storage
public DateTime CreatedAt { get; set; }
public DateTime? LastSeenAt { get; set; }
public DateTime? LastConfigSyncAt { get; set; }
public bool IsActive { get; set; }
[StringLength(50)]
public string Version { get; set; } = string.Empty;
[StringLength(50)]
public string IpAddress { get; set; } = string.Empty;
[StringLength(100)]
public string PlatformUsername { get; set; } = string.Empty;
[StringLength(200)]
public string PlatformDisplayName { get; set; } = string.Empty;
[StringLength(100)]
public string PlatformId { get; set; } = string.Empty;
[StringLength(50)]
public string PersonalityName { get; set; } = string.Empty;
// Navigation properties
public virtual ICollection<BotMetric> Metrics { get; set; } = new List<BotMetric>();
public virtual ICollection<BotSession> Sessions { get; set; } = new List<BotSession>();
}