adding POJOs

This commit is contained in:
Marc 2020-11-22 08:27:48 +01:00
parent e4e044782e
commit 501885c54c
5 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,7 @@
package guru.springframework.springpetclinic.model;
public class Owner extends Person {
public Owner(String firstName, String lastName) {
super(firstName, lastName);
}
}

View file

@ -0,0 +1,27 @@
package guru.springframework.springpetclinic.model;
public class Person {
private String firstName;
private String lastName;
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}

View file

@ -0,0 +1,34 @@
package guru.springframework.springpetclinic.model;
import java.time.LocalDate;
public class Pet {
private PetType petType;
private Owner owner;
private LocalDate birthDate;
public PetType getPetType() {
return petType;
}
public void setPetType(PetType petType) {
this.petType = petType;
}
public Owner getOwner() {
return owner;
}
public void setOwner(Owner owner) {
this.owner = owner;
}
public LocalDate getBirthDate() {
return birthDate;
}
public void setBirthDate(LocalDate birthDate) {
this.birthDate = birthDate;
}
}

View file

@ -0,0 +1,4 @@
package guru.springframework.springpetclinic.model;
public class PetType {
}

View file

@ -0,0 +1,7 @@
package guru.springframework.springpetclinic.model;
public class Vet extends Person {
public Vet(String firstName, String lastName) {
super(firstName, lastName);
}
}