using System;
using System.Collections.Generic;
using System.ComponentModel;
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 : IMemberAddress
{
#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
}
/// 用户地址接口
public partial interface IMemberAddress
{
#region 属性
/// 编号
Int32 Id { get; set; }
/// 用户ID
Int32 UId { get; set; }
/// 姓名
String RealName { get; set; }
/// 手机
String Tel { get; set; }
/// 邮件
String Email { get; set; }
/// 是否是默认
Boolean IsDefault { get; set; }
/// 电话
String Phone { get; set; }
/// 公司
String Company { get; set; }
/// 国家
String Country { get; set; }
/// 省
String Province { get; set; }
/// 市
String City { get; set; }
/// 区
String District { get; set; }
/// 详细地址
String Address { get; set; }
/// 邮政编码
String Postcode { get; set; }
/// 添加时间
DateTime AddTime { get; set; }
/// 更新时间
DateTime UpdateTime { get; set; }
/// 排序
Int32 Rank { get; set; }
#endregion
#region 获取/设置 字段值
/// 获取/设置 字段值
/// 字段名
///
Object this[String name] { get; set; }
#endregion
}
}