NoticeMsg.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. using GalaSoft.MvvmLight;
  2. using Muchinfo.MTPClient.Data.Enums;
  3. using Muchinfo.MTPClient.Data.Helper;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows;
  9. using System.Windows.Media;
  10. //----------------------------------------------------------------
  11. //Module Name: $safeprojectname$
  12. //Purpose:
  13. //CopyRight: Muchinfo
  14. //History:
  15. //----------------------------------------------------------------
  16. //DateTime 2016/6/27 16:42:21
  17. //Author DK.Huang
  18. //Description Create
  19. //----------------------------------------------------------------
  20. namespace Muchinfo.MTPClient.Data.Model.Message
  21. {
  22. /// <summary>
  23. /// 公告消息
  24. /// </summary>
  25. public class NoticeMsg:ViewModelBase
  26. {
  27. private long _MSG_ID;
  28. /// <summary>
  29. /// 消息ID NUMBER(20) not null,
  30. /// </summary>
  31. [PropertyDisc("MSG_ID")]
  32. public long MSG_ID
  33. {
  34. get { return _MSG_ID; }
  35. set { _MSG_ID = value; }
  36. }
  37. private string _TITLE;
  38. /// <summary>
  39. /// 标题 VARCHAR2(255) null
  40. /// </summary>
  41. [PropertyDisc("TITLE")]
  42. public string TITLE
  43. {
  44. get { return _TITLE; }
  45. set { _TITLE = value; }
  46. }
  47. private string _CONTENT;
  48. /// <summary>
  49. /// 内容 VARCHAR2(4000) null
  50. /// </summary>
  51. [PropertyDisc("CONTENT")]
  52. public string CONTENT
  53. {
  54. get { return _CONTENT; }
  55. set { _CONTENT = value; }
  56. }
  57. private uint _NoticeType = uint.MaxValue;
  58. public uint NoticeType
  59. {
  60. get { return _NoticeType; }
  61. set { _NoticeType = value; }
  62. }
  63. private eAccountType _SENDER_ROLES;
  64. /// <summary>
  65. /// 发送者角色 VARCHAR2(1000) null
  66. /// </summary>
  67. [PropertyDisc("SENDER_ROLES")]
  68. public eAccountType SENDER_ROLES
  69. {
  70. get { return _SENDER_ROLES; }
  71. set { _SENDER_ROLES = value; }
  72. }
  73. private string _SENDER_INVESTORS;
  74. /// <summary>
  75. /// 发送投资者VARCHAR2(1000) null
  76. /// </summary>
  77. [PropertyDisc("SENDER_INVESTORS")]
  78. public string SENDER_INVESTORS
  79. {
  80. get { return _SENDER_INVESTORS; }
  81. set { _SENDER_INVESTORS = value; }
  82. }
  83. private DateTime _END_DATE;
  84. /// <summary>
  85. /// 结束时间DATE null
  86. /// </summary>
  87. [PropertyDisc("END_DATE")]
  88. public DateTime END_DATE
  89. {
  90. get { return _END_DATE; }
  91. set { _END_DATE = value; }
  92. }
  93. private int _IS_TOP;
  94. /// <summary>
  95. /// 是否顶置 CHAR(1) null
  96. /// </summary>
  97. [PropertyDisc("IS_TOP")]
  98. public int IS_TOP
  99. {
  100. get { return _IS_TOP; }
  101. set { _IS_TOP = value; }
  102. }
  103. private DateTime _SCHEDULE_TIME;
  104. /// <summary>
  105. /// 计划时间DATE null
  106. /// </summary>
  107. [PropertyDisc("SCHEDULE_TIME")]
  108. public DateTime SCHEDULE_TIME
  109. {
  110. get { return _SCHEDULE_TIME; }
  111. set { _SCHEDULE_TIME = value; }
  112. }
  113. /// <summary>
  114. /// 发布时间
  115. /// </summary>
  116. [PropertyDisc("sending_time")]
  117. public DateTime Sending_Time { get; set; }
  118. private int _HANDLE_TYPE;
  119. /// <summary>
  120. /// 处理类型CHAR(1) null
  121. /// </summary>
  122. [PropertyDisc("HANDLE_TYPE")]
  123. public int HANDLE_TYPE
  124. {
  125. get { return _HANDLE_TYPE; }
  126. set { _HANDLE_TYPE = value; }
  127. }
  128. private int _ACCOUNTID;
  129. /// <summary>
  130. /// 用户ID
  131. /// </summary>
  132. [PropertyDisc("ACCOUNTID")]
  133. public int ACCOUNTID
  134. {
  135. get { return _ACCOUNTID; }
  136. set { _ACCOUNTID = value; }
  137. }
  138. private NoticeReadStatus _STATUS;
  139. /// <summary>
  140. /// 阅读状态
  141. /// </summary>
  142. [PropertyDisc("STATUS")]
  143. public NoticeReadStatus STATUS
  144. {
  145. get { return _STATUS; }
  146. set { Set(() => STATUS, ref _STATUS, value); }
  147. }
  148. /// <summary>
  149. /// 机构名称
  150. /// </summary>
  151. [PropertyDisc("AreaName")]
  152. public string AreaName { get; set; }
  153. #region 风险率-自定义
  154. private int _RiskLevel = -1;
  155. /// <summary>
  156. /// 风险率-自定义
  157. /// </summary>
  158. public int RiskLevel
  159. {
  160. get { return _RiskLevel; }
  161. set { _RiskLevel = value; }
  162. }
  163. #endregion
  164. /// <summary>
  165. /// 是否置顶
  166. /// </summary>
  167. public bool IsShowTop
  168. {
  169. get
  170. {
  171. return IS_TOP == 1;
  172. }
  173. }
  174. public string SENDER_ROLESDisplay
  175. {
  176. get
  177. {
  178. return SENDER_ROLES.Discription();
  179. }
  180. }
  181. public string TITLEDisplay
  182. {
  183. get
  184. {
  185. if (IsShowTop)
  186. {
  187. return Muchinfo.MTPClient.Resources.Client_Resource.Notice_IsTop+TITLE;
  188. }
  189. return TITLE;
  190. }
  191. }
  192. /// <summary>
  193. /// 是否可点展开(true: 不可点,false :可点)
  194. /// </summary>
  195. public bool IsClicked { get; set; }
  196. /// <summary>
  197. /// 提示小窗口标题
  198. /// </summary>
  199. public string SmallWinTitle { get; set; }
  200. }
  201. public class NoticeCount
  202. {
  203. /// <summary>
  204. /// 未读消息数量
  205. /// </summary>
  206. [PropertyDisc("MsgCount")]
  207. public int MsgCount { get; set; }
  208. /// <summary>
  209. /// 未读消息类型
  210. /// </summary>
  211. [PropertyDisc("MsgType")]
  212. public MsgTypeEnum MsgType { get; set; }
  213. }
  214. }