forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommentInfo.cs
More file actions
66 lines (54 loc) · 1.95 KB
/
CommentInfo.cs
File metadata and controls
66 lines (54 loc) · 1.95 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using BaiRong.Core;
using BaiRong.Core.Data;
namespace SiteServer.CMS.Model
{
public class CommentInfo
{
public CommentInfo()
{
Id = 0;
PublishmentSystemId = 0;
NodeId = 0;
ContentId = 0;
GoodCount = 0;
UserName = string.Empty;
IsChecked = false;
AddDate = DateTime.Now;
Content = string.Empty;
}
public CommentInfo(int id, int publishmentSystemId, int nodeId, int contentId, int goodCount, string userName, bool isChecked, DateTime addDate, string content)
{
Id = id;
PublishmentSystemId = publishmentSystemId;
NodeId = nodeId;
ContentId = contentId;
GoodCount = goodCount;
UserName = userName;
IsChecked = isChecked;
AddDate = addDate;
Content = content;
}
public CommentInfo(object dataItem)
{
Id = SqlUtils.EvalInt(dataItem, "ID");
PublishmentSystemId = SqlUtils.EvalInt(dataItem, "PublishmentSystemID");
NodeId = SqlUtils.EvalInt(dataItem, "NodeID");
ContentId = SqlUtils.EvalInt(dataItem, "ContentID");
GoodCount = SqlUtils.EvalInt(dataItem, "GoodCount");
UserName = SqlUtils.EvalString(dataItem, "UserName");
IsChecked = SqlUtils.EvalBool(dataItem, "IsChecked");
AddDate = SqlUtils.EvalDateTime(dataItem, "AddDate");
Content = SqlUtils.EvalString(dataItem, "Content");
}
public int Id { get; set; }
public int PublishmentSystemId { get; set; }
public int NodeId { get; set; }
public int ContentId { get; set; }
public int GoodCount { get; set; }
public string UserName { get; set; }
public bool IsChecked { get; set; }
public DateTime AddDate { get; set; }
public string Content { get; set; }
}
}