using System; using CY.Infrastructure.Domain; using CY.Infrastructure.Common; namespace CY.Model { /// ///软件版本 /// [Serializable] public partial class Soft_Version : IAggregateRoot { public Soft_Version() { } #region Model private int? _keyid; private int? _softtypeid; private string _softname; private string _softversion; private string _softstoreaddress; private string _softurl; private string _softcontent; private DateTime? _softcreattime; private int? _softupcount; private DateTime? _lastupdatetime; private string _operator; /// /// 编号 /// public int? Keyid { get { return _keyid; } set { _keyid = value; } } /// /// 软件类型 /// public int? SoftTypeId { get { return _softtypeid; } set { _softtypeid = value; } } /// /// 软件名称 /// public string SoftName { get { return _softname; } set { _softname = value; } } /// /// 软件版本 /// public string SoftVersion { get { return _softversion; } set { _softversion = value; } } /// /// 软件更新地址 /// public string SoftStoreAddress { get { return _softstoreaddress; } set { _softstoreaddress = value; } } /// /// 文件上传保存路径 /// public string SoftUrl { get { return _softurl; } set { _softurl = value; } } /// /// 更新执行语句 /// public string SoftContent { get { return _softcontent; } set { _softcontent = value; } } /// /// 创建时间 /// public DateTime? SoftCreatTime { get { return _softcreattime; } set { _softcreattime = value; } } /// /// 更新数量 /// public int? SoftUpCount { get { return _softupcount; } set { _softupcount = value; } } /// /// 最后修改时间 /// public DateTime? LastUpdateTime { get { return _lastupdatetime; } set { _lastupdatetime = value; } } /// /// 操作人 /// public string Operator { get { return _operator; } set { _operator = value; } } #endregion Model #region Visiter /// /// 属性访问器 /// /// 属性名 /// 索引 /// 是否将指定属性设置为传入值 /// 需要赋予的值 /// 与名称对应的属性值 public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) { object theValue = null; if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) { this.Keyid = isChange ? MyConvert.ConvertToInt(value) : Keyid; theValue = this.Keyid; } else if ("SoftTypeId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.SoftTypeId = isChange ? MyConvert.ConvertToInt(value) : SoftTypeId; theValue = this.SoftTypeId; } else if ("SoftName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.SoftName = isChange ? MyConvert.ConvertToString(value) : SoftName; theValue = this.SoftName; } else if ("SoftVersion".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4) { this.SoftVersion = isChange ? MyConvert.ConvertToString(value) : SoftVersion; theValue = this.SoftVersion; } else if ("SoftStoreAddress".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5) { this.SoftStoreAddress = isChange ? MyConvert.ConvertToString(value) : SoftStoreAddress; theValue = this.SoftStoreAddress; } else if ("SoftUrl".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6) { this.SoftUrl = isChange ? MyConvert.ConvertToString(value) : SoftUrl; theValue = this.SoftUrl; } else if ("SoftContent".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7) { this.SoftContent = isChange ? MyConvert.ConvertToString(value) : SoftContent; theValue = this.SoftContent; } else if ("SoftCreatTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8) { this.SoftCreatTime = isChange ? MyConvert.ConvertToDateTime(value) : SoftCreatTime; theValue = this.SoftCreatTime; } else if ("SoftUpCount".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9) { this.SoftUpCount = isChange ? MyConvert.ConvertToInt32(value) : SoftUpCount; theValue = this.SoftUpCount; } else if ("LastUpdateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10) { this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime; theValue = this.LastUpdateTime; } else if ("Operator".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) { this.Operator = isChange ? MyConvert.ConvertToString(value) : Operator; theValue = this.Operator; } return theValue; } #endregion Visiter } }