package com.xydl.cac.entity;


import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "iec_104_point")
@ApiModel("IEC104点表配置")
public class Iec104Point {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "eqmid")
    private String eqmid;

    @ApiModelProperty("字段")
    @Column(name = "field")
    private String field;

    @ApiModelProperty("点位类型")
    @Column(name = "stype")
    private String stype;

    @NotNull(message = "点位不能为空")
    @ApiModelProperty("点位")
    @Column(name = "sadr")
    private Integer sadr;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    private Date createTime;

}
