mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
59 lines
1022 B
Java
59 lines
1022 B
Java
package com.avaje.tests.model.info;
|
|
|
|
import com.avaje.ebean.Model;
|
|
import com.avaje.ebean.annotation.JsonIgnore;
|
|
|
|
import javax.persistence.*;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
@Entity
|
|
public class InfoCompany extends Model {
|
|
|
|
public static final Finder<Long,InfoCompany> find = new Finder<>(InfoCompany.class);
|
|
|
|
@Id
|
|
Long id;
|
|
|
|
@Version
|
|
Long version;
|
|
|
|
String name;
|
|
|
|
@JsonIgnore
|
|
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
|
List<InfoContact> contacts = new ArrayList<>();
|
|
|
|
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;
|
|
}
|
|
|
|
public List<InfoContact> getContacts() {
|
|
return contacts;
|
|
}
|
|
|
|
public void setContacts(List<InfoContact> contacts) {
|
|
this.contacts = contacts;
|
|
}
|
|
}
|