package com.wsm.admin.model;

import com.wsm.common.model.BaseModel;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 设备状态表
 */
@Entity
@Table(name = "tb_device_status")
@Where(clause = "rec_status='A'")
public class DeviceStatus extends BaseModel implements Serializable {

    private static final long serialVersionUID = 5512725645194142786L;

    @ManyToOne(fetch = FetchType.LAZY)
    private Device device;

    private String content;
    /**
     * 状态类型：0-正常  1-报警  2-低压  3-故障
     */
    @Column(length = 2)
    private Byte status;

    public Device getDevice() {
        return device;
    }

    public void setDevice(Device device) {
        this.device = device;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }
}
