package com.gingersoft.gsa.cloud.database.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;

import java.io.Serializable;

/**
 * Created by Wyh on 2020/1/17.
 */
@Entity
public class PrinterDeviceBean implements Serializable {

    private static final long serialVersionUID = 4583366043598445115L;

    private Long id;

    @Property(nameInDb = "_id")
    @Id(autoincrement = true)
    private Long dbid;
    private String name;
    private Integer restaurantId;
    private String ip;//ip
    private Long uid;
    private Integer port;//端口
    private Integer type;//2為默認打印機，1為普通打印機

    private Long printerModelId;//打印機機型id
    private String paperSpecification;//紙張規格
    private String printerName;//打印機機型名稱
    private String model;//打印機型號
    private String noteContent;//備註
    private Long printerDeviceDefaultId;
    /**
     * 飛單1打印機id
     */
    private Long flyPrinterDeviceId;
    /**
     * 飛單2 打印機id
     */
    private Long flyPrinterDeviceId2;

    @Generated(hash = 626885316)
    public PrinterDeviceBean() {
    }

    @Generated(hash = 1228354346)
    public PrinterDeviceBean(Long id, Long dbid, String name, Integer restaurantId, String ip, Long uid, Integer port, Integer type, Long printerModelId, String paperSpecification, String printerName, String model, String noteContent, Long printerDeviceDefaultId, Long flyPrinterDeviceId, Long flyPrinterDeviceId2) {
        this.id = id;
        this.dbid = dbid;
        this.name = name;
        this.restaurantId = restaurantId;
        this.ip = ip;
        this.uid = uid;
        this.port = port;
        this.type = type;
        this.printerModelId = printerModelId;
        this.paperSpecification = paperSpecification;
        this.printerName = printerName;
        this.model = model;
        this.noteContent = noteContent;
        this.printerDeviceDefaultId = printerDeviceDefaultId;
        this.flyPrinterDeviceId = flyPrinterDeviceId;
        this.flyPrinterDeviceId2 = flyPrinterDeviceId2;
    }


    public PrinterDeviceBean(String ip, Integer port, String paperSpecification) {
        this.ip = ip;
        this.port = port;
        this.paperSpecification = paperSpecification;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDbid() {
        return dbid;
    }

    public void setDbid(Long dbid) {
        this.dbid = dbid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getRestaurantId() {
        return restaurantId;
    }

    public void setRestaurantId(Integer restaurantId) {
        this.restaurantId = restaurantId;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Integer getType() {
        if (type == null) {
            return 0;
        }
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getPrinterModelId() {
        return printerModelId;
    }

    public void setPrinterModelId(Long printerModelId) {
        this.printerModelId = printerModelId;
    }

    public String getPaperSpecification() {
        return paperSpecification;
    }

    public void setPaperSpecification(String paperSpecification) {
        this.paperSpecification = paperSpecification;
    }

    public String getPrinterName() {
        return printerName;
    }

    public void setPrinterName(String printerName) {
        this.printerName = printerName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getNoteContent() {
        return noteContent;
    }

    public void setNoteContent(String noteContent) {
        this.noteContent = noteContent;
    }

    public Long getFlyPrinterDeviceId() {
        return flyPrinterDeviceId;
    }

    public void setFlyPrinterDeviceId(Long flyPrinterDeviceId) {
        this.flyPrinterDeviceId = flyPrinterDeviceId;
    }

    public Long getFlyPrinterDeviceId2() {
        return flyPrinterDeviceId2;
    }

    public void setFlyPrinterDeviceId2(Long flyPrinterDeviceId2) {
        this.flyPrinterDeviceId2 = flyPrinterDeviceId2;
    }

    public Long getPrinterDeviceDefaultId() {
        return printerDeviceDefaultId;
    }

    public void setPrinterDeviceDefaultId(Long printerDeviceDefaultId) {
        this.printerDeviceDefaultId = printerDeviceDefaultId;
    }
}
