using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpTradeRefund")] public class CeErpTradeRefund : ComBase { /// /// 退款单号 /// [PrimaryKey(PrimaryKeyType.Assigned)] public string refund_id { get; set; } private string _oid = ""; /// /// /// [Property] public string oid { get { return _oid; } set { _oid = value; } } private string _tid = ""; /// /// /// [Property] public string tid { get { return _tid; } set { _tid = value; } } private string _total_fee = ""; /// ///交易金额 /// [Property] public string total_fee { get { return _total_fee; } set { _total_fee = value; } } private string _buyer_nick = ""; /// /// /// [Property] public string buyer_nick { get { return _buyer_nick; } set { _buyer_nick = value; } } private string _seller_nick = ""; /// /// /// [Property] public string seller_nick { get { return _seller_nick; } set { _seller_nick = value; } } /// ///创建时间 /// [Property] public DateTime? created { get; set; } /// ///修改时间 /// [Property] public DateTime? modified { get; set; } private string _order_status = ""; /// ///交易状态 /// [Property] public string order_status { get { return _order_status; } set { _order_status = value; } } private string _status = ""; /// ///退款状态 /// [Property] public string status { get { return _status; } set { _status = value; } } private string _good_status = ""; /// ///货物状态 /// [Property] public string good_status { get { return _good_status; } set { _good_status = value; } } private bool _has_good_return = false; /// ///买家是否需要退货 /// [Property] public bool has_good_return { get { return _has_good_return; } set { _has_good_return = value; } } private string _refund_fee = ""; /// ///退款金额 /// [Property] public string refund_fee { get { return _refund_fee; } set { _refund_fee = value; } } private string _payment = ""; /// /// /// [Property] public string payment { get { return _payment; } set { _payment = value; } } private string _reason = ""; /// ///退款原因 /// [Property] public string reason { get { return _reason; } set { _reason = value; } } private string _describe = ""; /// ///退款说明 /// [Property] public string describe { get { return _describe; } set { _describe = value; } } private string _refund_phase = ""; /// /// /// [Property] public string refund_phase { get { return _refund_phase; } set { _refund_phase = value; } } private string _responsibleUserId = ""; /// ///责任人 123_k,23_s /// [Property] public string ResponsibleUserId { get { return _responsibleUserId; } set { _responsibleUserId = value; } } private int _refundState = 0; /// ///审核状态 1待审核2待确认 /// [Property] public int RefundState { get { return _refundState; } set { _refundState = value; } } private string _responsibleUserName = ""; /// ///责任人名字 /// [Property] public string ResponsibleUserName { get { return _responsibleUserName; } set { _responsibleUserName = value; } } private string _memo = ""; /// ///标记的备注 /// [Property] public string Memo { get { return _memo; } set { _memo = value; } } private int _isPartRefund = 0; /// ///是否部分退款 /// [Property] public int IsPartRefund { get { return _isPartRefund; } set { _isPartRefund = value; } } private string _refundDesc = ""; /// ///客户额外描述原因 /// [Property] public string refundDesc { get { return _refundDesc; } set { _refundDesc = value; } } private string _buyer_id = ""; /// ///客户id /// [Property] public string buyer_id { get { return _buyer_id; } set { _buyer_id = value; } } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpTradeRefund where tid='" + id + "'"); ExecuteNonQuery(sql.ToString()); } public static CeErpTradeRefund Get(string rid) { return FindFirst(Expression.Sql("refund_id='" + rid + "'")); } public static CeErpTradeRefund GetByTid(string rid) { return FindFirst(Expression.Sql("tid='" + rid + "'")); } public static CeErpTradeRefund GetByTidAndReId(string rid, string refundid) { return FindFirst(Expression.Sql(string.Format("tid='{0}' and refund_id = '{1}'", rid, refundid))); } public static CeErpTradeRefund GetByOidAndReId(string rid, string refundid) { return FindFirst(Expression.Sql(string.Format("oid='{0}' and refund_id = '{1}'", rid, refundid))); } } }