package com.yonge.cooleshow.api.feign.dto;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonge.cooleshow.common.enums.UserLockFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 * 机构员工表
 * 2023-07-21 17:32:49
 */
public class TenantWrapper implements Serializable {

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("tenant - 机构表")
    public static class Tenant implements Serializable {

        @ApiModelProperty("主键ID")
        private Long id;

        @ApiModelProperty("名称")
        private String name;

        @ApiModelProperty("logo")
        private String logo;

        @ApiModelProperty("省份编码")
        private Integer provinceCode;

        @ApiModelProperty("城市编码")
        private Integer cityCode;

        @ApiModelProperty("地区/街道")
        private Integer regionCode;

        @ApiModelProperty("联系人")
        private String username;

        @ApiModelProperty("管理员ID，用户ID")
        private Long userId;

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

        @ApiModelProperty("启用/冻结")
        private Boolean enableFlag;

        @ApiModelProperty("简介")
        @TableField(value = "brief_introduction_")
        private String briefIntroduction;

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

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(" TenantStaff-机构员工表")
    public static class Staff implements Serializable {

        @ApiModelProperty("主键ID")
        private Long id;

        @ApiModelProperty("机构ID")
        private Long tenantId;

        @ApiModelProperty("机构状态")
        private Boolean tenantEnableFlag;

        @ApiModelProperty("用户ID")
        private Long userId;

        @ApiModelProperty("头像")
        private String avatar;

        @ApiModelProperty("昵称")
        private String nickname;

        @ApiModelProperty("IM授权签名")
        private String imToken;

        @ApiModelProperty("微信ID")
        private String wechatId;

        @ApiModelProperty("微信OpenID")
        private String wxOpenid;

        @ApiModelProperty("公众号关注标识")
        private Boolean subscribeFlag;

        @ApiModelProperty("管理员标识")
        private Boolean manageAdmin;

        @ApiModelProperty("介绍")
        private String introduction;

        @ApiModelProperty("帐号状态(注销，冻结，激活)")
        private String status;

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


    }

}