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-01 11:19:12
 */
@ApiModel(value = "TenantInfoVo对象", description = "机构表查询视图对象")
public class TenantInfoVo {

    @Data
    @ApiModel(" TenantInfo-机构表")
    public static class TenantInfo {

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

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

        @ApiModelProperty("logo")
        private String logo;

        @ApiModelProperty("简介")
        private String briefIntroduction;

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

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

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

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

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

}