This commit is contained in:
aozhiwei 2024-11-13 14:04:03 +08:00
parent 10b83cd49d
commit 077324f548

View File

@ -1,13 +1,18 @@
package vo
import (
"f5"
"main/model"
)
type Chip struct {
ItemId int32 `json:"item_id"`
LeftTime int32 `json:"left_time"`
TotalTime int32 `json:"total_time"`
}
func (this *Chip) FromModel(m *model.Chip) {
nowTime := f5.GetApp().GetRealSeconds()
this.ItemId = m.ItemId
this.LeftTime = int32(nowTime) - m.ExpireTime
}