package shop.alien.entity.store.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 当前用户微信/支付宝绑定信息：昵称、平台账号标识、渠道手机号等
 */
@Data
@ApiModel("用户第三方绑定查询")
public class LifeUserThirdBindInfoVo {

    @ApiModelProperty("life_user.id")
    private Integer lifeUserId;

    @ApiModelProperty("用户账号手机号（life_user.user_phone）")
    private String lifeUserPhone;

    @ApiModelProperty("微信")
    private WechatBindItem wechat;

    @ApiModelProperty("支付宝")
    private AlipayBindItem alipay;

    @Data
    @ApiModel("微信绑定项")
    public static class WechatBindItem {
        @ApiModelProperty("是否已绑定")
        private Boolean bound;
        @ApiModelProperty("微信昵称（与 accountLabel 同源，便于前端语义）")
        private String nickName;
        @ApiModelProperty("展示名（数据库 account_label）")
        private String accountLabel;
        @ApiModelProperty("平台账号标识：openid")
        private String openid;
        @ApiModelProperty("unionid")
        private String unionid;
        @ApiModelProperty("微信侧授权手机号")
        private String bindPhone;
    }

    @Data
    @ApiModel("支付宝绑定项")
    public static class AlipayBindItem {
        @ApiModelProperty("是否已绑定")
        private Boolean bound;
        @ApiModelProperty("支付宝昵称/展示名")
        private String nickName;
        @ApiModelProperty("展示名（数据库 account_label）")
        private String accountLabel;
        @ApiModelProperty("平台账号标识：支付宝 user_id")
        private String alipayUserId;
        @ApiModelProperty("支付宝侧授权手机号")
        private String bindPhone;
    }
}
