package cn.estsh.i3plus.pojo.ptl.bean;


import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;

/**
 * @author Wynne.Lu
 * @date 2020/2/12 17:41
 * @desc
 */

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_CONTROL")
@EqualsAndHashCode(callSuper = true)
@Api("控制器")
public class PtlControl extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3118824964768156554L;

    @Column(name = "CONTROL_NO")
    @ApiParam("控制器编号")
    private String controlNo;

    @Column(name = "CONTROL_NAME")
    @ApiParam("控制器名称")
    private String controlName;

    @Column(name = "CONTROL_TYPE")
    @ApiParam("控制器类型")
    private Integer controlType;

    @Column(name = "IP")
    @ApiParam("ip地址")
    private String ip;

    @Column(name = "PORT")
    @ApiParam("端口地址")
    private String port;

    @Column(name = "AREA_NO")
    @ApiParam("区域代码")
    private String areaNo;

    @Column(name = "STATUS")
    @ApiParam("控制器状态")
    private Integer status;

    @Column(name = "FREQUENCY")
    @ApiParam("监听频率")
    private Integer frequency;

    @Version
    @Column(name = "LOCK_VERSION")
    @ApiParam(value = "乐观锁", example = "1")
    public transient Integer lockVersion;

}
