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

namespace RFrameGenerate.Model
{
    public partial class T_BAS_Orders : EntityBase<T_BAS_Orders>, ICloneable
    {
        public Guid OrderGuid{ get;set; }
        public Guid? LogisticrGuid{ get;set; }   
        public Guid? MemberGuid{ get;set; }   
        public Guid? MerchantGuid{ get;set; }   
        public Guid? RecieverAddressGuid{ get;set; }   
        public Guid? DistributionPropGuid{ get;set; }   
        public Guid? MerchantPayWayGuid{ get;set; }   
        public string OrderNo{ get;set; }
        public int? OrderInnerState{ get;set; }   
        public int OrderState{ get;set; }   
        public DateTime OrderTime{ get;set; }   
        public DateTime? PayTime{ get;set; }   
        public DateTime? CompletedTime{ get;set; }   
        public string PayAccount{ get;set; }
        public string PayWay{ get;set; }
        public DateTime? DeliveryTime{ get;set; }   
        public string PayNO{ get;set; }
        public string Remark{ get;set; }
        public string OrderSource{ get;set; }
        public decimal? TotalMoney{ get;set; }   
        public bool? IsExtendReceiving{ get;set; }   
        public int? ExtendDay{ get;set; }   
        public bool? IsDistribute{ get;set; }   
        public decimal? Quantity{ get;set; }   
        public bool? IsComment{ get;set; }   
        public string TransactionID{ get;set; }
        public string Package{ get;set; }
        public Guid? SMerchantGuid{ get;set; }   
        public decimal? Freight{ get;set; }   
        public string RecieverAddressInfo{ get;set; }
        public decimal? PrivilegelMoney{ get;set; }   
        public int? Privilege{ get;set; }   
        public Guid? PrivilegeGuid{ get;set; }   
        public decimal? WXPayMoney{ get;set; }   
        public bool? IsVirtual{ get;set; }   
        public bool? NoDelivery{ get;set; }   
        public bool? NoReceive{ get;set; }   
        public int? IntegralTe{ get;set; }   
        public int? PresentExp{ get;set; }   
        public decimal? IntegralMoney{ get;set; }   
        public int? InPresentExp{ get;set; }   
        public decimal? InProductAmount{ get;set; }   
        public int? InProportionIntegral{ get;set; }   
        public bool? HasPresented{ get;set; }   
        public DateTime? PresentedTime{ get;set; }   
        public bool? HasFactoraged{ get;set; }   
        public bool? HasProfited{ get;set; }   
        public int? ProductClassify{ get;set; }   
        public decimal? FreightFirstCom{ get;set; }   
        public decimal? FreightSecondCom{ get;set; }   
        public decimal? FreightThirdCom{ get;set; }   
        public bool? HasCountSale{ 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_Orders 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_Orders;
            }
        }
        /// <summary>
        /// 创建当前 System.Object 的浅表副本
        /// </summary>
        /// <returns>返回当前实例的浅表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public T_BAS_Orders ShallowClone()
        {
            return Clone() as T_BAS_Orders;
        }
        #endregion
        
        #region 实体相互转换
        protected override T_BAS_Orders CurrentEntity()
        {
            return this;
        }
        #endregion
    }
}

