add field id in group
This commit is contained in:
parent
0e7dde9a9f
commit
52fb59cc01
2 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@ struct Game {
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||||
pub struct Group {
|
pub struct Group {
|
||||||
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub game: String,
|
pub game: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package models
|
||||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
|
||||||
type Group struct {
|
type Group struct {
|
||||||
Id primitive.ObjectID `bson:"_id", omitempty`
|
Id primitive.ObjectID `bson:"_id" json:"id", omitempty`
|
||||||
Name string `bson:"name" json:"name"`
|
Name string `bson:"name" json:"name"`
|
||||||
Desc string `bson:"desc"`
|
Desc string `bson:"desc"`
|
||||||
NbMax int `bson:"nbMax"`
|
NbMax int `bson:"nbMax"`
|
||||||
|
|
Loading…
Reference in a new issue