using System; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; using System.Web.Script.Serialization; using System.Xml.Serialization; using XCode; using XCode.Configuration; using XCode.DataAccessLayer; namespace COMCMS.Core { /// 公众平台回复信息 [Serializable] [DataObject] [Description("公众平台回复信息")] [BindTable("WeixinResponseContent", Description = "公众平台回复信息", ConnName = "dbconn", DbType = DatabaseType.SqlServer)] public partial class WeixinResponseContent { #region 属性 private Int32 _Id; /// 编号 [DisplayName("编号")] [Description("编号")] [DataObjectField(true, true, false, 0)] [BindColumn("Id", "编号", "")] public Int32 Id { get => _Id; set { if (OnPropertyChanging("Id", value)) { _Id = value; OnPropertyChanged("Id"); } } } private String _OpenId; /// 用户OpenId [DisplayName("用户OpenId")] [Description("用户OpenId")] [DataObjectField(false, false, true, 50)] [BindColumn("OpenId", "用户OpenId", "")] public String OpenId { get => _OpenId; set { if (OnPropertyChanging("OpenId", value)) { _OpenId = value; OnPropertyChanged("OpenId"); } } } private String _RequestType; /// 请求类型 [DisplayName("请求类型")] [Description("请求类型")] [DataObjectField(false, false, true, 50)] [BindColumn("RequestType", "请求类型", "")] public String RequestType { get => _RequestType; set { if (OnPropertyChanging("RequestType", value)) { _RequestType = value; OnPropertyChanged("RequestType"); } } } private String _RequestContent; /// 内容 [DisplayName("内容")] [Description("内容")] [DataObjectField(false, false, true, -1)] [BindColumn("RequestContent", "内容", "")] public String RequestContent { get => _RequestContent; set { if (OnPropertyChanging("RequestContent", value)) { _RequestContent = value; OnPropertyChanged("RequestContent"); } } } private String _ResponseType; /// 回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link [DisplayName("回复的类型文本消息:text图片消息:image地理位置消息:location链接消息:link")] [Description("回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link")] [DataObjectField(false, false, true, 50)] [BindColumn("ResponseType", "回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link", "")] public String ResponseType { get => _ResponseType; set { if (OnPropertyChanging("ResponseType", value)) { _ResponseType = value; OnPropertyChanged("ResponseType"); } } } private String _ReponseContent; /// 系统回复的内容 [DisplayName("系统回复的内容")] [Description("系统回复的内容")] [DataObjectField(false, false, true, -1)] [BindColumn("ReponseContent", "系统回复的内容", "")] public String ReponseContent { get => _ReponseContent; set { if (OnPropertyChanging("ReponseContent", value)) { _ReponseContent = value; OnPropertyChanged("ReponseContent"); } } } private String _XmlContent; /// xml原始内容 [DisplayName("xml原始内容")] [Description("xml原始内容")] [DataObjectField(false, false, true, -1)] [BindColumn("XmlContent", "xml原始内容", "")] public String XmlContent { get => _XmlContent; set { if (OnPropertyChanging("XmlContent", value)) { _XmlContent = value; OnPropertyChanged("XmlContent"); } } } private DateTime _UpdateTime; /// 修改时间 [DisplayName("修改时间")] [Description("修改时间")] [DataObjectField(false, false, true, 0)] [BindColumn("UpdateTime", "修改时间", "")] public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging("UpdateTime", value)) { _UpdateTime = value; OnPropertyChanged("UpdateTime"); } } } #endregion #region 获取/设置 字段值 /// 获取/设置 字段值 /// 字段名 /// public override Object this[String name] { get { switch (name) { case "Id": return _Id; case "OpenId": return _OpenId; case "RequestType": return _RequestType; case "RequestContent": return _RequestContent; case "ResponseType": return _ResponseType; case "ReponseContent": return _ReponseContent; case "XmlContent": return _XmlContent; case "UpdateTime": return _UpdateTime; default: return base[name]; } } set { switch (name) { case "Id": _Id = value.ToInt(); break; case "OpenId": _OpenId = Convert.ToString(value); break; case "RequestType": _RequestType = Convert.ToString(value); break; case "RequestContent": _RequestContent = Convert.ToString(value); break; case "ResponseType": _ResponseType = Convert.ToString(value); break; case "ReponseContent": _ReponseContent = Convert.ToString(value); break; case "XmlContent": _XmlContent = Convert.ToString(value); break; case "UpdateTime": _UpdateTime = value.ToDateTime(); break; default: base[name] = value; break; } } } #endregion #region 字段名 /// 取得公众平台回复信息字段信息的快捷方式 public partial class _ { /// 编号 public static readonly Field Id = FindByName("Id"); /// 用户OpenId public static readonly Field OpenId = FindByName("OpenId"); /// 请求类型 public static readonly Field RequestType = FindByName("RequestType"); /// 内容 public static readonly Field RequestContent = FindByName("RequestContent"); /// 回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link public static readonly Field ResponseType = FindByName("ResponseType"); /// 系统回复的内容 public static readonly Field ReponseContent = FindByName("ReponseContent"); /// xml原始内容 public static readonly Field XmlContent = FindByName("XmlContent"); /// 修改时间 public static readonly Field UpdateTime = FindByName("UpdateTime"); static Field FindByName(String name) => Meta.Table.FindByName(name); } /// 取得公众平台回复信息字段名称的快捷方式 public partial class __ { /// 编号 public const String Id = "Id"; /// 用户OpenId public const String OpenId = "OpenId"; /// 请求类型 public const String RequestType = "RequestType"; /// 内容 public const String RequestContent = "RequestContent"; /// 回复的类型 文本消息:text 图片消息:image 地理位置消息:location 链接消息:link public const String ResponseType = "ResponseType"; /// 系统回复的内容 public const String ReponseContent = "ReponseContent"; /// xml原始内容 public const String XmlContent = "XmlContent"; /// 修改时间 public const String UpdateTime = "UpdateTime"; } #endregion } }