card_id/common/game/card/card.go

17 lines
271 B
Go
Raw Normal View History

2022-04-13 23:09:58 +00:00
package card
import "git.tuxpa.in/a/card_id/common/data"
type Card struct {
Id int `json:"id"`
Name string `json:"name"`
Rate float64 `json:"rate"`
}
func (c *Card) FromResult(d data.Result) Card {
c.Id = d.Id
c.Name = d.Name
c.Rate = d.Rate
return *c
}