feat: 添加内容创建时间字段,优化内容列表和详情视图;添加创作者内容列表接口;优化上传和删除功能

This commit is contained in:
2026-01-06 17:03:11 +08:00
parent 1723802722
commit ab5bc8d41a
7 changed files with 177 additions and 62 deletions

View File

@@ -2,6 +2,7 @@ package v1
import (
"quyun/v2/app/http/v1/dto"
"quyun/v2/app/requests"
"quyun/v2/app/services"
"quyun/v2/database/models"
@@ -11,6 +12,28 @@ import (
// @provider
type Tenant struct{}
// List creator contents
//
// @Router /v1/creators/:id/contents [get]
// @Summary List creator contents
// @Description List contents of a specific creator
// @Tags TenantPublic
// @Accept json
// @Produce json
// @Param id path string true "Tenant ID"
// @Param page query int false "Page"
// @Param limit query int false "Limit"
// @Success 200 {object} requests.Pager
// @Bind id path
// @Bind filter query
func (t *Tenant) ListContents(ctx fiber.Ctx, id string, filter *dto.ContentListFilter) (*requests.Pager, error) {
if filter == nil {
filter = &dto.ContentListFilter{}
}
filter.TenantID = &id
return services.Content.List(ctx, filter)
}
// Get tenant public profile
//
// @Router /v1/tenants/:id [get]