using GalaSoft.MvvmLight;
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;
//----------------------------------------------------------------
//Module Name: $safeprojectname$
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime 2016/6/27 16:42:21
//Author DK.Huang
//Description Create
//----------------------------------------------------------------
namespace Muchinfo.MTPClient.Data.Model.Message
{
///
/// 公告消息
///
public class NoticeMsg:ViewModelBase
{
private long _MSG_ID;
///
/// 消息ID NUMBER(20) not null,
///
[PropertyDisc("MSG_ID")]
public long MSG_ID
{
get { return _MSG_ID; }
set { _MSG_ID = value; }
}
private string _TITLE;
///
/// 标题 VARCHAR2(255) null
///
[PropertyDisc("TITLE")]
public string TITLE
{
get { return _TITLE; }
set { _TITLE = value; }
}
private string _CONTENT;
///
/// 内容 VARCHAR2(4000) null
///
[PropertyDisc("CONTENT")]
public string CONTENT
{
get { return _CONTENT; }
set { _CONTENT = value; }
}
private uint _NoticeType = uint.MaxValue;
public uint NoticeType
{
get { return _NoticeType; }
set { _NoticeType = value; }
}
private eAccountType _SENDER_ROLES;
///
/// 发送者角色 VARCHAR2(1000) null
///
[PropertyDisc("SENDER_ROLES")]
public eAccountType SENDER_ROLES
{
get { return _SENDER_ROLES; }
set { _SENDER_ROLES = value; }
}
private string _SENDER_INVESTORS;
///
/// 发送投资者VARCHAR2(1000) null
///
[PropertyDisc("SENDER_INVESTORS")]
public string SENDER_INVESTORS
{
get { return _SENDER_INVESTORS; }
set { _SENDER_INVESTORS = value; }
}
private DateTime _END_DATE;
///
/// 结束时间DATE null
///
[PropertyDisc("END_DATE")]
public DateTime END_DATE
{
get { return _END_DATE; }
set { _END_DATE = value; }
}
private int _IS_TOP;
///
/// 是否顶置 CHAR(1) null
///
[PropertyDisc("IS_TOP")]
public int IS_TOP
{
get { return _IS_TOP; }
set { _IS_TOP = value; }
}
private DateTime _SCHEDULE_TIME;
///
/// 计划时间DATE null
///
[PropertyDisc("SCHEDULE_TIME")]
public DateTime SCHEDULE_TIME
{
get { return _SCHEDULE_TIME; }
set { _SCHEDULE_TIME = value; }
}
///
/// 发布时间
///
[PropertyDisc("sending_time")]
public DateTime Sending_Time { get; set; }
private int _HANDLE_TYPE;
///
/// 处理类型CHAR(1) null
///
[PropertyDisc("HANDLE_TYPE")]
public int HANDLE_TYPE
{
get { return _HANDLE_TYPE; }
set { _HANDLE_TYPE = value; }
}
private int _ACCOUNTID;
///
/// 用户ID
///
[PropertyDisc("ACCOUNTID")]
public int ACCOUNTID
{
get { return _ACCOUNTID; }
set { _ACCOUNTID = value; }
}
private NoticeReadStatus _STATUS;
///
/// 阅读状态
///
[PropertyDisc("STATUS")]
public NoticeReadStatus STATUS
{
get { return _STATUS; }
set { Set(() => STATUS, ref _STATUS, value); }
}
///
/// 机构名称
///
[PropertyDisc("AreaName")]
public string AreaName { get; set; }
#region 风险率-自定义
private int _RiskLevel = -1;
///
/// 风险率-自定义
///
public int RiskLevel
{
get { return _RiskLevel; }
set { _RiskLevel = value; }
}
#endregion
///
/// 是否置顶
///
public bool IsShowTop
{
get
{
return IS_TOP == 1;
}
}
public string SENDER_ROLESDisplay
{
get
{
return SENDER_ROLES.Discription();
}
}
public string TITLEDisplay
{
get
{
if (IsShowTop)
{
return Muchinfo.MTPClient.Resources.Client_Resource.Notice_IsTop+TITLE;
}
return TITLE;
}
}
///
/// 是否可点展开(true: 不可点,false :可点)
///
public bool IsClicked { get; set; }
///
/// 提示小窗口标题
///
public string SmallWinTitle { get; set; }
}
public class NoticeCount
{
///
/// 未读消息数量
///
[PropertyDisc("MsgCount")]
public int MsgCount { get; set; }
///
/// 未读消息类型
///
[PropertyDisc("MsgType")]
public MsgTypeEnum MsgType { get; set; }
}
}