BREAKING CHANGE: V2 of thr SDK #12
@ -1,9 +1,10 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gorm.io/gorm"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBaseModel_BeforeCreate(t *testing.T) {
|
func TestBaseModel_BeforeCreate(t *testing.T) {
|
||||||
@ -41,8 +42,8 @@ func TestBaseModel_BeforeCreate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
base := &BaseModel{
|
base := &BaseModel[AnthrovePostID]{
|
||||||
ID: tt.fields.ID,
|
ID: AnthrovePostID(tt.fields.ID),
|
||||||
CreatedAt: tt.fields.CreatedAt,
|
CreatedAt: tt.fields.CreatedAt,
|
||||||
UpdatedAt: tt.fields.UpdatedAt,
|
UpdatedAt: tt.fields.UpdatedAt,
|
||||||
DeletedAt: tt.fields.DeletedAt,
|
DeletedAt: tt.fields.DeletedAt,
|
||||||
|
@ -4,7 +4,7 @@ import "testing"
|
|||||||
|
|
||||||
func TestPost_TableName(t *testing.T) {
|
func TestPost_TableName(t *testing.T) {
|
||||||
type fields struct {
|
type fields struct {
|
||||||
BaseModel BaseModel
|
BaseModel BaseModel[AnthrovePostID]
|
||||||
Rating Rating
|
Rating Rating
|
||||||
Tags []Tag
|
Tags []Tag
|
||||||
Favorites []UserFavorites
|
Favorites []UserFavorites
|
||||||
|
@ -4,7 +4,7 @@ import "testing"
|
|||||||
|
|
||||||
func TestSource_TableName(t *testing.T) {
|
func TestSource_TableName(t *testing.T) {
|
||||||
type fields struct {
|
type fields struct {
|
||||||
BaseModel BaseModel
|
BaseModel BaseModel[AnthroveSourceID]
|
||||||
DisplayName string
|
DisplayName string
|
||||||
Domain string
|
Domain string
|
||||||
Icon string
|
Icon string
|
||||||
|
@ -4,7 +4,7 @@ import "testing"
|
|||||||
|
|
||||||
func TestUser_TableName(t *testing.T) {
|
func TestUser_TableName(t *testing.T) {
|
||||||
type fields struct {
|
type fields struct {
|
||||||
BaseModel BaseModel
|
BaseModel BaseModel[AnthroveUserID]
|
||||||
Favorites []UserFavorites
|
Favorites []UserFavorites
|
||||||
Sources []UserSource
|
Sources []UserSource
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user