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

import javax.persistence.Entity;
import javax.persistence.Table;

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

@Entity
@Table(name = "boat_joined")
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 +
                '}';
    }
}
