using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace CY_DocumentSynchroWCFService
{
[DataContract]
public partial class T_Test : IAggregateRoot
{
public T_Test()
{
}
#region Model
///
/// id
///
[DataMember]
public int? id {get;set; }
///
/// name
///
[DataMember]
public string username { get; set; }
///
/// email
///
[DataMember]
public string useremail { get; set; }
///
/// address
///
[DataMember]
public string address { get; set; }
///
/// LeaveTime
///
[DataMember]
public DateTime? addtime { get; set; }
///
/// IsWork
///
[DataMember]
public int? status { get; set; }
#endregion Model
#region Visiter
///
/// 属性访问器
///
/// 属性名
/// 索引
/// 是否将指定属性设置为传入值
/// 需要赋予的值
/// 与名称对应的属性值
public object Visiter(string name, int? index = -1, bool isChange = false, object value = null)
{
object theValue = null;
if ("id".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1)
{
this.id = isChange ? MyConvert.ConvertToInt(value) : id;
theValue = this.id;
}
else if ("username".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2)
{
this.username = isChange ? MyConvert.ConvertToString(value) : username;
theValue = this.username;
}
else if ("useremail".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3)
{
this.useremail = isChange ? MyConvert.ConvertToString(value) : useremail;
theValue = this.useremail;
}
else if ("address".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4)
{
this.address = isChange ? MyConvert.ConvertToString(value) : address;
theValue = this.address;
}
else if ("addtime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5)
{
this.addtime = isChange ? MyConvert.ConvertToDateTime(value) : addtime;
theValue = this.addtime;
}
else if ("status".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6)
{
this.status = isChange ? MyConvert.ConvertToInt(value) : status;
theValue = this.status;
}
return theValue;
}
#endregion Visiter
}
}