BotSharp/src/Plugins/BotSharp.Plugin.MongoStorage/Models/ChannelInstructionMongoElement.cs
2025-02-08 15:49:26 -06:00

29 lines
802 B
C#

using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements(Inherited = true)]
public class ChannelInstructionMongoElement
{
public string Channel { get; set; }
public string Instruction { get; set; }
public static ChannelInstructionMongoElement ToMongoElement(ChannelInstruction instruction)
{
return new ChannelInstructionMongoElement
{
Channel = instruction.Channel,
Instruction = instruction.Instruction
};
}
public static ChannelInstruction ToDomainElement(ChannelInstructionMongoElement instruction)
{
return new ChannelInstruction
{
Channel = instruction.Channel,
Instruction = instruction.Instruction
};
}
}