重命名包为 core

This commit is contained in:
2025-05-07 17:38:27 +08:00
parent 60bbe47368
commit 0a16f9923c
43 changed files with 349 additions and 347 deletions

View File

@@ -3,7 +3,7 @@ package handlers
import (
"fmt"
"platform/web/auth"
"platform/web/common"
"platform/web/core"
q "platform/web/queries"
s "platform/web/services"
"time"
@@ -14,7 +14,7 @@ import (
// region ListChannels
type ListChannelsReq struct {
common.PageReq
core.PageReq
AuthType s.ChannelAuthType `json:"auth_type"`
ExpireAfter *time.Time `json:"expire_after"`
ExpireBefore *time.Time `json:"expire_before"`
@@ -46,10 +46,10 @@ func ListChannels(c *fiber.Ctx) error {
}
if req.ExpireAfter != nil {
cond.Where(q.Channel.Expiration.Gte(common.LocalDateTime(*req.ExpireAfter)))
cond.Where(q.Channel.Expiration.Gte(core.LocalDateTime(*req.ExpireAfter)))
}
if req.ExpireBefore != nil {
cond.Where(q.Channel.Expiration.Lte(common.LocalDateTime(*req.ExpireBefore)))
cond.Where(q.Channel.Expiration.Lte(core.LocalDateTime(*req.ExpireBefore)))
}
// 查询数据
@@ -75,7 +75,7 @@ func ListChannels(c *fiber.Ctx) error {
}
// 返回结果
return c.JSON(common.PageResp{
return c.JSON(core.PageResp{
Total: int(total),
Page: req.GetPage(),
Size: req.GetSize(),