From 1785a1e4e73cc2f9f6458927739dc272de2e61e3 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 15 Nov 2016 14:24:19 +0900 Subject: [PATCH] fixed Discovering -> DiscoveryHistory appedn logic --- .../controller/DiscoveringController.java | 7 --- .../discovering/entity/Discovering.java | 7 --- .../repository/DiscoveringRepository.java | 7 --- .../DiscoveriyHistoryController.java | 7 +++ .../entity/DiscoveryHistory.java | 61 +++++++++++++++++++ .../DiscoveryHistoryRepository.java | 13 ++++ 6 files changed, 81 insertions(+), 21 deletions(-) delete mode 100644 src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java delete mode 100644 src/main/java/com/loafle/bridge/discovering/entity/Discovering.java delete mode 100644 src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java create mode 100644 src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java create mode 100644 src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java create mode 100644 src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java diff --git a/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java b/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java deleted file mode 100644 index 6c5c25d..0000000 --- a/src/main/java/com/loafle/bridge/discovering/controller/DiscoveringController.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.controller; - -/** - * Created by root on 16. 11. 15. - */ -public class DiscoveringController { -} diff --git a/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java b/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java deleted file mode 100644 index 57b08fc..0000000 --- a/src/main/java/com/loafle/bridge/discovering/entity/Discovering.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.entity; - -/** - * Created by root on 16. 11. 15. - */ -public class Discovering { -} diff --git a/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java b/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java deleted file mode 100644 index db003f9..0000000 --- a/src/main/java/com/loafle/bridge/discovering/repository/DiscoveringRepository.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.loafle.bridge.discovering.repository; - -/** - * Created by root on 16. 11. 15. - */ -public class DiscoveringRepository { -} diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java b/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java new file mode 100644 index 0000000..e301c67 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/controller/DiscoveriyHistoryController.java @@ -0,0 +1,7 @@ +package com.loafle.bridge.discoveryHistory.controller; + +/** + * Created by root on 16. 11. 15. + */ +public class DiscoveriyHistoryController { +} diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java b/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java new file mode 100644 index 0000000..11af482 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/entity/DiscoveryHistory.java @@ -0,0 +1,61 @@ +package com.loafle.bridge.discoveryHistory.entity; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 16. 11. 15. + */ +@Entity +public class DiscoveryHistory +{ + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + + @Column(name = "START_AT", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false) + private Date startAt; + @Column(name = "END_AT", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false) + private Date endAt; + + @Column(name="RESULT", nullable=false) + private Boolean result; + +// private null DiscoveryZone; + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public Date getStartAt() { + return startAt; + } + + public void setStartAt(Date startAt) { + this.startAt = startAt; + } + + public Date getEndAt() { + return endAt; + } + + public void setEndAt(Date endAt) { + this.endAt = endAt; + } + + public Boolean getResult() { + return result; + } + + public void setResult(Boolean result) { + this.result = result; + } + + +} \ No newline at end of file diff --git a/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java b/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java new file mode 100644 index 0000000..e8822c1 --- /dev/null +++ b/src/main/java/com/loafle/bridge/discoveryHistory/repository/DiscoveryHistoryRepository.java @@ -0,0 +1,13 @@ +package com.loafle.bridge.discoveryHistory.repository; + +import com.loafle.bridge.discoveryHistory.entity.DiscoveryHistory; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +/** + * Created by root on 16. 11. 15. + */ +@RepositoryRestResource(collectionResourceRel = "discoveryHistory", path = "discoveryHistory") +public interface DiscoveryHistoryRepository extends JpaRepository { +}