|
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
|
|
}
|