Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
@@ -0,0 +1,33 @@
package rechargeser
import (
"testing"
"91porn-server/models/v/rchgordmod"
)
func TestBaiYuanCopiesOrderAttribution(t *testing.T) {
order := &rchgordmod.RechargeOrder{
SourcePage: "VIDEO_BOTTOM_SHEET",
SourceRef: "source-ref",
VideoID: "video-id",
ActivityID: "activity-id",
ExperimentID: "experiment-id",
ExperimentVariant: "A",
SessionID: "session-id",
}
records := BaiYuan([]*rchgordmod.RechargeOrder{order})
if len(records) != 1 {
t.Fatalf("len(records) = %d", len(records))
}
record := records[0]
if record.SourcePage != order.SourcePage ||
record.SourceRef != order.SourceRef ||
record.VideoID != order.VideoID ||
record.ActivityID != order.ActivityID ||
record.ExperimentID != order.ExperimentID ||
record.ExperimentVariant != order.ExperimentVariant ||
record.SessionID != order.SessionID {
t.Fatalf("attribution not copied: %#v", record)
}
}