using Castle.ActiveRecord; using System; using NHibernate.Criterion; namespace BizCom { [ActiveRecord("CE_ErpSampleCustomer")] public class CeErpSampleCustomer : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _buyer_nick = ""; /// ///买家昵称 /// [Property] public string buyer_nick { get { return _buyer_nick; } set { _buyer_nick = value; } } private string _userId = ""; /// ///买家ID /// [Property] public string userId { get { return _userId; } set { _userId = value; } } private string _phone = ""; /// ///电话 /// [Property] public string phone { get { return _phone; } set { _phone = value; } } private string _address = ""; /// ///地址 /// [Property] public string address { get { return _address; } set { _address = value; } } /// ///最后购买时间 /// [Property] public DateTime? lastbuy_time { get; set; } private string _seller_nick = ""; /// /// /// [Property] public string seller_nick { get { return _seller_nick; } set { _seller_nick = value; } } private string _lastTid = ""; /// ///上次购买订单号 /// [Property] public string lastTid { get { return _lastTid; } set { _lastTid = value; } } private int _shopId = 0; /// /// 店铺id /// [Property] public int shopId { get { return _shopId; } set { _shopId = value; } } public static CeErpSampleCustomer GetByNick(string nick) { return FindFirst(Expression.Eq("buyer_nick", nick)); } } }