如何放置正确的 DBFLow 注释

How to put propper DBFLow annotation

我想将医生对象插入数据库,我应该如何为属性添加注释?
我试着用下面显示的代码来做到这一点。
但我不知道如何在列表属性 specializationsphoneNumbers.

上执行此操作
@Table(databaseName = WMDatabase.NAME)
public class Doctor extends BaseModel{

@Column
@PrimaryKey
@Unique(unique = true)
private String doctorId;

@Column
private FullName fullName;

@Column
private String organizationId;

@Column What shuld i put here?????
private List<Specialization> specializations;

@Column What shuld i put here?????    
private Contacts contacts;
}

以下是我用于医生属性的类:

public class Contacts extends BaseModel {

private List<PhoneNumber> phoneNumbers;
private String email;
private String fax;
}

public class Specialization extends BaseModel {

@Column
@PrimaryKey
@Unique(unique = true)
private String doctorId;

@Unique(unique = true)
private String specializationName;

public String getSpecializationName() {
    return specializationName;
}

public void setSpecializationName(String specializationName) {
    this.specializationName = specializationName;
}

DBFlow 是一个关系数据库系统(不是 mongo 类型的 key/value 存储)并且不支持列表作为列,根据文档 here

List : List columns are not supported and not generally proper for a relational database. However, you can get away with a non-generic List column via a TypeConverter. But again, avoid this if you can.

relationships 上的文档可以帮助您优化模型以满足您的需要。