init: hgmj server initial commit

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:50:13 +08:00
co-authored by Claude Opus 4.7
commit 625e89c15d
1870 changed files with 254090 additions and 0 deletions
@@ -0,0 +1,27 @@
package vidser
import (
"testing"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func TestApplyScheduledVideoModuleID(t *testing.T) {
moduleID := primitive.NewObjectID()
update := bson.M{}
applyScheduledVideoModuleID(update, moduleID)
if got := update["mId"]; got != moduleID.Hex() {
t.Fatalf("mId = %v, want %s", got, moduleID.Hex())
}
}
func TestApplyScheduledVideoModuleIDIgnoresEmptyID(t *testing.T) {
update := bson.M{}
applyScheduledVideoModuleID(update, primitive.NilObjectID)
if _, ok := update["mId"]; ok {
t.Fatal("empty module id must not be written")
}
}