package com.zksy.WaterSupply.WaterPumpStation.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.LocalDate;
import java.time.LocalDateTime;

/**
 * 泵站信息实体
 */
@Data
@TableName(value = "water_pump_station", schema = "app_user")
@ApiModel(
        value = "WaterPumpStation",
        description = "泵站信息对象，包含供水泵站的所有基础属性"
)
public class WaterPumpStation {

    @ApiModelProperty(
            value = "主键ID",
            example = "0",
            position = 1,
            notes = "数据库自增主键，新增时不需要传入"
    )
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(
            value = "泵站编号",
            example = "PS001",
            required = true,
            position = 2,
            notes = "泵站唯一标识，系统内唯一"
    )
    private String stationCode;

    @ApiModelProperty(
            value = "泵站名称",
            example = "xx加压泵站1",
            required = true,
            position = 3,
            notes = "泵站的中文名称，用于显示"
    )
    private String stationName;

    @ApiModelProperty(
            value = "泵站地址",
            example = "xx大道123号",
            position = 4,
            notes = "泵站的详细地理位置"
    )
    private String location;

    @ApiModelProperty(value = "WGS84经度", example = "113.12345678")
    private BigDecimal longitude;

    @ApiModelProperty(value = "WGS84纬度", example = "23.12345678")
    private BigDecimal latitude;

    @ApiModelProperty(
            value = "水泵数量",
            example = "4",
            position = 5,
            notes = "泵站内安装的水泵总台数"
    )
    private Integer pumpCount;

    @ApiModelProperty(
            value = "设计流量",
            example = "500.00",
            position = 6,
            notes = "泵站设计最大供水流量，单位：立方米/小时(m³/h)"
    )
    private BigDecimal designFlow;

    @ApiModelProperty(
            value = "设计扬程",
            example = "60.00",
            position = 7,
            notes = "泵站设计最大供水扬程，单位：米(m)"
    )
    private BigDecimal designHead;

    @ApiModelProperty(
            value = "装机容量",
            example = "200.00",
            position = 8,
            notes = "泵站所有水泵总装机功率，单位：千瓦(kW)"
    )
    private BigDecimal powerCapacity;

    @ApiModelProperty(
            value = "投运日期",
            example = "2026-05-18",
            position = 9,
            notes = "泵站正式投入运行的日期"
    )
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate commissionDate;

    @ApiModelProperty(
            value = "运行状态",
            example = "0",
            allowableValues = "0,1,2",
            position = 10,
            notes = "0-正常运行，1-故障停运，2-检修中"
    )
    private String status;

    @ApiModelProperty(
            value = "负责人",
            example = "张三",
            position = 11,
            notes = "泵站日常运维负责人姓名"
    )
    private String principal;

    @ApiModelProperty(
            value = "联系电话",
            example = "13800138000",
            position = 12,
            notes = "负责人联系电话"
    )
    private String contactPhone;

    @ApiModelProperty(
            value = "备注",
            example = "片区主要加压泵站",
            position = 13,
            notes = "其他补充说明信息"
    )
    private String remark;

    @ApiModelProperty(
            value = "删除标志",
            example = "0",
            allowableValues = "0,2",
            hidden = true,
            position = 14,
            notes = "0-正常存在，2-已删除（逻辑删除）"
    )
    @TableLogic
    private String delFlag;

    @ApiModelProperty(
            value = "创建者",
            example = "admin",
            hidden = true,
            position = 15,
            notes = "创建该记录的用户账号"
    )
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(
            value = "创建时间",
            example = "2026-05-18 10:00:00",
            hidden = true,
            position = 16,
            notes = "记录创建的时间"
    )
    @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 = 17,
            notes = "最后修改该记录的用户账号"
    )
    @TableField(fill = com.baomidou.mybatisplus.annotation.FieldFill.UPDATE)
    private String updateBy;

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