Skip to content

Commit

Permalink
Fix : develop브랜치의 domain 파일 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
손명진 authored and 손명진 committed Jul 30, 2024
2 parents d95af63 + 7a5a601 commit d88443e
Show file tree
Hide file tree
Showing 21 changed files with 538 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 요약 (Summary)
- [x] 작업 내용 요약

## 🔑 변경 사항 (Key Changes)

- 변경 사항 작성

## 📝 리뷰 요구사항 (To Reviewers)

- [ ] 리뷰 요구사항 작성

## 확인 방법
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ out/

### VS Code ###
.vscode/
### macOS ###
.DS_Store
Binary file added .gradle/8.9/checksums/md5-checksums.bin
Binary file not shown.
Binary file added .gradle/8.9/checksums/sha1-checksums.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
rootProject.name = 'demo'
include 'github'

Binary file added src/.DS_Store
Binary file not shown.
39 changes: 39 additions & 0 deletions src/main/java/com/example/likelion12/domain/ActivityRegion.java
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<>();
}
76 changes: 76 additions & 0 deletions src/main/java/com/example/likelion12/domain/Crew.java
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;
}
39 changes: 39 additions & 0 deletions src/main/java/com/example/likelion12/domain/Exercise.java
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<>();
}
56 changes: 56 additions & 0 deletions src/main/java/com/example/likelion12/domain/Facility.java
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<>();
}
60 changes: 60 additions & 0 deletions src/main/java/com/example/likelion12/domain/Member.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.example.likelion12.domain;

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 extends BaseTime {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@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 src/main/java/com/example/likelion12/domain/MemberCrew.java
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 src/main/java/com/example/likelion12/domain/MemberSocialring.java
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;

}
Loading

0 comments on commit d88443e

Please sign in to comment.