package com.foreverwin.mesnac.equip.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Max
 * @since 2020-10-10
 */

@TableName("RESRCE")

public class Equip extends Model<Equip> implements Comparable<Equip> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "HANDLE", type = IdType.INPUT)
    private String handle;
    @TableField("SITE")
    private String site;
    @TableField("RESRCE")
    private String resrce;
    @TableField("DESCRIPTION")
    private String description;
    @TableField("STATUS_BO")
    private String statusBo;
    @TableField(exist = false)
    private String equipType;
    @TableField("CREATED_DATE_TIME")
    private Date createdDateTime;
    @TableField("MODIFIED_DATE_TIME")
    private Date modifiedDateTime;
    @TableField(exist = false)
    private String status;
    @TableField(exist = false)
    private String department;
    @TableField(exist = false)
    private String serialNumber;

    public String getStatus() {
        return status;
    }

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

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getHandle() {
        return handle;
    }

    public void setHandle(String handle) {
        this.handle = handle;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getResrce() {
        return resrce;
    }

    public void setResrce(String resrce) {
        this.resrce = resrce;
    }

    public String getDescription() {
        return description;
    }

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

    public String getStatusBo() {
        return statusBo;
    }

    public void setStatusBo(String statusBo) {
        this.statusBo = statusBo;
    }

    public String getEquipType() {
        return equipType;
    }

    public void setEquipType(String equipType) {
        this.equipType = equipType;
    }

    public Date getCreatedDateTime() {
        return createdDateTime;
    }

    public void setCreatedDateTime(Date createdDateTime) {
        this.createdDateTime = createdDateTime;
    }

    public Date getModifiedDateTime() {
        return modifiedDateTime;
    }

    public void setModifiedDateTime(Date modifiedDateTime) {
        this.modifiedDateTime = modifiedDateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.handle;
    }

    @Override
    public String toString() {
        return "Equip{" +
                "handle = " + handle +
                ", site = " + site +
                ", resrce = " + resrce +
                ", description = " + description +
                ", statusBo = " + statusBo +
                ", createdDateTime = " + createdDateTime +
                ", modifiedDateTime = " + modifiedDateTime +
                "}";
    }

    @Override
    public int compareTo(Equip o) {
        return this.getResrce().compareTo(o.getResrce());
    }
}
