MyDaoGenerator.java 1.48 KB
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");
    }

}