diff --git a/dbstruct/zonemoment.go b/dbstruct/zonemoment.go index 21119699..017bbd6b 100644 --- a/dbstruct/zonemoment.go +++ b/dbstruct/zonemoment.go @@ -120,6 +120,13 @@ func (p *ZoneMoment) GetPaidText() string { return "" } -func (p *ZoneMoment) GetCoinPrice() int64 { - return util.RoundUp(float64(p.CoinPrice) / 10.0) +func (p *ZoneMoment) GetPrice() int64 { + if p != nil && p.Price != nil { + return *p.Price + } + return 0 +} + +func (p *ZoneMoment) GetCoinPrice() int64 { + return util.RoundUp(float64(p.GetPrice()) / 10.0) }