//----------------------------------------------------------------
//Module Name: Warning
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime Author Description
//----------------------------------------------------------------
//2014-04-15 deng.yinping Create
//----------------------------------------------------------------
using GalaSoft.MvvmLight;
using Muchinfo.MTPClient.Data.Enums;
using System;
namespace Muchinfo.MTPClient.Data.Model
{
///
/// 预警类
///
public class Warning : ObservableObject
{
///
/// 序号
///
public int Id { get; set; }
///
/// 交易账号
///
public string TradeAccount { get; set; }
///
/// 预警类型(0表示行情预警,1风险预警,2净值预警, 3保证金预警, 4总浮动盈亏预警)
///
public WarningType WarningType { get; set; }
///
/// 开始时间
///
public string StartTime { get; set; }
///
/// 结束时间
///
public string EndTime { get; set; }
private string _warningItem;
///
/// 预警项
///
public string WarningItem
{
get { return _warningItem; }
set
{
Set(() => WarningItem, ref _warningItem, value);
}
}
///
/// 商品代码
///
public string GoodsCode { get; set; }
private bool _isHoldingGoods;
///
/// 是否持仓商品
///
public bool IsHoldingGoods
{
get { return _isHoldingGoods; }
set
{
Set(() => IsHoldingGoods, ref _isHoldingGoods, value);
}
}
///
/// 预警条件符号(大于 = 0, 等于 = 1, 小于 = 2)
///
public WarningSign WarningSign { get; set; }
///
/// 买卖方向-行情预警(买 = 0, 卖 = 1)
///
public Direction Direction { get; set; }
private decimal _warningValue;
///
/// 预警阀值
///
public decimal WarningValue
{
get { return _warningValue; }
set
{
Set(() => WarningValue, ref _warningValue, value);
}
}
///
/// 预警方式
///
public WarningModeType WarningMode { get; set; }
///
/// 限定时间段(用来计算的)按秒为单位
///
public int SpaceTimes { get; set; }
///
/// 触发次数
///
public int TouchNumber { get; set; }
///
/// 是否启用
///
public bool IsValid { get; set; }
public DateTime TouchTime { get; set; }
///
/// 最近触发值
///
public string TouchValue { get; set; }
///
///重复次数
///
public int RepeatNumber { get; set; }
///
/// 预警次数
///
public int WarningNumber { get; set; }
private string _sound;
///
/// 声音
///
public string Sound
{
get { return _sound; }
set
{
Set(() => Sound, ref _sound, value);
}
}
}
}