feat: add features
This commit is contained in:
@@ -4,8 +4,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"backend/common/service/model"
|
||||
"backend/pkg/pg"
|
||||
"backend/providers/wechat"
|
||||
|
||||
"git.ipao.vip/rogeecn/atom"
|
||||
"github.com/jinzhu/copier"
|
||||
)
|
||||
|
||||
func Test_GenModel(t *testing.T) {
|
||||
@@ -14,3 +17,18 @@ func Test_GenModel(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GenModel2(t *testing.T) {
|
||||
token := &wechat.AuthorizeAccessToken{
|
||||
AccessToken: "123",
|
||||
RefreshToken: "123",
|
||||
ExpiresIn: 123,
|
||||
Openid: "123",
|
||||
Scope: "123",
|
||||
}
|
||||
|
||||
var oauthInfo pg.UserOAuth
|
||||
copier.Copy(&oauthInfo, token)
|
||||
|
||||
t.Logf("%+v", oauthInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user