-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Member, GroupMember, MemberGroup 엔티티 재설계
- Loading branch information
Showing
32 changed files
with
450 additions
and
434 deletions.
There are no files selected for viewing
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
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
backend/src/main/java/wooteco/prolog/member/application/DepartmentMemberService.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package wooteco.prolog.member.application; | ||
|
||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
import wooteco.prolog.member.domain.DepartmentMember; | ||
import wooteco.prolog.member.domain.repository.DepartmentMemberRepository; | ||
|
||
@Service | ||
@AllArgsConstructor | ||
@Transactional(readOnly = true) | ||
public class DepartmentMemberService { | ||
|
||
private DepartmentMemberRepository departmentMemberRepository; | ||
|
||
public List<DepartmentMember> findDepartmentMemberByDepartmentId(Long departmentId) { | ||
return departmentMemberRepository.findByDepartmentId(departmentId); | ||
} | ||
|
||
} |
20 changes: 0 additions & 20 deletions
20
backend/src/main/java/wooteco/prolog/member/application/GroupMemberService.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
backend/src/main/java/wooteco/prolog/member/domain/Department.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package wooteco.prolog.member.domain; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Department { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Enumerated(value = EnumType.STRING) | ||
private Part part; | ||
|
||
@Enumerated(value = EnumType.STRING) | ||
private Term term; | ||
|
||
public Department(Long id, Part part, Term term) { | ||
this.id = id; | ||
this.part = part; | ||
this.term = term; | ||
} | ||
|
||
public Department(Long id, String part, String term) { | ||
this.id = id; | ||
this.part = Part.getPartByName(part); | ||
this.term = Term.getTermByName(term); | ||
} | ||
|
||
public Part getPart() { | ||
return part; | ||
} | ||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
backend/src/main/java/wooteco/prolog/member/domain/Departments.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package wooteco.prolog.member.domain; | ||
|
||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
public class Departments { | ||
|
||
private List<Department> values; | ||
|
||
public boolean isContainsDepartments(Department department) { | ||
return values.contains(department); | ||
} | ||
} |
47 changes: 0 additions & 47 deletions
47
backend/src/main/java/wooteco/prolog/member/domain/MemberGroup.java
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
backend/src/main/java/wooteco/prolog/member/domain/MemberGroupType.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
backend/src/main/java/wooteco/prolog/member/domain/MemberGroups.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.