package com.zksy.WaterSupply.WaterPipeInfo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 管网信息实体
 */
@Data
@TableName(value = "water_pipe_info", schema = "app_user")
@ApiModel(value = "WaterPipeInfo", description = "管网信息对象")
public class WaterPipeInfo {

    @ApiModelProperty(value = "主键ID", example = "0", position = 1)
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "管网编号", example = "P001", required = true, position = 2)
    private String pipeCode;

    @ApiModelProperty(value = "管网名称", example = "XX路主管网", required = true, position = 3)
    private String pipeName;

    @ApiModelProperty(value = "管道材质（铸铁/PE/钢管等）", example = "PE", position = 4)
    private String pipeMaterial;

    @ApiModelProperty(value = "管径（mm）", example = "200", position = 5)
    private Integer pipeDiameter;

    @ApiModelProperty(value = "管道长度（m）", example = "120.50", position = 6)
    private BigDecimal pipeLength;

    @ApiModelProperty(value = "起点位置", example = "XX路1号", position = 7)
    private String startPoint;

    @ApiModelProperty(value = "终点位置", example = "XX路100号", position = 8)
    private String endPoint;

    @ApiModelProperty(value = "起点WGS84经度", example = "113.12345678", position = 9)
    private BigDecimal startLongitude;

    @ApiModelProperty(value = "起点WGS84纬度", example = "23.12345678", position = 10)
    private BigDecimal startLatitude;

    @ApiModelProperty(value = "终点WGS84经度", example = "113.22345678", position = 11)
    private BigDecimal endLongitude;

    @ApiModelProperty(value = "终点WGS84纬度", example = "23.22345678", position = 12)
    private BigDecimal endLatitude;

    @ApiModelProperty(value = "铺设年份", example = "2026", position = 9)
    private Integer layingYear;

    @ApiModelProperty(value = "设计压力（MPa）", example = "1.60", position = 10)
    private BigDecimal pressureRating;

    @ApiModelProperty(value = "运行状态（0正常 1停用）", example = "0", allowableValues = "0,1", position = 11)
    private String status;

    @ApiModelProperty(value = "备注", example = "主干管道", position = 12)
    private String remark;

    @ApiModelProperty(value = "删除标志（0存在 2删除）", example = "0", allowableValues = "0,2", hidden = true, position = 13)
    @TableLogic
    private String delFlag;

    @ApiModelProperty(value = "创建者", example = "admin", hidden = true, position = 14)
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "创建时间", example = "2026-05-18 10:00:00", hidden = true, position = 15)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者", example = "admin", hidden = true, position = 16)
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "更新时间", example = "2026-05-18 14:00:00", hidden = true, position = 17)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
