2021-11-10 01:44:22 +00:00
|
|
|
package role
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-11-10 02:54:49 +00:00
|
|
|
"github.com/Selly-Modules/usermngmt/internal/model"
|
2021-11-10 01:44:22 +00:00
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Handle struct {
|
|
|
|
Col *mongo.Collection
|
|
|
|
}
|
|
|
|
|
|
|
|
// FindByID ...
|
2021-11-10 02:54:49 +00:00
|
|
|
func (h Handle) FindByID(ctx context.Context, id primitive.ObjectID) (model.DBRole, error) {
|
2021-11-10 01:44:22 +00:00
|
|
|
role, err := h.findByID(ctx, id)
|
|
|
|
return role, err
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create ...
|
2021-11-10 02:54:49 +00:00
|
|
|
func (h Handle) Create(payload model.RoleCreateOptions) error {
|
2021-11-10 01:44:22 +00:00
|
|
|
// TODO later
|
|
|
|
return nil
|
|
|
|
}
|