-
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.
* 🐛 fix: 오타 수정 (GroupErrorStatus > GroupErrorCode) * ♻️ refactor: 도메인 이름 변경 (Group > Organization) * ✨ feat: Organization 관련 엔티티 정의 * ✨ feat: Announcement 관련 엔티티 정의 * ✨ feat: Propose 관련 엔티티 정의 * ✨ feat: Report 관련 엔티티 정의 * ♻️ refactor: Service에서 Dto를 반환하도록 수정 * 📌 chore: java 버전 명시 * ✨ feat: CustomException 정의, ExceptionAdvice 수정
- Loading branch information
1 parent
c97bbe6
commit 1f208e3
Showing
46 changed files
with
902 additions
and
365 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 |
---|---|---|
@@ -1,60 +1,61 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '3.2.0' | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
id 'java' | ||
id 'org.springframework.boot' version '3.2.0' | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
} | ||
|
||
group = 'com.sponus' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = '17' | ||
sourceCompatibility = '17' | ||
targetCompatibility = '17' | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Core | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
implementation 'org.slf4j:slf4j-api:2.0.7' | ||
|
||
// Lombok | ||
implementation 'org.projectlombok:lombok:1.18.22' | ||
annotationProcessor('org.projectlombok:lombok') | ||
testAnnotationProcessor('org.projectlombok:lombok') | ||
|
||
// Jwt | ||
implementation 'io.jsonwebtoken:jjwt-api:0.12.3' | ||
implementation 'io.jsonwebtoken:jjwt-impl:0.12.3' | ||
implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3' | ||
|
||
// Redis | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '3.2.0' | ||
implementation 'org.springframework.session:spring-session-data-redis:3.1.1' | ||
|
||
// Database | ||
runtimeOnly 'org.postgresql:postgresql' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
|
||
// Swagger | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-api:2.0.4' | ||
|
||
// Validation | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
// Core | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testImplementation 'org.springframework.security:spring-security-test' | ||
implementation 'org.slf4j:slf4j-api:2.0.7' | ||
|
||
// Lombok | ||
implementation 'org.projectlombok:lombok:1.18.22' | ||
annotationProcessor('org.projectlombok:lombok') | ||
testAnnotationProcessor('org.projectlombok:lombok') | ||
|
||
// Jwt | ||
implementation 'io.jsonwebtoken:jjwt-api:0.12.3' | ||
implementation 'io.jsonwebtoken:jjwt-impl:0.12.3' | ||
implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3' | ||
|
||
// Redis | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '3.2.0' | ||
implementation 'org.springframework.session:spring-session-data-redis:3.1.1' | ||
|
||
// Database | ||
runtimeOnly 'org.postgresql:postgresql' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
|
||
// Swagger | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-api:2.0.4' | ||
|
||
// Validation | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
} | ||
|
||
tasks.named('test') { | ||
useJUnitPlatform() | ||
useJUnitPlatform() | ||
} |
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
65 changes: 65 additions & 0 deletions
65
src/main/java/com/sponus/sponusbe/domain/announcement/entity/Announcement.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,65 @@ | ||
package com.sponus.sponusbe.domain.announcement.entity; | ||
|
||
import com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementCategory; | ||
import com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementStatus; | ||
import com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementType; | ||
import com.sponus.sponusbe.domain.organization.entity.Organization; | ||
import com.sponus.sponusbe.global.common.BaseEntity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.ConstraintMode; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.ForeignKey; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
@Entity | ||
@Table(name = "announcement") | ||
public class Announcement extends BaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "announcement_id") | ||
private Long id; | ||
|
||
@Column(name = "announcement_title") | ||
private String title; | ||
|
||
@Column(name = "announcement_type") | ||
@Enumerated(EnumType.STRING) | ||
private AnnouncementType type; | ||
|
||
@Column(name = "announcement_category") | ||
@Enumerated(EnumType.STRING) | ||
private AnnouncementCategory category; | ||
|
||
@Column(name = "announcement_content") | ||
private String content; | ||
|
||
@Column(name = "announcement_status") | ||
@Enumerated(EnumType.STRING) | ||
private AnnouncementStatus status; | ||
|
||
@Column(name = "view_count") | ||
private long viewCount; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "organization_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) | ||
private Organization writer; | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/sponus/sponusbe/domain/announcement/entity/AnnouncementAttachment.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.sponus.sponusbe.domain.announcement.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.ConstraintMode; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.ForeignKey; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
@Entity | ||
@Table(name = "announcement_attachment") | ||
public class AnnouncementAttachment { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "attachment_id") | ||
private Long id; | ||
|
||
@Column(name = "file_name") | ||
private String name; | ||
|
||
@Column(name = "file_url") | ||
private String url; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "announcement_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) | ||
private Announcement announcement; | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/com/sponus/sponusbe/domain/announcement/entity/AnnouncementImage.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,41 @@ | ||
package com.sponus.sponusbe.domain.announcement.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.ConstraintMode; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.ForeignKey; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Getter | ||
@Entity | ||
@Table(name = "announcement_image") | ||
public class AnnouncementImage { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "image_id") | ||
private Long id; | ||
|
||
@Column(name = "image_name") | ||
private String name; | ||
|
||
@Column(name = "image_url") | ||
private String url; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "announcement_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) | ||
private Announcement announcement; | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/sponus/sponusbe/domain/announcement/entity/enums/AnnouncementCategory.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,5 @@ | ||
package com.sponus.sponusbe.domain.announcement.entity.enums; | ||
|
||
public enum AnnouncementCategory { | ||
IDEA, MARKETING, DESIGN, DEVELOPMENT, OTHER | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/sponus/sponusbe/domain/announcement/entity/enums/AnnouncementStatus.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,5 @@ | ||
package com.sponus.sponusbe.domain.announcement.entity.enums; | ||
|
||
public enum AnnouncementStatus { | ||
POSTED, IN_PROGRESS, COMPLETED, CANCELLED | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/sponus/sponusbe/domain/announcement/entity/enums/AnnouncementType.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,5 @@ | ||
package com.sponus.sponusbe.domain.announcement.entity.enums; | ||
|
||
public enum AnnouncementType { | ||
SPONSORSHIP, PARTNERSHIP, COLLABORATION | ||
} |
Oops, something went wrong.