MyDaoGenerator.java
1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package example;
import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;
public class MyDaoGenerator {
public static void main(String[] args) throws Exception {
Schema schema = new Schema(1005, "com.cnlive.goldenline.dao");
schema.enableKeepSectionsByDefault();
addHistory(schema);
new DaoGenerator().generateAll(schema, args[0]);
}
private static void addHistory(Schema schema) {
Entity history = schema.addEntity("History");
history.addStringProperty("vdId").primaryKey();
history.addStringProperty("vdCategory");
history.addIntProperty("vdCategoryId");
history.addStringProperty("vdCover");
history.addStringProperty("vdShareUrl");
history.addStringProperty("vdShowDes");
history.addStringProperty("vdShowTitle");
history.addIntProperty("vdTheatreId");
history.addStringProperty("vdTheatreImg");
history.addStringProperty("vdTheatreName");
history.addStringProperty("vdThumbnailImg");
history.addStringProperty("vdVideoHUrl");
history.addStringProperty("vdVideoLUrl");
history.addStringProperty("vdVideoUrl");
history.addStringProperty("createTime");
history.addIntProperty("vdWatchCount");
history.addStringProperty("vdDiscussTimes");
history.addStringProperty("vdUUID");
history.addStringProperty("vdVideoUHUrl");
}
}