package com.zksy.base.domain;

import com.baomidou.mybatisplus.annotation.IdType;
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.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 管点-设备关联表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "gas_pipe_point_device_rel", schema = "app_user")
public class GasPipePointDeviceRel {

    @TableId(value = "rel_id", type = IdType.AUTO)
    @ApiModelProperty("关联ID")
    private Long relId;

    @ApiModelProperty("管点ID")
    private Long pointId;

    @ApiModelProperty("设备ID")
    private String equipmentId;

    @ApiModelProperty("设备名称（冗余字段，便于列表展示）")
    private String equipmentName;

    @ApiModelProperty("设备类型（冗余字段）")
    private String equipmentType;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableLogic(value = "0", delval = "2")
    @ApiModelProperty("删除标志（0=正常 2=删除）")
    private String delFlag;
}
