feat: implement final Experience API
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.pablotj.portfolio.domain.experience;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class Achievement {
|
||||
private final ArchivementId id;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.pablotj.portfolio.domain.experience;
|
||||
|
||||
public record ArchivementId(Long value) {
|
||||
public ArchivementId {
|
||||
if (value != null && value < 0) throw new IllegalArgumentException("ArchivementId must be positive");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.pablotj.portfolio.domain.experience;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -7,7 +9,15 @@ import lombok.Getter;
|
||||
@Builder
|
||||
public class Experience {
|
||||
private final ExperienceId id;
|
||||
private final String title;
|
||||
private final String position;
|
||||
private final String company;
|
||||
private final LocalDate startDate;
|
||||
private final LocalDate endDate;
|
||||
private final String city;
|
||||
private final String region;
|
||||
private final String country;
|
||||
private final Boolean remote;
|
||||
private final String description;
|
||||
private final String url;
|
||||
private final List<Skill> skills;
|
||||
private final List<Achievement> achievements;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.pablotj.portfolio.domain.experience;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
public class Skill {
|
||||
private final SkillId id;
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.pablotj.portfolio.domain.experience;
|
||||
|
||||
public record SkillId(Long value) {
|
||||
public SkillId {
|
||||
if (value != null && value < 0) throw new IllegalArgumentException("SkillId must be positive");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user