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("MemberAddress", Description = "用户地址", ConnName = "dbconn", DbType = DatabaseType.SqlServer)] public partial class MemberAddress { #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 Int32 _UId; /// 用户ID [DisplayName("用户ID")] [Description("用户ID")] [DataObjectField(false, false, false, 0)] [BindColumn("UId", "用户ID", "", Master = true)] public Int32 UId { get => _UId; set { if (OnPropertyChanging("UId", value)) { _UId = value; OnPropertyChanged("UId"); } } } private String _RealName; /// 姓名 [DisplayName("姓名")] [Description("姓名")] [DataObjectField(false, false, true, 20)] [BindColumn("RealName", "姓名", "")] public String RealName { get => _RealName; set { if (OnPropertyChanging("RealName", value)) { _RealName = value; OnPropertyChanged("RealName"); } } } private String _Tel; /// 手机 [DisplayName("手机")] [Description("手机")] [DataObjectField(false, false, true, 20)] [BindColumn("Tel", "手机", "")] public String Tel { get => _Tel; set { if (OnPropertyChanging("Tel", value)) { _Tel = value; OnPropertyChanged("Tel"); } } } private String _Email; /// 邮件 [DisplayName("邮件")] [Description("邮件")] [DataObjectField(false, false, true, 100)] [BindColumn("Email", "邮件", "")] public String Email { get => _Email; set { if (OnPropertyChanging("Email", value)) { _Email = value; OnPropertyChanged("Email"); } } } private Boolean _IsDefault; /// 是否是默认 [DisplayName("是否是默认")] [Description("是否是默认")] [DataObjectField(false, false, false, 0)] [BindColumn("IsDefault", "是否是默认", "")] public Boolean IsDefault { get => _IsDefault; set { if (OnPropertyChanging("IsDefault", value)) { _IsDefault = value; OnPropertyChanged("IsDefault"); } } } private String _Phone; /// 电话 [DisplayName("电话")] [Description("电话")] [DataObjectField(false, false, true, 20)] [BindColumn("Phone", "电话", "")] public String Phone { get => _Phone; set { if (OnPropertyChanging("Phone", value)) { _Phone = value; OnPropertyChanged("Phone"); } } } private String _Company; /// 公司 [DisplayName("公司")] [Description("公司")] [DataObjectField(false, false, true, 100)] [BindColumn("Company", "公司", "")] public String Company { get => _Company; set { if (OnPropertyChanging("Company", value)) { _Company = value; OnPropertyChanged("Company"); } } } private String _Country; /// 国家 [DisplayName("国家")] [Description("国家")] [DataObjectField(false, false, true, 50)] [BindColumn("Country", "国家", "")] public String Country { get => _Country; set { if (OnPropertyChanging("Country", value)) { _Country = value; OnPropertyChanged("Country"); } } } private String _Province; /// 省 [DisplayName("省")] [Description("省")] [DataObjectField(false, false, true, 50)] [BindColumn("Province", "省", "")] public String Province { get => _Province; set { if (OnPropertyChanging("Province", value)) { _Province = value; OnPropertyChanged("Province"); } } } private String _City; /// 市 [DisplayName("市")] [Description("市")] [DataObjectField(false, false, true, 50)] [BindColumn("City", "市", "")] public String City { get => _City; set { if (OnPropertyChanging("City", value)) { _City = value; OnPropertyChanged("City"); } } } private String _District; /// 区 [DisplayName("区")] [Description("区")] [DataObjectField(false, false, true, 50)] [BindColumn("District", "区", "")] public String District { get => _District; set { if (OnPropertyChanging("District", value)) { _District = value; OnPropertyChanged("District"); } } } private String _Address; /// 详细地址 [DisplayName("详细地址")] [Description("详细地址")] [DataObjectField(false, false, true, 250)] [BindColumn("Address", "详细地址", "")] public String Address { get => _Address; set { if (OnPropertyChanging("Address", value)) { _Address = value; OnPropertyChanged("Address"); } } } private String _Postcode; /// 邮政编码 [DisplayName("邮政编码")] [Description("邮政编码")] [DataObjectField(false, false, true, 20)] [BindColumn("Postcode", "邮政编码", "")] public String Postcode { get => _Postcode; set { if (OnPropertyChanging("Postcode", value)) { _Postcode = value; OnPropertyChanged("Postcode"); } } } private DateTime _AddTime; /// 添加时间 [DisplayName("添加时间")] [Description("添加时间")] [DataObjectField(false, false, true, 0)] [BindColumn("AddTime", "添加时间", "")] public DateTime AddTime { get => _AddTime; set { if (OnPropertyChanging("AddTime", value)) { _AddTime = value; OnPropertyChanged("AddTime"); } } } 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"); } } } private Int32 _Rank; /// 排序 [DisplayName("排序")] [Description("排序")] [DataObjectField(false, false, false, 0)] [BindColumn("Rank", "排序", "")] public Int32 Rank { get => _Rank; set { if (OnPropertyChanging("Rank", value)) { _Rank = value; OnPropertyChanged("Rank"); } } } #endregion #region 获取/设置 字段值 /// 获取/设置 字段值 /// 字段名 /// public override Object this[String name] { get { switch (name) { case "Id": return _Id; case "UId": return _UId; case "RealName": return _RealName; case "Tel": return _Tel; case "Email": return _Email; case "IsDefault": return _IsDefault; case "Phone": return _Phone; case "Company": return _Company; case "Country": return _Country; case "Province": return _Province; case "City": return _City; case "District": return _District; case "Address": return _Address; case "Postcode": return _Postcode; case "AddTime": return _AddTime; case "UpdateTime": return _UpdateTime; case "Rank": return _Rank; default: return base[name]; } } set { switch (name) { case "Id": _Id = value.ToInt(); break; case "UId": _UId = value.ToInt(); break; case "RealName": _RealName = Convert.ToString(value); break; case "Tel": _Tel = Convert.ToString(value); break; case "Email": _Email = Convert.ToString(value); break; case "IsDefault": _IsDefault = value.ToBoolean(); break; case "Phone": _Phone = Convert.ToString(value); break; case "Company": _Company = Convert.ToString(value); break; case "Country": _Country = Convert.ToString(value); break; case "Province": _Province = Convert.ToString(value); break; case "City": _City = Convert.ToString(value); break; case "District": _District = Convert.ToString(value); break; case "Address": _Address = Convert.ToString(value); break; case "Postcode": _Postcode = Convert.ToString(value); break; case "AddTime": _AddTime = value.ToDateTime(); break; case "UpdateTime": _UpdateTime = value.ToDateTime(); break; case "Rank": _Rank = value.ToInt(); break; default: base[name] = value; break; } } } #endregion #region 字段名 /// 取得用户地址字段信息的快捷方式 public partial class _ { /// 编号 public static readonly Field Id = FindByName("Id"); /// 用户ID public static readonly Field UId = FindByName("UId"); /// 姓名 public static readonly Field RealName = FindByName("RealName"); /// 手机 public static readonly Field Tel = FindByName("Tel"); /// 邮件 public static readonly Field Email = FindByName("Email"); /// 是否是默认 public static readonly Field IsDefault = FindByName("IsDefault"); /// 电话 public static readonly Field Phone = FindByName("Phone"); /// 公司 public static readonly Field Company = FindByName("Company"); /// 国家 public static readonly Field Country = FindByName("Country"); /// 省 public static readonly Field Province = FindByName("Province"); /// 市 public static readonly Field City = FindByName("City"); /// 区 public static readonly Field District = FindByName("District"); /// 详细地址 public static readonly Field Address = FindByName("Address"); /// 邮政编码 public static readonly Field Postcode = FindByName("Postcode"); /// 添加时间 public static readonly Field AddTime = FindByName("AddTime"); /// 更新时间 public static readonly Field UpdateTime = FindByName("UpdateTime"); /// 排序 public static readonly Field Rank = FindByName("Rank"); static Field FindByName(String name) => Meta.Table.FindByName(name); } /// 取得用户地址字段名称的快捷方式 public partial class __ { /// 编号 public const String Id = "Id"; /// 用户ID public const String UId = "UId"; /// 姓名 public const String RealName = "RealName"; /// 手机 public const String Tel = "Tel"; /// 邮件 public const String Email = "Email"; /// 是否是默认 public const String IsDefault = "IsDefault"; /// 电话 public const String Phone = "Phone"; /// 公司 public const String Company = "Company"; /// 国家 public const String Country = "Country"; /// 省 public const String Province = "Province"; /// 市 public const String City = "City"; /// 区 public const String District = "District"; /// 详细地址 public const String Address = "Address"; /// 邮政编码 public const String Postcode = "Postcode"; /// 添加时间 public const String AddTime = "AddTime"; /// 更新时间 public const String UpdateTime = "UpdateTime"; /// 排序 public const String Rank = "Rank"; } #endregion } }