-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/#168-공유_관련_수정' of https://github.com/YAPP-19th/…
…Web-Team-2-Backend into feature/#176-공유_보관함_잠금_기능
- Loading branch information
Showing
41 changed files
with
831 additions
and
917 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,5 +1,6 @@ | ||
FROM openjdk:11-jdk-slim | ||
EXPOSE 8080 | ||
ARG JAR_FILE=/build/libs/Web-Team-2-Backend-0.0.1-SNAPSHOT.jar | ||
VOLUME ["/var/log"] | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=dev","/app.jar"] |
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,5 +1,6 @@ | ||
FROM openjdk:14-jdk-slim | ||
EXPOSE 8080 | ||
ARG JAR_FILE=/build/libs/Web-Team-2-Backend-0.0.1-SNAPSHOT.jar | ||
VOLUME ["/var/log"] | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=prod","/app.jar"] |
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 |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
<br> | ||
|
||
## API 문서 | ||
- http://3.39.95.212:8080/swagger-ui/index.html#/ | ||
|
||
<br> | ||
|
||
|
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
File renamed without changes.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package com.yapp.web2.domain.account.entity | |
|
||
import com.yapp.web2.domain.BaseTimeEntity | ||
import com.yapp.web2.domain.folder.entity.AccountFolder | ||
import com.yapp.web2.domain.folder.entity.Folder | ||
import com.yapp.web2.security.jwt.TokenDto | ||
import io.swagger.annotations.ApiModel | ||
import io.swagger.annotations.ApiModelProperty | ||
|
@@ -42,34 +43,6 @@ class Account( | |
const val BASIC_IMAGE_URL: String = "https://yapp-bucket-test.s3.ap-northeast-2.amazonaws.com/basicImage.png" | ||
} | ||
|
||
constructor(email: String, password: String) : this(email) { | ||
this.password = password | ||
} | ||
|
||
constructor(email: String, encryptPassword: String, fcmToken: String, name: String) : this(email) { | ||
this.password = encryptPassword | ||
this.fcmToken = fcmToken | ||
this.name = name | ||
} | ||
|
||
constructor(email: String, image: String, nickname: String, socialType: String, fcmToken: String) : this(email) { | ||
this.image = image | ||
this.name = nickname | ||
this.socialType = socialType | ||
this.fcmToken = fcmToken | ||
} | ||
|
||
fun addAccountFolder(accountFolder: AccountFolder) { | ||
this.accountFolderList.add(accountFolder) | ||
} | ||
|
||
@Transactional | ||
fun isInsideAccountFolder(accountFolder: AccountFolder): Boolean { | ||
accountFolderList.forEach { | ||
if (it.folder.id == accountFolder.folder.id) return true | ||
} | ||
return false | ||
} | ||
|
||
@Column(nullable = true) | ||
var password: String? = null | ||
|
@@ -98,9 +71,38 @@ class Account( | |
@Column | ||
var deleted: Boolean = false | ||
|
||
@OneToMany(mappedBy = "account") | ||
@OneToMany(mappedBy = "account", cascade = [CascadeType.ALL], orphanRemoval = true) | ||
var accountFolderList: MutableList<AccountFolder> = mutableListOf() | ||
|
||
constructor(email: String, password: String) : this(email) { | ||
this.password = password | ||
} | ||
|
||
constructor(email: String, encryptPassword: String, fcmToken: String, name: String) : this(email) { | ||
this.password = encryptPassword | ||
this.fcmToken = fcmToken | ||
this.name = name | ||
} | ||
|
||
constructor(email: String, image: String, nickname: String, socialType: String, fcmToken: String) : this(email) { | ||
this.image = image | ||
this.name = nickname | ||
this.socialType = socialType | ||
this.fcmToken = fcmToken | ||
} | ||
|
||
fun addAccountFolder(accountFolder: AccountFolder) { | ||
this.accountFolderList.add(accountFolder) | ||
} | ||
|
||
@Transactional | ||
fun isInsideAccountFolder(accountFolder: AccountFolder): Boolean { | ||
accountFolderList.forEach { | ||
if (it.folder.id == accountFolder.folder.id) return true | ||
} | ||
return false | ||
} | ||
|
||
@ApiModel(description = "소셜로그인 DTO") | ||
class AccountProfile( | ||
@ApiModelProperty(value = "이메일", required = true, example = "[email protected]") | ||
|
@@ -166,11 +168,10 @@ class Account( | |
val nickName: String | ||
) | ||
|
||
fun hasAccountFolder(accountFolder: AccountFolder): Boolean { | ||
for (af in this.accountFolderList) | ||
if (accountFolder == af) return true | ||
|
||
return false | ||
fun removeFolderInAccountFolder(folder: Folder) { | ||
this.accountFolderList.let { | ||
it.removeIf { af -> af.folder == folder } | ||
} | ||
} | ||
|
||
fun softDeleteAccount() { | ||
|
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
Oops, something went wrong.