package com.xinelu.manage.domain.communityinfo;

import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 居住社区信息对象 community_info
 *
 * @author xinyilu
 * @date 2022-09-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "居住社区信息对象", description = "community_info")
public class CommunityInfo extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -1144563330958336472L;
    /**
     * 主键id
     */
    @NotNull(message = "居住社区id不能为空", groups = {Update.class})
    private Long id;

    /**
     * 所属区域编码
     */
    @NotNull(message = "所属区域编码不能为空", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "所属区域编码")
    @Excel(name = "所属区域编码")
    private String areaCode;

    /**
     * 社区编码
     */
    @ApiModelProperty(value = "社区编码")
    @Excel(name = "社区编码")
    private String communityCode;

    /**
     * 社区名称
     */
    @NotBlank(message = "社区名称", groups = {Insert.class, Update.class})
    @ApiModelProperty(value = "社区名称")
    @Excel(name = "社区名称")
    private String communityName;

    /**
     * 社区经度
     */

    @ApiModelProperty(value = "社区经度")
    @Excel(name = "社区经度")
    private String communityLongitude;

    /**
     * 社区纬度
     */
    @ApiModelProperty(value = "社区纬度")
    @Excel(name = "社区纬度")
    private String communityLatitude;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("areaCode", getAreaCode())
                .append("communityCode", getCommunityCode())
                .append("communityName", getCommunityName())
                .append("communityLongitude", getCommunityLongitude())
                .append("communityLatitude", getCommunityLatitude())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}