package com.ruoyi.common.utils.poi;

import com.ruoyi.common.utils.StringUtils;

public class QRCodeEntity {
    private Long id;

    private String devNo;

    private String patrolType;
    private String position;

    private String description;

    public QRCodeEntity() {
    }

    public QRCodeEntity(Long id, String devNo, String patrolType, String position) {
        this.id = id;
        this.devNo = devNo;
        this.patrolType = patrolType;
        this.position = position;
        this.description =
                "位号：" + getDevNo() + (StringUtils.isNotEmpty(getPosition()) ? " 位置：" + getPosition() : "");
    }

    public QRCodeEntity(Long id, String description, String patrolType) {
        this.id = id;
        this.description = description;
        this.patrolType = patrolType;
    }

    public Long getId() {
        return id;
    }

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

    public String getDevNo() {
        return devNo;
    }

    public void setDevNo(String devNo) {
        this.devNo = devNo;
    }

    public String getPatrolType() {
        return patrolType;
    }

    public void setPatrolType(String patrolType) {
        this.patrolType = patrolType;
    }


    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return getDescription();
    }
}
