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

import javax.persistence.*;

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

@Entity
@Table(name = "vehicle_joined")
@Inheritance(strategy = InheritanceType.JOINED)
public class Vehicle {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private Integer maxSpeed;

    public Vehicle() {}

    public Vehicle(Integer maxSpeed) {
        this.maxSpeed = maxSpeed;
    }

    public Integer getId() {
        return id;
    }

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

    public Integer getMaxSpeed() {
        return maxSpeed;
    }

    public void setMaxSpeed(Integer maxSpeed) {
        this.maxSpeed = maxSpeed;
    }
}
