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

namespace RFrameGenerate.Model
{
    public partial class T_BAS_DistributionProp : EntityBase<T_BAS_DistributionProp>, ICloneable
    {
        public Guid DistributionPropGuid{ get;set; }
        public Guid? MemberGuid{ get;set; }   
        public string DistributionName{ get;set; }
        public Guid? ParentDistributionPropGuid{ get;set; }   
        public int? SubMemberNum{ get;set; }   
        public string DistributionTelphone{ get;set; }
        public string RQCode{ get;set; }
        public string DistributionQRCode{ get;set; }
        public string StoreTitle{ get;set; }
        public string StoreLogo{ get;set; }
        public DateTime? JoinDateTime{ get;set; }   
        public string SuperiorName{ get;set; }
        public decimal? DistributionAmount{ get;set; }   
        public decimal? DistributionCommissions{ get;set; }   
        public decimal? AmountFrozen{ get;set; }   
        public decimal? WithdrawalAmount{ get;set; }   
        public bool? IsEnable{ get;set; }   
        public string MarketingField{ get;set; }
        public Guid? SMerchantGuid{ get;set; }   
        public string QRCodeParamImage{ get;set; }
        public string UploadImageMediaInfo{ get;set; }
        public bool? IsVistContribute{ get;set; }   
        public Guid? DistributionTypeGuid{ get;set; }   
        public decimal? ContributeValue{ 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_DistributionProp 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_DistributionProp;
            }
        }
        /// <summary>
        /// 创建当前 System.Object 的浅表副本
        /// </summary>
        /// <returns>返回当前实例的浅表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public T_BAS_DistributionProp ShallowClone()
        {
            return Clone() as T_BAS_DistributionProp;
        }
        #endregion
        
        #region 实体相互转换
        protected override T_BAS_DistributionProp CurrentEntity()
        {
            return this;
        }
        #endregion
    }
}

