Add a CallingPhone column to the ConversationDocument
This commit is contained in:
parent
3d8d16404f
commit
15ce459971
|
|
@ -28,6 +28,8 @@ public class Conversation
|
|||
|
||||
public List<string> Tags { get; set; } = new();
|
||||
|
||||
public string CallingPhone { get; set; }
|
||||
|
||||
public DateTime UpdatedTime { get; set; } = DateTime.UtcNow;
|
||||
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,10 +172,12 @@ public partial class ConversationService : IConversationService
|
|||
{
|
||||
var state = _services.GetRequiredService<IConversationStateService>();
|
||||
var channel = state.GetState("channel");
|
||||
var callingPhone = state.GetState("calling_phone");
|
||||
var sess = new Conversation
|
||||
{
|
||||
Id = _conversationId,
|
||||
Channel = channel,
|
||||
CallingPhone = callingPhone,
|
||||
AgentId = agentId
|
||||
};
|
||||
converation = await NewConversation(sess);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ public class ConversationDocument : MongoBase
|
|||
public string Status { get; set; }
|
||||
public int DialogCount { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
public string CallingPhone { get; set; }
|
||||
public DateTime CreatedTime { get; set; }
|
||||
public DateTime UpdatedTime { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public partial class MongoRepository
|
|||
UserId = !string.IsNullOrEmpty(conversation.UserId) ? conversation.UserId : string.Empty,
|
||||
Title = conversation.Title,
|
||||
Channel = conversation.Channel,
|
||||
CallingPhone = conversation.CallingPhone,
|
||||
TaskId = conversation.TaskId,
|
||||
Status = conversation.Status,
|
||||
Tags = conversation.Tags ?? new(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue