package com.ozs.entity;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 首页机车树形结构表
 *
 * @author buzy
 */

@Data
@Builder
public class VehicleTree implements Serializable, Comparable<VehicleTree> {

    private static final long serialVersionUID = 1L;
    String code;
    String name;
    boolean flay;
    Integer mileage;
    List<VehicleTree> children;

    public VehicleTree() {
    }

    public VehicleTree(String code, String name, boolean flay, Integer mileage, List<VehicleTree> children) {
        this.code = code;
        this.name = name;
        this.flay = flay;
        this.mileage = mileage;
        this.children = children;
    }

    @Override
    public int compareTo(VehicleTree o) {
        int i = o.getName().compareTo(o.name);
        return i;
    }
}
