Make package for protection struct

This commit is contained in:
Nikita Tokarchuk
2020-03-09 23:48:47 +01:00
parent 6e5dccbc96
commit ab4227eaef
3 changed files with 13 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
package protection
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
// Key field stores unique document id and version
type Key struct {
X primitive.ObjectID `bson:"_x" json:"_x" index:",hashed"`
V int64 `bson:"_v" json:"_v"`
}