package util import ( "go.mongodb.org/mongo-driver/bson/primitive" "time" ) type Person struct { ID primitive.ObjectID `bson:"_id,omitempty"` Name string `bson:"name"` Age int `bson:"age,omitempty" json:"age,omitempty"` Email string `bson:"email,omitempty" json:"email,omitempty"` } type Debt struct { ID primitive.ObjectID `bson:"_id,omitempty"` PersonID primitive.ObjectID `bson:"fk_pid"` Amount int `bson:"amount"` Description string `bson:"description,omitempty"` Datetime time.Time `bson:"datetime"` } type PersonWithDebts struct { Person Person `json:"person"` Debts []Debt `json:"debts"` }