mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
50 lines
716 B
Java
50 lines
716 B
Java
package org.example.domain;
|
|
|
|
import io.ebean.Model;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Inheritance;
|
|
import javax.persistence.Version;
|
|
|
|
@Entity
|
|
@Inheritance
|
|
public abstract class Animal extends Model {
|
|
|
|
@Id
|
|
long id;
|
|
|
|
@Version
|
|
long version;
|
|
|
|
String name;
|
|
|
|
public Animal(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
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 String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
}
|