1
This commit is contained in:
parent
10b83cd49d
commit
077324f548
@ -1,13 +1,18 @@
|
|||||||
package vo
|
package vo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"f5"
|
||||||
"main/model"
|
"main/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Chip struct {
|
type Chip struct {
|
||||||
ItemId int32 `json:"item_id"`
|
ItemId int32 `json:"item_id"`
|
||||||
|
LeftTime int32 `json:"left_time"`
|
||||||
|
TotalTime int32 `json:"total_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Chip) FromModel(m *model.Chip) {
|
func (this *Chip) FromModel(m *model.Chip) {
|
||||||
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
this.ItemId = m.ItemId
|
this.ItemId = m.ItemId
|
||||||
|
this.LeftTime = int32(nowTime) - m.ExpireTime
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user