Bootstrap copied BFF and local accounts with public Sendico contracts (#34)
This commit is contained in:
1 parent
67dc5b5b1e
commit
7062672a87
556 files changed
+42291
-777
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import "go.mongodb.org/mongo-driver/v2/bson"
|
||||
|
||||
// ScopedStorable is the type constraint for resources that follow the
|
||||
// personal-vs-org dual-ownership model. ScopedDBImp[T] provides generic
|
||||
// CRUD and bulk operations for any T satisfying this interface without
|
||||
// the permissionRef==NilObjectID sentinel pattern that ProtectedDBImp requires
|
||||
// for personal-owned resources.
|
||||
//
|
||||
// Resources that embed model.PermissionBound and model.Owner satisfy
|
||||
// ScopedStorable automatically once SetOwnerKind/SetOwnerRef methods are added.
|
||||
type ScopedStorable interface {
|
||||
OwnerBound
|
||||
SetOwnerKind(OwnerKind)
|
||||
SetOwnerRef(bson.ObjectID)
|
||||
GetPermissionRef() bson.ObjectID
|
||||
SetPermissionRef(bson.ObjectID)
|
||||
}
|
||||
Reference in new issue
Block a user