feat: align ids to int64

This commit is contained in:
2026-01-08 09:57:04 +08:00
parent a1de16bc01
commit d98f41f1ac
39 changed files with 298 additions and 339 deletions

View File

@@ -11,7 +11,6 @@ import (
"quyun/v2/pkg/consts"
. "github.com/smartystreets/goconvey/convey"
"github.com/spf13/cast"
"github.com/stretchr/testify/suite"
"go.ipao.vip/atom/contracts"
"go.uber.org/dig"
@@ -52,11 +51,11 @@ func (s *TenantTestSuite) Test_Follow() {
models.TenantQuery.WithContext(ctx).Create(t)
Convey("should follow tenant", func() {
err := Tenant.Follow(ctx, u.ID, cast.ToString(t.ID))
err := Tenant.Follow(ctx, u.ID, t.ID)
So(err, ShouldBeNil)
// Verify stats
profile, err := Tenant.GetPublicProfile(ctx, u.ID, cast.ToString(t.ID))
profile, err := Tenant.GetPublicProfile(ctx, u.ID, t.ID)
So(err, ShouldBeNil)
So(profile.IsFollowing, ShouldBeTrue)
So(profile.Stats.Followers, ShouldEqual, 1)
@@ -68,11 +67,11 @@ func (s *TenantTestSuite) Test_Follow() {
So(list[0].Name, ShouldEqual, "Tenant A")
// Unfollow
err = Tenant.Unfollow(ctx, u.ID, cast.ToString(t.ID))
err = Tenant.Unfollow(ctx, u.ID, t.ID)
So(err, ShouldBeNil)
// Verify
profile, err = Tenant.GetPublicProfile(ctx, u.ID, cast.ToString(t.ID))
profile, err = Tenant.GetPublicProfile(ctx, u.ID, t.ID)
So(err, ShouldBeNil)
So(profile.IsFollowing, ShouldBeFalse)
So(profile.Stats.Followers, ShouldEqual, 0)