2018-09-28 22:25:55 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Platform.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Standard agent data structure
|
|
|
|
|
|
/// All other platform agent has to align with this standard data structure.
|
|
|
|
|
|
/// </summary>
|
2018-09-29 18:18:34 +00:00
|
|
|
|
public class StandardAgent : AgentBase
|
2018-09-28 22:25:55 +00:00
|
|
|
|
{
|
|
|
|
|
|
public StandardAgent()
|
|
|
|
|
|
{
|
|
|
|
|
|
CreatedDate = DateTime.UtcNow;
|
2018-09-29 18:18:34 +00:00
|
|
|
|
Entities = new List<EntityBase>();
|
|
|
|
|
|
Intents = new List<IntentBase>();
|
2018-09-28 22:25:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Is the chatbot public or private
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Boolean Published { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Only access text/ audio rquest
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StringLength(32)]
|
|
|
|
|
|
public String ClientAccessToken { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Developer can access more APIs
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StringLength(32)]
|
|
|
|
|
|
public String DeveloperAccessToken { get; set; }
|
|
|
|
|
|
|
2018-09-29 18:18:34 +00:00
|
|
|
|
public List<IntentBase> Intents { get; set; }
|
2018-09-28 22:25:55 +00:00
|
|
|
|
|
2018-09-29 18:18:34 +00:00
|
|
|
|
public List<EntityBase> Entities { get; set; }
|
2018-09-28 22:25:55 +00:00
|
|
|
|
|
|
|
|
|
|
public String Birthday
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return CreatedDate.ToShortDateString();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DateTime CreatedDate { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|