package com.xydl.cac.entity;

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.*;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "icd_ied")
@ApiModel("ied信息表")
public class IcdIed {

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

    @ApiModelProperty(name = "ICD文件id")
    @Column(name = "icd_file_id")
    private Integer icdFileId;

    @ApiModelProperty(name = "ip")
    @Column(name = "ip")
    private String ip;

    @ApiModelProperty(name = "OSI-AP-Title")
    @Column(name = "ap_title")
    private String apTitle;

    @ApiModelProperty(name = "IED名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty(name = "是否启动")
    @Column(name = "start")
    private Integer start;

    @ApiModelProperty(name = "端口")
    @Column(name = "port")
    private Integer port;

    @Transient
    private boolean connected;
    @Transient
    private int retry;
    @Transient
    private int seconds;
}