feat: update model
This commit is contained in:
@@ -118,42 +118,36 @@ func TestService_List(t *testing.T) {
|
||||
{
|
||||
MediaID: 1,
|
||||
Type: pg.MediaTypeVideo,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 1,
|
||||
Type: pg.MediaTypeAudio,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 2,
|
||||
Type: pg.MediaTypeVideo,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 2,
|
||||
Type: pg.MediaTypeAudio,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 3,
|
||||
Type: pg.MediaTypeVideo,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 3,
|
||||
Type: pg.MediaTypeAudio,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
@@ -206,10 +200,6 @@ func TestService_List1(t *testing.T) {
|
||||
|
||||
t.Log(stmt.DebugSql())
|
||||
|
||||
type list struct {
|
||||
Media model.Medias `alias:"ListItem.*"`
|
||||
}
|
||||
|
||||
var dest []ListItem
|
||||
err = stmt.QueryContext(context.TODO(), db, &dest)
|
||||
So(err, ShouldBeNil)
|
||||
@@ -234,14 +224,12 @@ func TestService_DecorateListResources(t *testing.T) {
|
||||
{
|
||||
MediaID: 1,
|
||||
Type: pg.MediaTypeVideo,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
MediaID: 2,
|
||||
Type: pg.MediaTypeAudio,
|
||||
Source: lo.ToPtr("http://www.baidu.com"),
|
||||
Size: 100,
|
||||
Publish: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user