/verification/guardians
为未成年用户创建监护关系。监护人必须是已认证的成年用户,创建后需监护人授权同意
请求体
Schema: service-verification/internal/handler/dto.CreateGuardianRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
guardian_user_id |
string |
是 | |||
minor_user_id |
string |
是 | |||
relation_type |
string |
是 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 监护关系创建成功 | dto.DataResponse-service-verification/internal/handler/dto/GuardianRelationshipResponse |
| 400 | 请求参数错误 | dto.SimpleResponse |
| 401 | 未认证或令牌无效 | dto.SimpleResponse |
| 500 | 服务内部错误 | dto.SimpleResponse |
引用的 Schema
dto.DataResponse-service-verification/internal/handler/dto/GuardianRelationshipResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-verification/internal/handler/dto.GuardianRelationshipResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-verification/internal/handler/dto.GuardianRelationshipResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
consent_at |
string |
否 | |||
consent_given |
boolean |
否 | |||
consent_scope |
string |
否 | |||
created_at |
string |
否 | |||
guardian_user_id |
string |
否 | |||
id |
string |
否 | |||
minor_user_id |
string |
否 | |||
relation_type |
string |
否 | |||
verified |
boolean |
否 | |||
verified_at |
string |
否 |