mirror of
https://github.com/Prominence/car-repair-site.git
synced 2026-01-09 19:56:43 +03:00
33 lines
808 B
Java
33 lines
808 B
Java
package com.github.prominence.carrepair.model;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Table;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.math.BigDecimal;
|
|
|
|
@Entity
|
|
@Table(name = "mechanic")
|
|
public class Mechanic extends Person {
|
|
|
|
@NotNull
|
|
@Column(name = "hourlyPayment")
|
|
private BigDecimal hourlyPayment;
|
|
|
|
public Mechanic(String firstName, String middleName, String lastName, BigDecimal hourlyPayment) {
|
|
super(firstName, middleName, lastName);
|
|
this.hourlyPayment = hourlyPayment;
|
|
}
|
|
|
|
public Mechanic() {
|
|
}
|
|
|
|
public BigDecimal getHourlyPayment() {
|
|
return hourlyPayment;
|
|
}
|
|
|
|
public void setHourlyPayment(BigDecimal hourlyPayment) {
|
|
this.hourlyPayment = hourlyPayment;
|
|
}
|
|
}
|