package mzap

import (
	"github.com/tech/sendico/pkg/db/storable"
	"go.mongodb.org/mongo-driver/v2/bson"
	"go.uber.org/zap"
)

func ObjRef(name string, objRef bson.ObjectID) zap.Field {
	return zap.String(name, objRef.Hex())
}

func StorableRef(obj storable.Storable) zap.Field {
	return ObjRef(obj.Collection()+"_ref", *obj.GetID())
}
