-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Likelion12/1-be-도메인-작성
Feat : 도메인 작성
- Loading branch information
Showing
18 changed files
with
510 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,5 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
### macOS ### | ||
.DS_Store |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
rootProject.name = 'demo' | ||
include 'github' | ||
|
Binary file not shown.
39 changes: 39 additions & 0 deletions
39
src/main/java/com/example/likelion12/domain/ActivityRegion.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,39 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ActivityRegion extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "activity_region_id", nullable = false) | ||
private long activityRegionId; | ||
|
||
@Column(nullable = false) | ||
private String activityRegionName; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "activityRegion") | ||
private List<Crew> crewList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "activityRegion") | ||
private List<Socialring> socialringList = new ArrayList<>(); | ||
} |
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,76 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseGender; | ||
import com.example.likelion12.domain.base.BaseLevel; | ||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Crew extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "crew_id", nullable = false) | ||
private long crewId; | ||
|
||
@Column(nullable = false) | ||
private String crewName; | ||
|
||
private String crewImg; | ||
|
||
@Column(nullable = false) | ||
private int totalRecruits; | ||
|
||
@Column(nullable = false) | ||
private int crewCost; | ||
|
||
@Column(nullable = false) | ||
private String comment; | ||
|
||
@Column(nullable = false) | ||
private String commentSimple; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseGender gender; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseLevel level; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "crew") | ||
private List<MemberCrew> memberCrewList = new ArrayList<>(); | ||
|
||
/** 체육시설 과의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "facility_id") | ||
private Facility facility; | ||
|
||
/** 활동지역 과의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "activity_region_id") | ||
private ActivityRegion activityRegion; | ||
|
||
/** 운동종목 과의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "exercise_id") | ||
private Exercise exercise; | ||
} |
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,39 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Exercise extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "exercise_id", nullable = false) | ||
private long exerciseId; | ||
|
||
@Column(nullable = false) | ||
private String exerciseName; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "exercise") | ||
private List<Crew> crewList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "exercise") | ||
private List<Socialring> socialringList = new ArrayList<>(); | ||
} |
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,56 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Facility extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "facility_id", nullable = false) | ||
private long facilityId; | ||
|
||
@Column(nullable = false) | ||
private String facilityName; | ||
|
||
@Column(nullable = false) | ||
private String facilityAddress; | ||
|
||
private String facilityPhone; | ||
private String facilitySize; | ||
private String administer; | ||
private LocalDateTime weekday; | ||
private LocalDateTime weekend; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "facility") | ||
private List<Review> reviewList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "facility") | ||
private List<Socialring> socialringList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "facility") | ||
private List<Crew> crewList = new ArrayList<>(); | ||
} |
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 |
---|---|---|
@@ -1,23 +1,60 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import com.example.likelion12.domain.base.BaseGender; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Member { | ||
public class Member extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private long id; | ||
private String name; | ||
@Column(name = "member_id", nullable = false) | ||
private long memberId; | ||
|
||
@Column(nullable = false) | ||
private String memberName; | ||
|
||
@Column(nullable = false) | ||
private String id; | ||
|
||
@Column(nullable = false) | ||
private String password; | ||
|
||
private String memberImg; | ||
|
||
@Column(nullable = false) | ||
private String memberPhone; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseGender gender; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "member") | ||
private List<Review> reviewList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "member") | ||
private List<MemberSocialring> memerSocialringList = new ArrayList<>(); | ||
|
||
@JsonIgnore | ||
@OneToMany(mappedBy = "member") | ||
private List<MemberCrew> memberCrewList = new ArrayList<>(); | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/example/likelion12/domain/MemberCrew.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,42 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseRole; | ||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class MemberCrew extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "member_crew_id", nullable = false) | ||
private long memberCrewId; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseRole role; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
/** 크루 과의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "crew_id") | ||
private Crew crew; | ||
|
||
/** 멤버 와의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/example/likelion12/domain/MemberSocialring.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,42 @@ | ||
package com.example.likelion12.domain; | ||
|
||
import com.example.likelion12.domain.base.BaseRole; | ||
import com.example.likelion12.domain.base.BaseStatus; | ||
import com.example.likelion12.domain.base.BaseTime; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class MemberSocialring extends BaseTime { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "member_socialring_id", nullable = false) | ||
private long memberSocialringId; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseRole role; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private BaseStatus status; | ||
|
||
/** 크루 과의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "socialring_id") | ||
private Socialring socialring; | ||
|
||
/** 멤버 와의 연관관계의 주인 */ | ||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
} |
Oops, something went wrong.