feat: expand superadmin edits and minio docs

This commit is contained in:
2026-01-17 19:32:46 +08:00
parent 3af5b20bcc
commit 984a404b5f
25 changed files with 2688 additions and 36 deletions

View File

@@ -28,6 +28,24 @@ func (c *payoutAccounts) List(ctx fiber.Ctx, filter *dto.SuperPayoutAccountListF
return services.Super.ListPayoutAccounts(ctx, filter)
}
// Create payout account
//
// @Router /super/v1/creators/:tenantID<int>/payout-accounts [post]
// @Summary Create payout account
// @Description Create payout account for tenant
// @Tags Finance
// @Accept json
// @Produce json
// @Param tenantID path int64 true "Tenant ID"
// @Param form body dto.SuperPayoutAccountCreateForm true "Create form"
// @Success 200 {string} string "Created"
// @Bind user local key(__ctx_user)
// @Bind tenantID path
// @Bind form body
func (c *payoutAccounts) Create(ctx fiber.Ctx, user *models.User, tenantID int64, form *dto.SuperPayoutAccountCreateForm) error {
return services.Super.CreatePayoutAccount(ctx, user.ID, tenantID, form)
}
// Remove payout account
//
// @Router /super/v1/payout-accounts/:id<int> [delete]
@@ -61,3 +79,21 @@ func (c *payoutAccounts) Remove(ctx fiber.Ctx, user *models.User, id int64) erro
func (c *payoutAccounts) Review(ctx fiber.Ctx, user *models.User, id int64, form *dto.SuperPayoutAccountReviewForm) error {
return services.Super.ReviewPayoutAccount(ctx, user.ID, id, form)
}
// Update payout account
//
// @Router /super/v1/payout-accounts/:id<int> [patch]
// @Summary Update payout account
// @Description Update payout account across tenants
// @Tags Finance
// @Accept json
// @Produce json
// @Param id path int64 true "Payout account ID"
// @Param form body dto.SuperPayoutAccountUpdateForm true "Update form"
// @Success 200 {string} string "Updated"
// @Bind user local key(__ctx_user)
// @Bind id path
// @Bind form body
func (c *payoutAccounts) Update(ctx fiber.Ctx, user *models.User, id int64, form *dto.SuperPayoutAccountUpdateForm) error {
return services.Super.UpdatePayoutAccount(ctx, user.ID, id, form)
}