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

namespace RFrameGenerate.Model
{
    public partial class T_BAS_Products : EntityBase<T_BAS_Products>, ICloneable
    {
        public Guid ProductGuid{ get;set; }
        public Guid ProductCategoryGuid{ get;set; }   
        public Guid? ProductTypeGuid{ get;set; }   
        public Guid? MerchantGuid{ get;set; }   
        public string ProductName{ get;set; }
        public string ProductUrl{ get;set; }
        public string QRCodeUrl{ get;set; }
        public string ProductCode{ get;set; }
        public decimal? MarketPrice{ get;set; }   
        public decimal Price{ get;set; }   
        public decimal? MinPrice{ get;set; }   
        public decimal? MaxPrice{ get;set; }   
        public bool? IsAgentsProduct{ get;set; }   
        public int Inventory{ get;set; }   
        public int Weight{ get;set; }   
        public decimal SalesVolume{ get;set; }   
        public decimal BaseSalesVolume{ get;set; }   
        public string ProductImage{ get;set; }
        public string ProductImage1{ get;set; }
        public string ProductImage2{ get;set; }
        public string ProductImage3{ get;set; }
        public string ProductImage4{ get;set; }
        public string ProductImage5{ get;set; }
        public decimal? FirstCommission{ get;set; }   
        public decimal? SecondCommission{ get;set; }   
        public decimal? ThirdCommission{ get;set; }   
        public bool? IsDefault{ get;set; }   
        public string Description{ get;set; }
        public int InventoryWay{ get;set; }   
        public bool Recommend{ get;set; }   
        public int Quota{ get;set; }   
        public bool IsPutaway{ get;set; }   
        public int Sort{ get;set; }   
        public bool IsProperty{ get;set; }   
        public bool IsStandards{ get;set; }   
        public Guid? SMerchantGuid{ get;set; }   
        public DateTime? PutawayDate{ get;set; }   
        public Guid? OriginalProductGuid{ get;set; }   
        public bool? AgentsIsPutaway{ get;set; }   
        public Guid? TemplatesGuid{ get;set; }   
        public int? CommissionType{ get;set; }   
        public decimal? FirstCommissionAmount{ get;set; }   
        public decimal? SecondCommissionAmount{ get;set; }   
        public decimal? ThirdCommissionAmount{ get;set; }   
        public bool? NoDelivery{ get;set; }   
        public bool? NoReceive{ get;set; }   
        public string CategoryCode{ get;set; }
        public int? ProductClassify{ 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_Products 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_Products;
            }
        }
        /// <summary>
        /// 创建当前 System.Object 的浅表副本
        /// </summary>
        /// <returns>返回当前实例的浅表副本,(如果当前实例中有引用对象,引用对象的地址还是指向原来的地址)</returns>
        public T_BAS_Products ShallowClone()
        {
            return Clone() as T_BAS_Products;
        }
        #endregion
        
        #region 实体相互转换
        protected override T_BAS_Products CurrentEntity()
        {
            return this;
        }
        #endregion
    }
}

