Skip to content

Commit 1b01044

Browse files
authored
Merge pull request #2 from prgrms-aibe-devcourse/feat/#1
Entity μž‘μ„± 및 폴더 ꡬ쑰 생성
2 parents db30e5d + 58ba6bc commit 1b01044

45 files changed

Lines changed: 696 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Žbuild.gradleβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repositories {
2525

2626
dependencies {
2727
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
28-
implementation 'org.springframework.boot:spring-boot-starter-security'
28+
// implementation 'org.springframework.boot:spring-boot-starter-security'
2929
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
3030
implementation 'org.springframework.boot:spring-boot-starter-validation'
3131
implementation 'org.springframework.boot:spring-boot-starter-web'

β€Žsrc/main/java/aibe/hosik/HosikApplication.javaβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
56

67
@SpringBootApplication
8+
@EnableJpaAuditing
79
public class HosikApplication {
810

911
public static void main(String[] args) {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package aibe.hosik.analysis;
2+
3+
import aibe.hosik.apply.Apply;
4+
import jakarta.persistence.*;
5+
import lombok.AllArgsConstructor;
6+
import lombok.Builder;
7+
import lombok.Getter;
8+
import lombok.NoArgsConstructor;
9+
10+
@Entity
11+
@NoArgsConstructor
12+
@AllArgsConstructor
13+
@Builder
14+
@Getter
15+
public class Analysis {
16+
@Id
17+
@GeneratedValue(strategy = GenerationType.IDENTITY)
18+
private Long id;
19+
20+
@Column(nullable = false)
21+
private String result;
22+
23+
@Column(nullable = false)
24+
private String summary;
25+
26+
@Column(nullable = false)
27+
private int score;
28+
29+
@ManyToOne(fetch = FetchType.LAZY)
30+
private Apply apply;
31+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package aibe.hosik.analysis;
2+
3+
import lombok.RequiredArgsConstructor;
4+
import lombok.extern.slf4j.Slf4j;
5+
import org.springframework.web.bind.annotation.RequestMapping;
6+
import org.springframework.web.bind.annotation.RestController;
7+
8+
@Slf4j
9+
@RestController
10+
@RequestMapping("/api/analyses")
11+
@RequiredArgsConstructor
12+
public class AnalysisController {
13+
private final AnalysisService analysisService;
14+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package aibe.hosik.analysis;
2+
3+
import org.springframework.data.jpa.repository.JpaRepository;
4+
5+
public interface AnalysisRepository extends JpaRepository<Analysis, Long> {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package aibe.hosik.analysis;
2+
3+
import lombok.RequiredArgsConstructor;
4+
import lombok.extern.slf4j.Slf4j;
5+
import org.springframework.stereotype.Service;
6+
7+
@Slf4j
8+
@Service
9+
@RequiredArgsConstructor
10+
public class AnalysisService {
11+
private final AnalysisRepository analysisRepository;
12+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package aibe.hosik.apply;
2+
3+
import aibe.hosik.common.TimeEntity;
4+
import aibe.hosik.post.entity.Post;
5+
import aibe.hosik.resume.Resume;
6+
import jakarta.persistence.*;
7+
import lombok.AllArgsConstructor;
8+
import lombok.Builder;
9+
import lombok.Getter;
10+
import lombok.NoArgsConstructor;
11+
12+
@Entity
13+
@NoArgsConstructor
14+
@AllArgsConstructor
15+
@Builder
16+
@Getter
17+
public class Apply extends TimeEntity {
18+
@Id
19+
@GeneratedValue(strategy = GenerationType.IDENTITY)
20+
private Long id;
21+
22+
@Column
23+
private boolean isSelected;
24+
25+
@Column
26+
private String reason;
27+
28+
@ManyToOne(fetch = FetchType.LAZY)
29+
private Post post;
30+
31+
@ManyToOne(fetch = FetchType.LAZY)
32+
private Resume resume;
33+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package aibe.hosik.apply;
2+
3+
import lombok.RequiredArgsConstructor;
4+
import lombok.extern.slf4j.Slf4j;
5+
import org.springframework.web.bind.annotation.RequestMapping;
6+
import org.springframework.web.bind.annotation.RestController;
7+
8+
@Slf4j
9+
@RestController
10+
@RequestMapping("/api/applies")
11+
@RequiredArgsConstructor
12+
public class ApplyController {
13+
private final ApplyService applyService;
14+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package aibe.hosik.apply;
2+
3+
import org.springframework.data.jpa.repository.JpaRepository;
4+
5+
public interface ApplyRepository extends JpaRepository<Apply, Long> {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package aibe.hosik.apply;
2+
3+
import lombok.RequiredArgsConstructor;
4+
import lombok.extern.slf4j.Slf4j;
5+
import org.springframework.stereotype.Service;
6+
7+
@Slf4j
8+
@Service
9+
@RequiredArgsConstructor
10+
public class ApplyService {
11+
private final ApplyRepository applyRepository;
12+
}

0 commit comments

Comments
Β (0)