package productsmodel import "qteam/app/http/domains" func (p *Products) FromDomain(do domains.Product) { p.Id = do.Id p.Productname = do.ProductName p.Producttype = do.ProductType p.Packetrule = do.PacketRule p.Productkind = do.ProductKind p.Amount = do.Amount p.Coupontype = do.CouponType p.Issuperposition = do.IsSuperposition p.Status = do.Status p.Isneedbill = do.TemplateId p.Createtime = do.CreateTime p.Supplierproductname = do.SupplierProductName p.Supplierproductid = do.SupplierProductId } func (p *Products) ToDomain() (do domains.Product) { do.Id = p.Id do.ProductName = p.Productname do.ProductType = p.Producttype do.PacketRule = p.Packetrule do.ProductKind = p.Productkind do.Amount = p.Amount do.CouponType = p.Coupontype do.IsSuperposition = p.Issuperposition do.Status = p.Status do.TemplateId = p.Isneedbill do.CreateTime = p.Createtime do.SupplierProductName = p.Supplierproductname do.SupplierProductId = p.Supplierproductid return }