package com.hc.business.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;


/**
 * 省份表(AreaDistrict)实体类
 *
 * @author java
 * @since 2020-11-20 12:48:44
 */

@ApiModel(value = "地区表")
public class AreaDistrict implements Serializable {

    private static final long serialVersionUID = -60609528264342036L;

    /**
     * 地区编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "地区编号")
    private Integer areaId;

    /**
     * 地区名称
     */
    @ApiModelProperty(value = "地区名称", required = true)
    @NotNull
    private String areaName;

    /**
     * 父级编号
     */
    @ApiModelProperty(value = "父级编号", required = true)
    @NotNull
    private Integer parentId;

    /**
     * 省级配图
     */
    @ApiModelProperty(value = "省级配图", required = true)
    private String areaImage;

    /**
     * 地区状态 0/锁定 1/开放
     */
    @ApiModelProperty(value = "地区状态 0/锁定 1/开放", required = true)
    private Integer areaStatus;

    /**
     * 地区索引
     */
    @ApiModelProperty(value = "地区索引", required = true)
    @NotNull
    private Integer areaIndex;

    /**
     * 构造的
     */
    @Transient
    private List<AreaDistrict> areaDistrictList;

    public AreaDistrict(Integer areaId, @NotNull String areaName,
                        @NotNull Integer parentId, String areaImage,
                        Integer areaStatus, @NotNull Integer areaIndex) {
        this.areaId = areaId;
        this.areaName = areaName;
        this.parentId = parentId;
        this.areaImage = areaImage;
        this.areaStatus = areaStatus;
        this.areaIndex = areaIndex;
    }

    public AreaDistrict() {
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getAreaImage() {
        return areaImage;
    }

    public void setAreaImage(String areaImage) {
        this.areaImage = areaImage;
    }

    public Integer getAreaStatus() {
        return areaStatus;
    }

    public void setAreaStatus(Integer areaStatus) {
        this.areaStatus = areaStatus;
    }

    public Integer getAreaIndex() {
        return areaIndex;
    }

    public void setAreaIndex(Integer areaIndex) {
        this.areaIndex = areaIndex;
    }

    public List<AreaDistrict> getAreaDistrictList() {
        return areaDistrictList;
    }

    public void setAreaDistrictList(List<AreaDistrict> areaDistrictList) {
        this.areaDistrictList = areaDistrictList;
    }

}