prop.go
311 Bytes
package models
import (
"pro2d/components/db"
"pro2d/protos/pb"
"strconv"
)
type PropModels struct {
*db.MgoColl
Prop *pb.Prop
}
func NewProp(id int64) *PropModels{
data := &pb.Prop{
Id: id,
}
m := &PropModels{
MgoColl: db.NewMongoColl(strconv.Itoa(int(id)), data),
Prop: data,
}
return m
}