package com.yonge.cooleshow.tenant.io.request;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 用户信息
 * 2023-08-21 15:55:00
 */
@ApiModel(value = "用户对象", description = "用户对象")
public class SysUserWrapper {

    @Data
    @ApiModel("sysUer")
    public static class SysUser {

        @ApiModelProperty(value = "用户名")
        private String username;

        @ApiModelProperty(value = "手机号")
        private String phone;

        /** 头像 */
        @ApiModelProperty(value = "头像")
        private String avatar;

        @ApiModelProperty(value = "验证码")
        private String code;


        public String jsonString() {
            return JSON.toJSONString(this);
        }

        public static SysUser from(String json) {
            return JSON.parseObject(json, SysUser.class);
        }
    }

}