feat: add uuid for medias
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"backend/pkg/pg"
|
||||
|
||||
. "github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/google/uuid"
|
||||
"github.com/samber/lo"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
@@ -77,6 +78,7 @@ func TestService_List(t *testing.T) {
|
||||
Convey("insert medias data", func() {
|
||||
items := []model.Medias{
|
||||
{
|
||||
UUID: uuid.New(),
|
||||
TenantID: 1,
|
||||
Title: "title1",
|
||||
Description: "hello",
|
||||
@@ -84,6 +86,7 @@ func TestService_List(t *testing.T) {
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
UUID: uuid.New(),
|
||||
TenantID: 1,
|
||||
Title: "title2",
|
||||
Description: "hello",
|
||||
@@ -91,6 +94,7 @@ func TestService_List(t *testing.T) {
|
||||
Publish: true,
|
||||
},
|
||||
{
|
||||
UUID: uuid.New(),
|
||||
TenantID: 1,
|
||||
Title: "title3",
|
||||
Description: "hello",
|
||||
@@ -101,6 +105,7 @@ func TestService_List(t *testing.T) {
|
||||
|
||||
tbl := table.Medias
|
||||
stmt := tbl.INSERT(
|
||||
tbl.UUID,
|
||||
tbl.TenantID,
|
||||
tbl.Title,
|
||||
tbl.Description,
|
||||
|
||||
Reference in New Issue
Block a user