using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RFramework;

namespace RFrameGenerate.Model
{
    public partial class T_BAS_OrderDetails : EntityBase<T_BAS_OrderDetails>, ICloneable
    {
        public Guid OrderDetailGuid{ get;set; }
        public Guid? ProductGuid{ get;set; }   
        public Guid? GroupGuid{ get;set; }   
        public Guid? OrderGuid{ get;set; }   
        public Guid? DistributeGuid{ get;set; }   
        public Guid? ProductCategoryGuid{ get;set; }   
        public string ProductName{ get;set; }
        public string ProductProp{ get;set; }
        public string SaleProp{ get;set; }
        public string ProductCode{ get;set; }
        public string Picture{ get;set; }
        public decimal? Price{ get;set; }   
        public decimal? DiscountPrice{ get;set; }   
        public decimal? Discount{ get;set; }   
        public decimal? Quantity{ get;set; }   
        public decimal? Amount{ get;set; }   
        public decimal? TotalAmount{ get;set; }   
        public decimal? FirstCommission{ get;set; }   
        public decimal? SecondCommission{ get;set; }   
        public decimal? ThirdCommission{ get;set; }   
        public decimal? FirstCommissionSet{ get;set; }   
        public decimal? SecondCommissionSet{ get;set; }   
        public decimal? ThirdCommissionSet{ get;set; }   
        public decimal? TotalCommission{ get;set; }   
        public int State{ get;set; }   
        public Guid? SMerchantGuid{ get;set; }   
        public string SKU{ get;set; }
        public decimal? WXPayMoney{ get;set; }   
        public int? IntegralTe{ get;set; }   
        public int? PresentExp{ get;set; }   
        public decimal? IntegralMoney{ get;set; }   
        public decimal? AgentDiscount{ get;set; }   
        public decimal? AgentPrice{ get;set; }   
        
        public override string ToString()
        {
            StringBuilder sb = this.EntityToGetKeyValue();
            if (sb == null)
                return base.ToString();
            else
            {
                return sb.ToString();
            }
        }
        
        #region 创建副本
        /// <summary>
        /// 创建当前 System.Object 的浅表副本
        /// </summary>
        /// <returns>返回当前实例的浅表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public object Clone()
        {
            return this.MemberwiseClone();
        }
        /// <summary>
        /// 创建当前 System.Object 的深表副本
        /// </summary>
        /// <returns>返回当前实例的深表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public T_BAS_OrderDetails DeepClone()
        {
            using (System.IO.Stream objectStream = new System.IO.MemoryStream())
            {
                System.Runtime.Serialization.IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
                formatter.Serialize(objectStream, this);
                objectStream.Seek(0, System.IO.SeekOrigin.Begin);
                return formatter.Deserialize(objectStream) as T_BAS_OrderDetails;
            }
        }
        /// <summary>
        /// 创建当前 System.Object 的浅表副本
        /// </summary>
        /// <returns>返回当前实例的浅表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public T_BAS_OrderDetails ShallowClone()
        {
            return Clone() as T_BAS_OrderDetails;
        }
        #endregion
        
        #region 实体相互转换
        protected override T_BAS_OrderDetails CurrentEntity()
        {
            return this;
        }
        #endregion
    }
}

