using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpShop")] public class CeErpShop : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private int _userID = 0; /// /// /// [Property] public int UserID { get { return _userID; } set { _userID = value; } } private string _comName = ""; /// /// /// [Property] public string ComName { get { return _comName; } set { _comName = value; } } private string _leader = ""; /// /// /// [Property] public string Leader { get { return _leader; } set { _leader = value; } } private string _appSecret = ""; /// /// /// [Property] public string AppSecret { get { return _appSecret; } set { _appSecret = value; } } private string _shopName = ""; /// /// /// [Property] public string ShopName { get { return _shopName; } set { _shopName = value; } } private string _sName = ""; /// /// /// [Property] public string SName { get { return _sName; } set { _sName = value; } } private string _shopType = ""; /// /// /// [Property] public string ShopType { get { return _shopType; } set { _shopType = value; } } private int _state = 0; /// /// /// [Property] public int State { get { return _state; } set { _state = value; } } /// /// /// [Property] public DateTime? AddTime { get; set; } private string _summary = ""; /// /// /// [Property] public string Summary { get { return _summary; } set { _summary = value; } } private string _refresh_token = ""; /// /// /// [Property] public string refresh_token { get { return _refresh_token; } set { _refresh_token = value; } } private string _taobao_user_nick = ""; /// ///店铺旺旺昵称 /// [Property] public string taobao_user_nick { get { return _taobao_user_nick; } set { _taobao_user_nick = value; } } private string _taobao_user_id = ""; /// ///用户淘宝ID /// [Property] public string taobao_user_id { get { return _taobao_user_id; } set { _taobao_user_id = value; } } private bool _isTmc = false; /// ///是否授权同步 /// [Property] public bool isTmc { get { return _isTmc; } set { _isTmc = value; } } //appid private String _design_app_id = ""; [Property] public String design_app_id { get { return _design_app_id; } set { _design_app_id = value; } } private String _design_secret = ""; [Property] public String design_secret { get { return _design_secret; } set { _design_secret = value; } } private Boolean _orderAudit = false; [Property] public Boolean orderAudit { get { return _orderAudit; } set { _orderAudit = value; } } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpShop where id=" + id); ExecuteNonQuery(sql.ToString()); } public static CeErpShop GetShopIdByName(string ComName) { return FindFirst(Expression.Eq("ShopName", ComName)); } public static CeErpShop GetShopIdByCode(string ComCode) { return FindFirst(Expression.Eq("AppSecret", ComCode)); } public static CeErpShop GetShopById(int ShopId) { return FindFirst(Expression.Eq("id", ShopId)); } } }