package ink.wgink.service.user.pojo.dtos;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: UserAppDTO
 * @Description: APP用户
 * @Author: WangGeng
 * @Date: 2020/6/7 11:20
 * @Version: 1.0
 **/
@ApiModel
public class AppUserDTO {

    @ApiModelProperty(name = "userId", value = "用户ID")
    private String userId;
    @ApiModelProperty(name = "username", value = "用户名")
    private String username;
    @ApiModelProperty(name = "name", value = "昵称")
    private String name;
    @ApiModelProperty(name = "avatar", value = "头像")
    private String avatar;
    @ApiModelProperty(name = "phone", value = "手机")
    private String phone;
    @ApiModelProperty(name = "email", value = "邮箱")
    private String email;

    public String getUserId() {
        return userId == null ? "" : userId.trim();
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username == null ? "" : username.trim();
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name == null ? "" : name.trim();
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar == null ? "" : avatar.trim();
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPhone() {
        return phone == null ? "" : phone.trim();
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email == null ? "" : email.trim();
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"userId\":\"")
                .append(userId).append('\"');
        sb.append(",\"username\":\"")
                .append(username).append('\"');
        sb.append(",\"name\":\"")
                .append(name).append('\"');
        sb.append(",\"avatar\":\"")
                .append(avatar).append('\"');
        sb.append(",\"phone\":\"")
                .append(phone).append('\"');
        sb.append(",\"email\":\"")
                .append(email).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
