import "../base.api"

type (
    // The data of aliyun avatar information | AliyunAvatar信息
    AliyunAvatarInfo {
        BaseIDInfo

        // user_id | wx_card_user_id 
        UserId  *uint64 `json:"userId,optional"`

        // biz_id | BizId 
        BizId  *string `json:"bizId,optional"`

        // access_key_id | AccessKeyId 
        AccessKeyId  *string `json:"accessKeyId,optional"`

        // access_key_secret | AccessKeySecret 
        AccessKeySecret  *string `json:"accessKeySecret,optional"`

        // app_id | AppId 
        AppId  *string `json:"appId,optional"`

        // tenant_id | TenantId 
		TenantId  *uint64 `json:"TenantId,optional"`

        // response | 阿里云avatar响应 
        Response  *string `json:"response,optional"`

        // token | Token 
        Token  *string `json:"token,optional"`

        // session_id | SessionId 
        SessionId  *string `json:"sessionId,optional"`
    }

    // The response data of aliyun avatar list | AliyunAvatar列表数据
    AliyunAvatarListResp {
        BaseDataInfo

        // AliyunAvatar list data | AliyunAvatar列表数据
        Data AliyunAvatarListInfo `json:"data"`
    }

    // AliyunAvatar list data | AliyunAvatar列表数据
    AliyunAvatarListInfo {
        BaseListInfo

        // The API list data | AliyunAvatar列表数据
        Data  []AliyunAvatarInfo  `json:"data"`
    }

    // Get aliyun avatar list request params | AliyunAvatar列表请求参数
    AliyunAvatarListReq {
        PageInfo

        // biz_id | BizId 
        BizId  *string `json:"bizId,optional"`

        // access_key_id | AccessKeyId 
        AccessKeyId  *string `json:"accessKeyId,optional"`

        // access_key_secret | AccessKeySecret 
        AccessKeySecret  *string `json:"accessKeySecret,optional"`
    }

    // AliyunAvatar information response | AliyunAvatar信息返回体
    AliyunAvatarInfoResp {
        BaseDataInfo

        // AliyunAvatar information | AliyunAvatar数据
        Data AliyunAvatarInfo `json:"data"`
    }
)

@server(
    jwt: Auth
    group: aliyun_avatar
    middleware: Authority
)

service Wechat {
    // Create aliyun avatar information | 创建AliyunAvatar
    @handler createAliyunAvatar
    post /aliyun_avatar/create (AliyunAvatarInfo) returns (BaseMsgResp)

    // Update aliyun avatar information | 更新AliyunAvatar
    @handler updateAliyunAvatar
    post /aliyun_avatar/update (AliyunAvatarInfo) returns (BaseMsgResp)

    // Delete aliyun avatar information | 删除AliyunAvatar信息
    @handler deleteAliyunAvatar
    post /aliyun_avatar/delete (IDsReq) returns (BaseMsgResp)

    // Get aliyun avatar list | 获取AliyunAvatar列表
    @handler getAliyunAvatarList
    post /aliyun_avatar/list (AliyunAvatarListReq) returns (AliyunAvatarListResp)

    // Get aliyun avatar by ID | 通过ID获取AliyunAvatar
    @handler getAliyunAvatarById
    post /aliyun_avatar (IDReq) returns (AliyunAvatarInfoResp)
}
