Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: group관련 전반 수정 #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/main/java/com/groupD/server/domain/entity/GroupInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.groupD.server.domain.entity;

import com.groupD.server.domain.PreferJob;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Entity
@Table(name = "groupinfo")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GroupInfo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "groupinfo_id")
private Long id;

private String name;

private String center;

private String duration;

@Enumerated(EnumType.STRING)
private PreferJob relatedJob;

private String inviteCode;
}
29 changes: 29 additions & 0 deletions src/main/java/com/groupD/server/domain/entity/GroupInfoMember.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.groupD.server.domain.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Entity
@Table(name = "groupinfo_member")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GroupInfoMember {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "groupinfo_member_id")
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "groupinfo_id")
private GroupInfo groupInfo;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "member_id")
private Member member;
}
4 changes: 4 additions & 0 deletions src/main/java/com/groupD/server/domain/entity/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public class Member extends DateEntity {
@Column(name = "member_id")
private Long id;

// @ManyToOne
// @JoinColumn(name = "groupinfo_id")
// private GroupInfo groupInfo;

@Email
@NotBlank
@Column(unique = true)
Expand Down
Loading