Skip to content

mat-mik/dna-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solution

  1. decided to separate User and Job Offer

These two modules definitely have different reasons for change, one domain (user) is heavily generic (replaceable with an off-the-shelf solution); the other domain looks like a core.

  1. decided to extract Listing from JobOffer
    @Entity
    public class JobOffer {
    @Id
    @GeneratedValue
    private long id;
    @Enumerated(EnumType.STRING)
    private Category category;
    private Instant startDate;
    private Instant endDate;
    @OneToOne
    @JoinColumn(name = "employee_id",
    referencedColumnName = "id")
    private Employer employer;

@Entity
public class JobListing {
@Id
private long offerId;
private Category category;
private String employer;

It simplifies read model (less fields - no need for startDate, endDate or employerId), prepares domain to be rewritten with better tools at the expense of data synchronization.

Missing parts / Improve area

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages