BotSharp/src/Infrastructure/BotSharp.Abstraction/Crontab/Models/CrontabItem.cs

25 lines
700 B
C#
Raw Normal View History

2024-12-09 00:29:04 +00:00
namespace BotSharp.Abstraction.Crontab.Models;
2024-12-03 22:52:14 +00:00
2024-12-05 17:11:16 +00:00
public class CrontabItem : ScheduleTaskArgs
2024-12-03 22:52:14 +00:00
{
2024-12-09 00:29:04 +00:00
[JsonPropertyName("user_id")]
2024-12-03 22:52:14 +00:00
public string UserId { get; set; } = null!;
2024-12-09 00:29:04 +00:00
[JsonPropertyName("agent_id")]
2024-12-03 22:52:14 +00:00
public string AgentId { get; set; } = null!;
2024-12-09 00:29:04 +00:00
[JsonPropertyName("conversation_id")]
2024-12-05 17:11:16 +00:00
public string ConversationId { get; set; } = null!;
2024-12-09 00:29:04 +00:00
[JsonPropertyName("execution_result")]
2024-12-05 17:11:16 +00:00
public string ExecutionResult { get; set; } = null!;
2024-12-03 22:52:14 +00:00
2024-12-09 00:29:04 +00:00
[JsonPropertyName("created_time")]
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
2024-12-03 22:52:14 +00:00
public override string ToString()
{
2024-12-10 18:30:41 +00:00
return $"{Title}: {Description} [AgentId: {AgentId}, UserId: {UserId}]";
2024-12-03 22:52:14 +00:00
}
}