clean arch
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package fr.bonsai.api.domain.model;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class Bonsai {
|
||||
|
||||
private final UUID id;
|
||||
private String name;
|
||||
private String species;
|
||||
private int ageYears;
|
||||
|
||||
public Bonsai(UUID id, String name, String species, int ageYears) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.species = species;
|
||||
this.ageYears = ageYears;
|
||||
}
|
||||
|
||||
public static Bonsai create(String name, String species, int ageYears) {
|
||||
return new Bonsai(UUID.randomUUID(), name, species, ageYears);
|
||||
}
|
||||
|
||||
public UUID getId() { return id; }
|
||||
public String getName() { return name; }
|
||||
public String getSpecies() { return species; }
|
||||
public int getAgeYears() { return ageYears; }
|
||||
}
|
||||
Reference in New Issue
Block a user