package org.academiadecodigo.enuminatti.hibernatebootstrap.inheritance.singletable;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

@Entity
@DiscriminatorValue("Boat")
public class Boat extends Vehicle {
    private Integer engines;

    public Boat() {
    }

    public Boat(Integer maxSpeed, Integer engines) {
        super(maxSpeed);
        this.engines = engines;
    }

    public Integer getEngines() {
        return engines;
    }

    public void setEngines(Integer engines) {
        this.engines = engines;
    }

    @Override
    public String toString() {
        return "Boat{" +
                "engines=" + engines +
                '}';
    }
}
