mirror of
https://github.com/sismics/docs.git
synced 2024-11-14 10:27:55 +01:00
#67: Relations database schema
This commit is contained in:
parent
f927193ae9
commit
7e983bebb9
@ -13,7 +13,7 @@ import com.google.common.base.MoreObjects;
|
||||
* @author bgamard
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "T_Contributor")
|
||||
@Table(name = "T_CONTRIBUTOR")
|
||||
public class Contributor {
|
||||
/**
|
||||
* Contributor ID.
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.sismics.docs.core.model.jpa;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
|
||||
/**
|
||||
* Relation entity.
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "T_RELATION")
|
||||
public class Relation {
|
||||
/**
|
||||
* Relation ID.
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "REL_ID_C", length = 36)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* Source document ID.
|
||||
*/
|
||||
@Column(name = "REL_IDDOCFROM_C", length = 36, nullable = false)
|
||||
private String fromDocumentId;
|
||||
|
||||
/**
|
||||
* Destination document ID.
|
||||
*/
|
||||
@Column(name = "REL_IDDOCTO_C", length = 36, nullable = false)
|
||||
private String toDocumentId;
|
||||
|
||||
/**
|
||||
* Deletion date.
|
||||
*/
|
||||
@Column(name = "REL_DELETEDATE_D")
|
||||
private Date deleteDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFromDocumentId() {
|
||||
return fromDocumentId;
|
||||
}
|
||||
|
||||
public void setFromDocumentId(String fromDocumentId) {
|
||||
this.fromDocumentId = fromDocumentId;
|
||||
}
|
||||
|
||||
public String getToDocumentId() {
|
||||
return toDocumentId;
|
||||
}
|
||||
|
||||
public void setToDocumentId(String toDocumentId) {
|
||||
this.toDocumentId = toDocumentId;
|
||||
}
|
||||
|
||||
public Date getDeleteDate() {
|
||||
return deleteDate;
|
||||
}
|
||||
|
||||
public void setDeleteDate(Date deleteDate) {
|
||||
this.deleteDate = deleteDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("id", id)
|
||||
.add("fromDocumentId", fromDocumentId)
|
||||
.add("toDocumentId", toDocumentId)
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
db.version=6
|
||||
db.version=7
|
@ -0,0 +1,3 @@
|
||||
create cached table T_RELATION ( REL_ID_C varchar(36) not null, REL_IDDOCFROM_C varchar(36) not null, REL_IDDOCTO_C varchar(36) not null, REL_DELETEDATE_D datetime, primary key (REL_ID_C) );
|
||||
|
||||
update T_CONFIG set CFG_VALUE_C = '7' where CFG_ID_C = 'DB_VERSION';
|
@ -1,3 +1,3 @@
|
||||
api.current_version=${project.version}
|
||||
api.min_version=1.0
|
||||
db.version=6
|
||||
db.version=7
|
@ -1,3 +1,3 @@
|
||||
api.current_version=${project.version}
|
||||
api.min_version=1.0
|
||||
db.version=6
|
||||
db.version=7
|
@ -1,3 +1,3 @@
|
||||
api.current_version=${project.version}
|
||||
api.min_version=1.0
|
||||
db.version=6
|
||||
db.version=7
|
Loading…
Reference in New Issue
Block a user