forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TranscriptEntity.cs
55 lines (49 loc) · 1.56 KB
/
TranscriptEntity.cs
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
53
54
55
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Bot.Builder.Community.Storage.EntityFramework
{
/// <summary>
/// TranscriptEntity representing one Bot Activity record.
/// </summary>
[Table("TranscriptEntity")]
public class TranscriptEntity
{
/// <summary>
/// Constructor for TranscriptEntity
/// </summary>
/// <remarks>
/// Sets Timestamp to DateTimeOffset.UtfcNow
/// </remarks>
public TranscriptEntity()
{
Timestamp = DateTimeOffset.UtcNow;
}
/// <summary>
/// Gets or sets the auto-generated Id/Key.
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
/// <summary>
/// Gets or sets the Channel this activity occurred on.
/// </summary>
[MaxLength(256)]
public string Channel { get; set; }
/// <summary>
/// Gets or sets the Conversation id this activity occurred on.
/// </summary>
[MaxLength(1024)]
public string Conversation { get; set; }
/// <summary>
/// Gets or sets the persisted Activity as a string.
/// </summary>
[Column(TypeName = "nvarchar(MAX)")]
public string Activity { get; set; }
/// <summary>
/// Gets or sets the current timestamp.
/// </summary>
[Required]
[Timestamp]
public DateTimeOffset Timestamp { get; set; }
}
}