mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
60 lines
1011 B
Java
60 lines
1011 B
Java
package org.tests.model;
|
|
|
|
import io.ebean.Model;
|
|
import io.ebean.annotation.WhenCreated;
|
|
import io.ebean.annotation.WhenModified;
|
|
|
|
import javax.persistence.Id;
|
|
import javax.persistence.MappedSuperclass;
|
|
import javax.persistence.Version;
|
|
import java.sql.Timestamp;
|
|
|
|
@MappedSuperclass
|
|
public class BaseModel extends Model {
|
|
|
|
@Id
|
|
Long id;
|
|
|
|
@Version
|
|
Long version;
|
|
|
|
@WhenCreated
|
|
Timestamp whenCreated;
|
|
|
|
@WhenModified
|
|
Timestamp whenModified;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Long getVersion() {
|
|
return version;
|
|
}
|
|
|
|
public void setVersion(Long version) {
|
|
this.version = version;
|
|
}
|
|
|
|
public Timestamp getWhenCreated() {
|
|
return whenCreated;
|
|
}
|
|
|
|
public void setWhenCreated(Timestamp whenCreated) {
|
|
this.whenCreated = whenCreated;
|
|
}
|
|
|
|
public Timestamp getWhenModified() {
|
|
return whenModified;
|
|
}
|
|
|
|
public void setWhenModified(Timestamp whenModified) {
|
|
this.whenModified = whenModified;
|
|
}
|
|
|
|
}
|