-
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 #23 from KTB16Team/feature/19-auth
Feature/19 auth
- Loading branch information
Showing
44 changed files
with
400 additions
and
101 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
Empty file.
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
6 changes: 3 additions & 3 deletions
6
...main/java/aiin/backend/auth/security/exceptionHandlingFilter/ExceptionHandlingFilter.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
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
2 changes: 1 addition & 1 deletion
2
...backend/auth/config/PropertiesConfig.java → ...ckend/common/config/PropertiesConfig.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
2 changes: 1 addition & 1 deletion
2
...a/aiin/backend/util/dto/BaseResponse.java → ...aiin/backend/common/dto/BaseResponse.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
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
4 changes: 2 additions & 2 deletions
4
.../aiin/backend/util/dto/ErrorResponse.java → ...iin/backend/common/dto/ErrorResponse.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
2 changes: 1 addition & 1 deletion
2
.../aiin/backend/util/entity/BaseEntity.java → ...iin/backend/common/entity/BaseEntity.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
2 changes: 1 addition & 1 deletion
2
.../backend/auth/exception/ApiException.java → ...ackend/common/exception/ApiException.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package aiin.backend.auth.exception; | ||
package aiin.backend.common.exception; | ||
|
||
import lombok.Getter; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...iin/backend/auth/exception/ErrorCode.java → ...n/backend/common/exception/ErrorCode.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
37 changes: 37 additions & 0 deletions
37
backend/src/main/java/aiin/backend/dispute/controller/DisputeController.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,37 @@ | ||
package aiin.backend.dispute.controller; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import aiin.backend.common.dto.DataResponse; | ||
import aiin.backend.dispute.service.AudioService; | ||
import aiin.backend.dispute.service.DialogueService; | ||
import aiin.backend.dispute.service.DisputeService; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequestMapping("/api/dispute") | ||
@RequiredArgsConstructor | ||
public class DisputeController { | ||
|
||
private final AudioService audioService; | ||
private final DisputeService disputeService; | ||
private final DialogueService dialogueService; | ||
|
||
@PostMapping("/audio") | ||
public ResponseEntity<DataResponse<Void>> uploadAudio(@RequestParam("file") MultipartFile file) { | ||
|
||
|
||
return ResponseEntity | ||
.status(HttpStatus.CREATED) | ||
.body(DataResponse.created()); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
backend/src/main/java/aiin/backend/dispute/entity/AudioRecord.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,35 @@ | ||
package aiin.backend.dispute.entity; | ||
|
||
import static lombok.AccessLevel.*; | ||
|
||
import aiin.backend.common.entity.BaseEntity; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.OneToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "audio_records") | ||
@Getter | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class AudioRecord extends BaseEntity { | ||
@Id @GeneratedValue | ||
@Column(name = "audio_id") | ||
private Long id; | ||
|
||
@Column(nullable = false, name = "audio_file_url") | ||
private String url; | ||
|
||
@Column(nullable = false, name = "audio_file_size") | ||
private String size; | ||
|
||
@Column(nullable = false, name = "audio_file_extension") | ||
private String extension; | ||
|
||
@OneToOne(mappedBy = "audioRecord") | ||
private Dispute dispute; | ||
} |
25 changes: 25 additions & 0 deletions
25
backend/src/main/java/aiin/backend/dispute/entity/DialogueRecord.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,25 @@ | ||
package aiin.backend.dispute.entity; | ||
|
||
import aiin.backend.common.entity.BaseEntity; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.OneToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.Getter; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "dialogue_records") | ||
public class DialogueRecord extends BaseEntity { | ||
@Id @GeneratedValue | ||
@Column(name = "dialogue_id") | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
private String dialogue; | ||
|
||
@OneToOne(mappedBy = "dialogueRecord") | ||
private Dispute dispute; | ||
} |
58 changes: 58 additions & 0 deletions
58
backend/src/main/java/aiin/backend/dispute/entity/Dispute.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,58 @@ | ||
package aiin.backend.dispute.entity; | ||
|
||
import static lombok.AccessLevel.*; | ||
|
||
import aiin.backend.dispute.model.OriginType; | ||
import aiin.backend.member.entity.Member; | ||
import aiin.backend.member.model.Provider; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.OneToOne; | ||
import jakarta.persistence.Table; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@Table(name = "disputes") | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Dispute { | ||
@Id @GeneratedValue | ||
@Column(name = "dispute_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id", nullable = true) | ||
private Member member; | ||
|
||
@Column(name = "stance_plaintiff") | ||
private String stanceA; | ||
|
||
@Column(name = "stance_defendant") | ||
private String stanceB; | ||
|
||
@Column(name = "summary_ai") | ||
private String summaryAi; | ||
|
||
@Column(name = "summary_masking") | ||
private String summaryMasking; | ||
|
||
@OneToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "origin_audio_id", referencedColumnName = "audio_id") | ||
private AudioRecord audioRecord; | ||
|
||
@OneToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "orgin_dialogue_id", referencedColumnName = "dialogue_id") | ||
private DialogueRecord dialogueRecord; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private OriginType originType; | ||
} |
Oops, something went wrong.