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

import com.alibaba.fastjson.JSON;
import com.microsvc.toolkit.common.response.paging.QueryInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 区域表
 * 2022-11-23 18:28:58
 */
@ApiModel(value = "SysAreaVo对象", description = "区域表查询视图对象")
public class SysAreaVo {

    @Data
    @ApiModel(" SysAreaList-区域表")
    public static class SysAreaQuery implements QueryInfo {

    	@ApiModelProperty("父节点")
    	private Integer parentId;

        @ApiModelProperty("当前页")
        private Integer page;

        @ApiModelProperty("分页行数")
        private Integer rows;

    }

    @Data
    @ApiModel(" SysArea-区域表")
    public static class SysArea {


		@ApiModelProperty("")
        private Integer id;


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


		@ApiModelProperty("编码")
        private Integer code;


		@ApiModelProperty("创建时间")
        private Date createTime;


		@ApiModelProperty("修改时间")
        private Date updateTime;


		@ApiModelProperty("是否删除  -1：已删除  0：正常")
        private String delFlag;


		@ApiModelProperty("父节点编号")
        private Integer parentOrganId;

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

    @Data
    @ApiModel(" SysAreaList-区域表")
    public static class SysAreaList {


		@ApiModelProperty("")
        private Integer id;


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


		@ApiModelProperty("编码")
        private Integer code;


		@ApiModelProperty("创建时间")
        private Date createTime;


		@ApiModelProperty("修改时间")
        private Date updateTime;


		@ApiModelProperty("是否删除  -1：已删除  0：正常")
        private String delFlag;


		@ApiModelProperty("父节点编号")
        private Integer parentOrganId;

        @ApiModelProperty("区域数")
        private Integer number;
    }

    @Data
    @ApiModel("省份")
    public static class Province implements Serializable {

        @ApiModelProperty("主键Id")
        private Integer id;

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

        @ApiModelProperty("编码")
        private Integer code;

        @ApiModelProperty("父节点编号")
        private Integer parentOrganId;

        @ApiModelProperty("城市")
        private List<City> areas;


        public Province cities(List<City> cities) {
            this.areas = cities;
            return this;
        }
    }

    @Data
    @ApiModel("城市")
    public static class City implements Serializable {

        @ApiModelProperty("主键Id")
        private Integer id;

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

        @ApiModelProperty("编码")
        private Integer code;

        @ApiModelProperty("父节点编号")
        private Integer parentOrganId;

        @ApiModelProperty("地区/街道")
        private List<District> areas;

    }

    @Data
    @ApiModel("地区/街道")
    public static class District implements Serializable {

        @ApiModelProperty("主键Id")
        private Integer id;

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

        @ApiModelProperty("编码")
        private Integer code;
    }
}
