forked from 9oorm-Oreum/9oorm-Oreum-backend
-
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 pull request 9oorm-Oreum#2 from 9oorm-Oreum/feat/batch
add: crossorigin 어노테이션 추가
- Loading branch information
Showing
6 changed files
with
71 additions
and
25 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.example.goorm.oreum; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.*; | ||
import java.time.LocalDateTime; | ||
import java.util.Arrays; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class Test { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
private String name; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private OreumType type; | ||
private double xPos; | ||
private double yPos; | ||
private double zPos; | ||
private int month; | ||
private int day; | ||
|
||
// 랜덤 색상값 추가해줘야 함 | ||
public void toTypeEnum(String type) { | ||
this.type = Arrays.stream(OreumType.values()) | ||
.filter(o1 -> o1.getTitle().equals(type)) | ||
.findFirst() | ||
.get(); | ||
} | ||
|
||
} | ||
|
8 changes: 8 additions & 0 deletions
8
src/main/java/com/example/goorm/oreum/repository/TestRepository.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,8 @@ | ||
package com.example.goorm.oreum.repository; | ||
|
||
import com.example.goorm.oreum.Oreum; | ||
import com.example.goorm.oreum.Test; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface TestRepository extends JpaRepository<Test, Long> { | ||
} |