feat: integrate WebChannelConfig into seed item configuration
This commit is contained in:
Vendored
+11
-2
@@ -2,11 +2,13 @@ package channel
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-agent/internal/models"
|
"cs-agent/internal/models"
|
||||||
|
"cs-agent/internal/pkg/dto"
|
||||||
"cs-agent/internal/pkg/enums"
|
"cs-agent/internal/pkg/enums"
|
||||||
"cs-agent/internal/repositories"
|
"cs-agent/internal/repositories"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/mlogclub/simple/common/jsons"
|
||||||
"github.com/mlogclub/simple/common/strs"
|
"github.com/mlogclub/simple/common/strs"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
@@ -62,8 +64,15 @@ func buildSeedItems(aiAgentID int64) []models.Channel {
|
|||||||
ChannelType: enums.ChannelTypeWeb,
|
ChannelType: enums.ChannelTypeWeb,
|
||||||
ChannelID: strs.UUID(),
|
ChannelID: strs.UUID(),
|
||||||
AIAgentID: aiAgentID,
|
AIAgentID: aiAgentID,
|
||||||
Status: enums.StatusOk,
|
ConfigJSON: jsons.ToJsonStr(dto.WebChannelConfig{
|
||||||
Remark: "Local testdata seed",
|
Title: "在线客服",
|
||||||
|
Subtitle: "贝壳AI提供技术支持",
|
||||||
|
ThemeColor: "#2563eb",
|
||||||
|
Position: "right",
|
||||||
|
Width: "780px",
|
||||||
|
}),
|
||||||
|
Status: enums.StatusOk,
|
||||||
|
Remark: "Local testdata seed",
|
||||||
AuditFields: models.AuditFields{
|
AuditFields: models.AuditFields{
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
CreateUserID: 0,
|
CreateUserID: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user