Created
April 5, 2018 07:16
-
-
Save deepkimchi/1741f0199b5fcd6b95f7f2c1920aa431 to your computer and use it in GitHub Desktop.
This file contains 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
@Getter | |
@Setter | |
@Immutable | |
@Entity(name = "oa_genre") | |
public class OaGenreEntity { | |
@Id | |
@GeneratedValue | |
private Long id; | |
@Column(name = "path") | |
private String path; | |
@Column(name = "name") | |
private String name; | |
@OneToMany(fetch = FetchType.LAZY) | |
@JoinColumn(name = "oa_genre_id") | |
@OrderBy("display_order") | |
private Set<OaGroup> openGroups; | |
@OneToMany(fetch = FetchType.LAZY) | |
@JoinColumn(name = "genre_id") | |
private List<CampaignMissionFollowGenreEntity> missionFollowGenres; | |
} | |
@Getter | |
@Setter | |
@Immutable | |
@Entity(name = "oa_group") | |
public class OaGroup { | |
@Id | |
@GeneratedValue | |
private Long id; | |
@OneToOne(fetch = FetchType.LAZY) | |
@JoinColumn(name = "oa_id") | |
@Where(clause = "status = true") | |
private OaEntity oaEntityList; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment