package com.huatek.busi.entity;

import com.huatek.torch.sql.annotation.FieldName;
import com.huatek.torch.sql.annotation.Id;
import com.huatek.torch.sql.annotation.TableName;
import com.huatek.torch.sql.beans.Pojo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("busi_cable_sensor")
public class BusiCableSensor extends Pojo implements Serializable {

    private static final long serialVersionUID = 1L;

    @FieldName("id")
    @Id(value = "id")
    private String id;

    @FieldName("sensor_name")
    private String sensorName;

    @FieldName("sensor_code")
    private String sensorCode;

    @FieldName("sensor_brand")
    private String sensorBrand;

    @FieldName("status")
    private String status;

    @FieldName("position")
    private String position;

    @FieldName("position_des")
    private String positionDes;

    @FieldName("manufactor")
    private String manufactor;

    @FieldName("production_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate productionDate;

    @FieldName("use_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate useDate;

    @FieldName("equipment_id")
    private String equipmentId;

    @FieldName("equipment_type")
    private String equipmentType;

    @FieldName("site_id")
    private String siteId;

    @FieldName("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @FieldName("pd_value")
    private String pdValue;
}
