package com.ltgk.port.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 镇街信息
 * </p>
 *
 * @author songzh
 * @since 2022-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ds_town_street")
@ApiModel(value = "DsTownStreet对象", description = "镇街信息")
public class DsTownStreet {
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "父级id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "镇街名称")
    @TableField(value = "name", condition = SqlCondition.LIKE)
    private String name;

    @ApiModelProperty(value = "乡镇代码")
    @TableField("town_code")
    private String townCode;

    @ApiModelProperty(value = "经度")
    @TableField("longitude")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    @TableField("latitude")
    private String latitude;

    @ApiModelProperty(value = "详细地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "街镇负责人")
    @TableField("director")
    private String director;

    @ApiModelProperty(value = "负责人电话")
    @TableField("director_phone")
    private String directorPhone;

    @ApiModelProperty(value = "排序码")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_at")
    private LocalDateTime createAt;

    @ApiModelProperty(value = "修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_at")
    private LocalDateTime updateAt;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    /**
     * 子分类
     */
    @TableField(exist = false)
    private List<DsTownStreet> children = new ArrayList<>();


    @ApiModelProperty(value = "行政区域编码")
    @TableField(value = "area_code")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @TableField(value = "area_name")
    private String areaName;
}
