fix: swagger

This commit is contained in:
2025-12-16 17:11:49 +08:00
parent 0e303e8a5c
commit 9bc2155008
16 changed files with 998 additions and 704 deletions

View File

@@ -13,16 +13,32 @@ import (
type tenant struct{}
// list
// @Router /super/v1/tenants [get]
// @Bind filter query
//
// @Summary 租户列表
// @Tags Super
// @Accept json
// @Produce json
// @Param filter query dto.TenantFilter true "Filter"
// @Success 200 {object} requests.Pager{items=dto.TenantItem}
//
// @Router /super/v1/tenants [get]
// @Bind filter query
func (*tenant) list(ctx fiber.Ctx, filter *dto.TenantFilter) (*requests.Pager, error) {
return services.Tenant.Pager(ctx, filter)
}
// list
// @Router /super/v1/tenants/:tenantID [patch]
// @Bind tenantID path
// @Bind form body
// updateExpire
//
// @Summary 更新过期时间
// @Tags Super
// @Accept json
// @Produce json
// @Param tenantID path int64 true "TenantID"
// @Param form body dto.TenantExpireUpdateForm true "Form"
//
// @Router /super/v1/tenants/:tenantID [patch]
// @Bind tenantID path
// @Bind form body
func (*tenant) updateExpire(ctx fiber.Ctx, tenantID int64, form *dto.TenantExpireUpdateForm) error {
duration, err := form.ParseDuration()
if err != nil {