Created
May 29, 2020 08:21
-
-
Save dmi3coder/3862be00c78d62049a2442861fd4a561 to your computer and use it in GitHub Desktop.
Entity objects for React and Quarkus communication with Swagger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class JobPost extends PanacheEntity { | |
public String title; | |
public String description; | |
@ManyToOne | |
public User user; | |
@OneToMany | |
public List<JobProposal> proposals; | |
} | |
... | |
@Entity | |
public class JobProposal extends PanacheEntity { | |
public String content; | |
@ManyToOne | |
public User user; | |
@ManyToOne | |
@JoinColumn(name = "job_post_id") | |
public JobPost jobPost; | |
} | |
... | |
@Entity | |
public class User extends PanacheEntity { | |
public String name; | |
@OneToMany | |
public List<JobPost> posts; | |
@OneToMany | |
public List<JobProposal> proposals; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment