Discovering -> DiscoveryHistory
appedn
  logic
This commit is contained in:
snoop 2016-11-15 14:24:19 +09:00
parent a001ec151f
commit 1785a1e4e7
6 changed files with 81 additions and 21 deletions

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.controller;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveringController {
}

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.entity;
/**
* Created by root on 16. 11. 15.
*/
public class Discovering {
}

View File

@ -1,7 +0,0 @@
package com.loafle.bridge.discovering.repository;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveringRepository {
}

View File

@ -0,0 +1,7 @@
package com.loafle.bridge.discoveryHistory.controller;
/**
* Created by root on 16. 11. 15.
*/
public class DiscoveriyHistoryController {
}

View File

@ -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;
}
}

View File

@ -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<DiscoveryHistory,Long> {
}