feat: follow llm.txt

This commit is contained in:
2025-12-18 10:27:40 +08:00
parent 819fa7f218
commit 674c562831
25 changed files with 2775 additions and 106 deletions

View File

@@ -15,7 +15,7 @@ import (
// contentAdmin provides tenant-admin content management endpoints.
//
// @provider
// @provider
type contentAdmin struct{}
func requireTenantAdmin(tenantUser *models.TenantUser) error {
@@ -34,11 +34,11 @@ func requireTenantAdmin(tenantUser *models.TenantUser) error {
// @Tags Tenant
// @Accept json
// @Produce json
// @Param tenant_code path string true "Tenant Code"
// @Param tenantCode path string true "Tenant Code"
// @Param form body dto.ContentCreateForm true "Form"
// @Success 200 {object} models.Content
//
// @Router /t/:tenant_code/v1/admin/contents [post]
// @Router /t/:tenantCode/v1/admin/contents [post]
// @Bind tenant local key(tenant)
// @Bind tenantUser local key(tenant_user)
// @Bind form body
@@ -61,12 +61,12 @@ func (*contentAdmin) create(ctx fiber.Ctx, tenant *models.Tenant, tenantUser *mo
// @Tags Tenant
// @Accept json
// @Produce json
// @Param tenant_code path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param tenantCode path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param form body dto.ContentUpdateForm true "Form"
// @Success 200 {object} models.Content
//
// @Router /t/:tenant_code/v1/admin/contents/:contentID [patch]
// @Router /t/:tenantCode/v1/admin/contents/:contentID [patch]
// @Bind tenant local key(tenant)
// @Bind tenantUser local key(tenant_user)
// @Bind contentID path
@@ -91,12 +91,12 @@ func (*contentAdmin) update(ctx fiber.Ctx, tenant *models.Tenant, tenantUser *mo
// @Tags Tenant
// @Accept json
// @Produce json
// @Param tenant_code path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param tenantCode path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param form body dto.ContentPriceUpsertForm true "Form"
// @Success 200 {object} models.ContentPrice
//
// @Router /t/:tenant_code/v1/admin/contents/:contentID/price [put]
// @Router /t/:tenantCode/v1/admin/contents/:contentID/price [put]
// @Bind tenant local key(tenant)
// @Bind tenantUser local key(tenant_user)
// @Bind contentID path
@@ -121,12 +121,12 @@ func (*contentAdmin) upsertPrice(ctx fiber.Ctx, tenant *models.Tenant, tenantUse
// @Tags Tenant
// @Accept json
// @Produce json
// @Param tenant_code path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param tenantCode path string true "Tenant Code"
// @Param contentID path int64 true "ContentID"
// @Param form body dto.ContentAssetAttachForm true "Form"
// @Success 200 {object} models.ContentAsset
//
// @Router /t/:tenant_code/v1/admin/contents/:contentID/assets [post]
// @Router /t/:tenantCode/v1/admin/contents/:contentID/assets [post]
// @Bind tenant local key(tenant)
// @Bind tenantUser local key(tenant_user)
// @Bind contentID path