package org.well.well.domain;

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

@Entity
@Table(name = "data_harmful_gas")
public class WasteGas implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;
	private String devId;
	private String wellCode;
	private Date upTime;
	private Date logTime;
	private String co;
	private String o2;
	private String h2S;
	private String fireGas;
	private String descn;
	private String isOpen;
	private String pci;
	private String rsrp;
	private String snr;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	public long getId()
	{
		return id;
	}
	public void setId(long id)
	{
		this.id = id;
	}
	
	@Column(name = "DEVCODE")
	public String getDevId()
	{
		return devId;
	}
	public void setDevId(String devId)
	{
		this.devId = devId;
	}
	
	@Column(name = "UPTIME")
	public Date getUpTime()
	{
		return upTime;
	}
	public void setUpTime(Date upTime)
	{
		this.upTime = upTime;
	}
	
	@Column(name = "CO")
	public String getCo()
	{
		return co;
	}
	public void setCo(String co)
	{
		this.co = co;
	}
	@Column(name = "O2")
	public String getO2()
	{
		return o2;
	}
	public void setO2(String o2)
	{
		this.o2 = o2;
	}
	
	@Column(name = "H2S")
	public String getH2S()
	{
		return h2S;
	}
	public void setH2S(String h2s)
	{
		h2S = h2s;
	}
	
	@Column(name = "CH4")
	public String getFireGas()
	{
		return fireGas;
	}
	public void setFireGas(String fireGas)
	{
		this.fireGas = fireGas;
	}

	@Column(name = "SWITCH")
	public String getIsOpen() {
		return isOpen;
	}

	public void setIsOpen(String isOpen) {
		this.isOpen = isOpen;
	}

	@Column(name="WELL_CODE")
	public String getWellCode() {
		return wellCode;
	}

	public void setWellCode(String wellCode) {
		this.wellCode = wellCode;
	}

	@Column(name="LOGTIME")
	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	@Column(name="DESCN")
	public String getDescn() {
		return descn;
	}

	public void setDescn(String descn) {
		this.descn = descn;
	}
	@Column(name = "PCI")
	public String getPci() {
		return pci;
	}

	public void setPci(String pci) {
		this.pci = pci;
	}

	@Column(name = "RSRP")
	public String getRsrp() {
		return rsrp;
	}

	public void setRsrp(String rsrp) {
		this.rsrp = rsrp;
	}

	@Column(name = "SNR")
	public String getSnr() {
		return snr;
	}

	public void setSnr(String snr) {
		this.snr = snr;
	}
	public WasteGas(String devCode, String wellCode, Date upTime,
					String CO, String O2,String H2S, String CH4,Boolean isOpen) {
		this.devId = devCode;
		this.wellCode = wellCode;
		this.upTime = upTime;
		this.co = CO;
		this.o2 = O2;
		this.h2S = H2S;
		this.fireGas = CH4;
		this.isOpen = isOpen?"开":"关";
		this.logTime = new Date();
	}
}
