Browse Source

Currency to ShopCurrency

Vova Tkach 5 years ago
parent
commit
284d4f55e6
3 changed files with 12 additions and 12 deletions
  1. 1 1
      engine/fetdata/shop.go
  2. 8 8
      engine/fetdata/shop_currency.go
  3. 3 3
      engine/fetdata/shop_product.go

+ 1 - 1
engine/fetdata/shop.go

@@ -359,7 +359,7 @@ func (this *Shop) load() *Shop {
 						wrap:     this.wrap,
 						wrap:     this.wrap,
 						object:   &rp,
 						object:   &rp,
 						user:     &User{wrap: this.wrap, object: &ru},
 						user:     &User{wrap: this.wrap, object: &ru},
-						currency: &Currency{wrap: this.wrap, object: &rc},
+						currency: &ShopCurrency{wrap: this.wrap, object: &rc},
 						category: &ShopCategory{wrap: this.wrap, object: &ro},
 						category: &ShopCategory{wrap: this.wrap, object: &ro},
 					})
 					})
 				}
 				}

+ 8 - 8
engine/fetdata/currency.go → engine/fetdata/shop_currency.go

@@ -5,16 +5,16 @@ import (
 	"golang-fave/utils"
 	"golang-fave/utils"
 )
 )
 
 
-type Currency struct {
+type ShopCurrency struct {
 	wrap   *wrapper.Wrapper
 	wrap   *wrapper.Wrapper
 	object *utils.MySql_shop_currency
 	object *utils.MySql_shop_currency
 }
 }
 
 
-func (this *Currency) load() *Currency {
+func (this *ShopCurrency) load() *ShopCurrency {
 	return this
 	return this
 }
 }
 
 
-func (this *Currency) loadById(id int) {
+func (this *ShopCurrency) loadById(id int) {
 	if this == nil {
 	if this == nil {
 		return
 		return
 	}
 	}
@@ -46,35 +46,35 @@ func (this *Currency) loadById(id int) {
 	}
 	}
 }
 }
 
 
-func (this *Currency) Id() int {
+func (this *ShopCurrency) Id() int {
 	if this == nil {
 	if this == nil {
 		return 0
 		return 0
 	}
 	}
 	return this.object.A_id
 	return this.object.A_id
 }
 }
 
 
-func (this *Currency) Name() string {
+func (this *ShopCurrency) Name() string {
 	if this == nil {
 	if this == nil {
 		return ""
 		return ""
 	}
 	}
 	return this.object.A_name
 	return this.object.A_name
 }
 }
 
 
-func (this *Currency) Coefficient() float64 {
+func (this *ShopCurrency) Coefficient() float64 {
 	if this == nil {
 	if this == nil {
 		return 0
 		return 0
 	}
 	}
 	return this.object.A_coefficient
 	return this.object.A_coefficient
 }
 }
 
 
-func (this *Currency) Code() string {
+func (this *ShopCurrency) Code() string {
 	if this == nil {
 	if this == nil {
 		return ""
 		return ""
 	}
 	}
 	return this.object.A_code
 	return this.object.A_code
 }
 }
 
 
-func (this *Currency) Symbol() string {
+func (this *ShopCurrency) Symbol() string {
 	if this == nil {
 	if this == nil {
 		return ""
 		return ""
 	}
 	}

+ 3 - 3
engine/fetdata/shop_product.go

@@ -14,7 +14,7 @@ type ShopProduct struct {
 	object *utils.MySql_shop_product
 	object *utils.MySql_shop_product
 
 
 	user     *User
 	user     *User
-	currency *Currency
+	currency *ShopCurrency
 	category *ShopCategory
 	category *ShopCategory
 
 
 	images []*ShopProductImage
 	images []*ShopProductImage
@@ -118,14 +118,14 @@ func (this *ShopProduct) User() *User {
 	return this.user
 	return this.user
 }
 }
 
 
-func (this *ShopProduct) Currency() *Currency {
+func (this *ShopProduct) Currency() *ShopCurrency {
 	if this == nil {
 	if this == nil {
 		return nil
 		return nil
 	}
 	}
 	if this.currency != nil {
 	if this.currency != nil {
 		return this.currency
 		return this.currency
 	}
 	}
-	this.currency = (&Currency{wrap: this.wrap}).load()
+	this.currency = (&ShopCurrency{wrap: this.wrap}).load()
 	this.currency.loadById(this.object.A_currency)
 	this.currency.loadById(this.object.A_currency)
 	return this.currency
 	return this.currency
 }
 }