POST /admin/tenants/{tenant_id}/invitation-codes

为指定租户批量铸造邀请码(单次 1-100 枚),用于试用租户注册(POST /tenant/public/tenants 的 invitation_code 字段)

租户服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
tenant_id path string 是 租户ID

请求体

Schema: service-tenant/internal/handler/dto.MintInvitationCodesRequest

字段类型必填示例约束描述
count integer 是 10
expires_at string 否 2027-01-01T00:00:00Z 缺省/null = 永不过期
max_uses integer 否 1

响应

引用的 Schema

dto.DataResponse-service-tenant/internal/handler/dto/MintInvitationCodesResponse

字段类型必填示例约束描述
code integer 否
data service-tenant/internal/handler/dto.MintInvitationCodesResponse 否
message string 否
timestamp string 否

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-tenant/internal/handler/dto.InvitationCodeResponse

字段类型必填示例约束描述
code string 否 AUT-K7MP-2QWX-Y4TZ
created_at string 否 2026-10-15T10:00:00Z
created_by string 否 01KSQCBNVMS6SX64PJS937CE33
expires_at string 否 2027-01-01T00:00:00Z
id string 否 01KSQCBNVMS6SX64PJS937CE33
max_uses integer 否 1
status string 否 active
tenant_id string 否 01KSQCBNVMS6SX64PJS937CE33
used_count integer 否 0

service-tenant/internal/handler/dto.MintInvitationCodesResponse

字段类型必填示例约束描述
codes array of

参见 service-tenant/internal/handler/dto.InvitationCodeResponse

否
count integer 否 10
message string 否 邀请码已生成,请妥善分发给注册用户