Repository navigation
Expand file tree
/
Copy pathIntent.cs
More file actions
52 lines (44 loc) · 1.37 KB
/
Copy pathIntent.cs
File metadata and controls
52 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
namespace BotSharp.Platform.Models.Intents
{
/// <summary>
/// Intent Table
/// </summary>
public class Intent
{
[Required]
[StringLength(36)]
public String AgentId { get; set; }
[MaxLength(64)]
public String Name { get; set; }
[MaxLength(256)]
public String Description { get; set; }
[ForeignKey("IntentId")]
public List<IntentInputContext> Contexts { get; set; }
[ForeignKey("IntentId")]
public List<IntentEvent> Events { get; set; }
/// <summary>
/// Get input contexts hash
/// </summary>
[NotMapped]
public String ContextHash
{
get
{
return string.Empty;
/*return Contexts == null || Contexts.Count == 0
? Guid.Empty.ToString("N")
: $"{String.Join(",", Contexts.OrderBy(x => x.Name).Select(x => x.Name))}".GetMd5Hash();*/
}
}
[ForeignKey("IntentId")]
public List<IntentExpression> UserSays { get; set; }
[ForeignKey("IntentId")]
public List<IntentResponse> Responses { get; set; }
}
}