dao

package
v1.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table1

type Table1 struct {
	// mongo 主键,bson 必须是 _id
	ID   mongo.ObjectID            `bson:"_id" json:"id"`
	Txt  string                    `bson:"txt" json:"txt"`
	Ref  *mongo.Foreign[Table2]    `bson:"ref" json:"ref" ref:"def"`
	Ref2 mongo.ForeignList[Table3] `bson:"ref2" json:"ref2" ref:"match"`
}

type Table2

type Table2 struct {
	ID   string                 `bson:"_id" json:"id"`
	Name string                 `bson:"name" json:"name"`
	Ref  *mongo.Foreign[Table3] `bson:"ref" json:"ref" ref:"def"`
}

type Table3

type Table3 struct {
	ID  string `bson:"_id" json:"id"`
	Txt string `bson:"txt" json:"txt"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL