mongo-example/model.go

19 lines
698 B
Go
Raw Normal View History

2023-01-26 06:21:19 +00:00
package main
import "go.mongodb.org/mongo-driver/bson/primitive"
type Student struct {
ID primitive.ObjectID `bson:"_id" json:"id,omitempty"`
Name string `json:"name,omitempty"`
Sex string `json:"sex,omitempty"`
}
type Booking struct {
// booking fields
ID interface{} `json:"_id" bson:"_id,omitempty"`
Uid int `json:"uid,omitempty" bson:"uid,omitempty"`
IndustryId int `json:"industry_id,omitempty" bson:"industry_id,omitempty"`
LocationId int `json:"location_id,omitempty" bson:"location_id,omitempty"`
BaseLocationId int `json:"base_location_id,omitempty" bson:"base_location_id,omitempty"`
}