mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
50 lines
796 B
Java
50 lines
796 B
Java
package com.avaje.tests.model.m2m;
|
|
|
|
import com.avaje.ebean.Model;
|
|
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.ManyToMany;
|
|
import java.util.List;
|
|
|
|
@Entity
|
|
public class DCredit extends Model {
|
|
|
|
@Id
|
|
Long id;
|
|
|
|
String credit;
|
|
|
|
@ManyToMany(cascade = CascadeType.PERSIST)
|
|
List<DRol> droles;
|
|
|
|
public DCredit(String credit) {
|
|
this.credit = credit;
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getCredit() {
|
|
return credit;
|
|
}
|
|
|
|
public void setCredit(String credit) {
|
|
this.credit = credit;
|
|
}
|
|
|
|
public List<DRol> getDroles() {
|
|
return droles;
|
|
}
|
|
|
|
public void setDroles(List<DRol> droles) {
|
|
this.droles = droles;
|
|
}
|
|
}
|