/
ChatMessage.cs
38 lines (31 loc) · 1.06 KB
/
ChatMessage.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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using JabbR.Infrastructure;
namespace JabbR.Models
{
public class ChatMessage
{
[Key]
public int Key { get; set; }
public string Content { get; set; }
public string Id { get; set; }
public virtual ChatRoom Room { get; set; }
public virtual ChatUser User { get; set; }
public DateTimeOffset When { get; set; }
public bool HtmlEncoded { get; set; }
public int MessageType { get; set; }
// After content providers run this is updated with the content
public string HtmlContent { get; set; }
public int? RoomKey { get; set; }
public int? UserKey { get; set; }
// Notifications
public string ImageUrl { get; set; }
public string Source { get; set; }
public virtual ICollection<Notification> Notifications { get; set; }
public ChatMessage()
{
Notifications = new SafeCollection<Notification>();
}
}
}