// Path: app/src/main/java/com/leavjenn/hews/data/local/table/CommentTable.java
// public class CommentTable {
//     public static final String TABLE = "comment";
//     public static final String COLUMN_COMMENT_ID = "comment_id";
//     public static final String COLUMN_INDEX = "_index";
//     public static final String COLUMN_PARENT = "parent";
//     public static final String COLUMN_LEVEL = "level";
//     public static final String COLUMN_BY = "by";
//     public static final String COLUMN_DELETED = "deleted";
//     public static final String COLUMN_KIDS = "kids";
//     public static final String COLUMN_TIME = "time";
//     public static final String COLUMN_TEXT = "text";
// 
// 
//     public static String getCreateTableQuery() {
//         return "CREATE TABLE " + TABLE + "("
//             + COLUMN_COMMENT_ID + " INTEGER NOT NULL PRIMARY KEY, "
//             + COLUMN_INDEX + " INTEGER NOT NULL, "
//             + COLUMN_PARENT + " INTEGER NOT NULL, "
//             + COLUMN_LEVEL + " INTEGER, "
//             + COLUMN_BY + " TEXT, "
//             + COLUMN_DELETED + " TEXT, "
//             + COLUMN_KIDS + " TEXT, "
//             + COLUMN_TIME + " TEXT, "
//             + COLUMN_TEXT + " TEXT"
//             + ");";
//     }
// }
// 
// Path: app/src/main/java/com/leavjenn/hews/data/local/table/PostTable.java
// public class PostTable {
// 
//     public static final String TABLE = "post";
//     public static final String COLUMN_ID = "id";
//     public static final String COLUMN_BY = "by";
//     public static final String COLUMN_DESCENDANTS = "descendants";
//     public static final String COLUMN_KIDS = "kids";
//     public static final String COLUMN_SCORE = "score";
//     public static final String COLUMN_TEXT = "text";
//     public static final String COLUMN_TIME = "time";
//     public static final String COLUMN_TITLE = "title";
//     public static final String COLUMN_TYPE = "type";
//     public static final String COLUMN_URL = "url";
//     public static final String COLUMN_PRETTY_URL = "prettyUrl";
//     public static final String COLUMN_SUMMARY = "summary";
//     public static final String COLUMN_ISBOOKMARKED = "isBookmarked";
// 
// 
//     public static String getCreateTableQuery() {
//         return "CREATE TABLE " + TABLE + "("
//             + COLUMN_ID + " INTEGER NOT NULL PRIMARY KEY, "
//             + COLUMN_BY + " TEXT, "
//             + COLUMN_DESCENDANTS + " TEXT, "
//             + COLUMN_KIDS + " TEXT, "
//             + COLUMN_SCORE + " TEXT, "
//             + COLUMN_TEXT + " TEXT, "
//             + COLUMN_TIME + " TEXT, "
//             + COLUMN_TITLE + " TEXT, "
//             + COLUMN_TYPE + " TEXT, "
//             + COLUMN_URL + " TEXT, "
//             + COLUMN_PRETTY_URL + " TEXT, "
//             + COLUMN_SUMMARY + " TEXT, "
//             + COLUMN_ISBOOKMARKED + " INTEGER"
//             + ");";
//     }
// }


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.leavjenn.hews.data.local.table.CommentTable;
import com.leavjenn.hews.data.local.table.PostTable;
package com.leavjenn.hews.data.local;



public class DbOpenHelper extends SQLiteOpenHelper {

    public DbOpenHelper(Context context) {
        super(context, "hews_db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(PostTable.getCreateTableQuery());
// Path: app/src/main/java/com/leavjenn/hews/data/local/table/CommentTable.java
// public class CommentTable {
//     public static final String TABLE = "comment";
//     public static final String COLUMN_COMMENT_ID = "comment_id";
//     public static final String COLUMN_INDEX = "_index";
//     public static final String COLUMN_PARENT = "parent";
//     public static final String COLUMN_LEVEL = "level";
//     public static final String COLUMN_BY = "by";
//     public static final String COLUMN_DELETED = "deleted";
//     public static final String COLUMN_KIDS = "kids";
//     public static final String COLUMN_TIME = "time";
//     public static final String COLUMN_TEXT = "text";
// 
// 
//     public static String getCreateTableQuery() {
//         return "CREATE TABLE " + TABLE + "("
//             + COLUMN_COMMENT_ID + " INTEGER NOT NULL PRIMARY KEY, "
//             + COLUMN_INDEX + " INTEGER NOT NULL, "
//             + COLUMN_PARENT + " INTEGER NOT NULL, "
//             + COLUMN_LEVEL + " INTEGER, "
//             + COLUMN_BY + " TEXT, "
//             + COLUMN_DELETED + " TEXT, "
//             + COLUMN_KIDS + " TEXT, "
//             + COLUMN_TIME + " TEXT, "
//             + COLUMN_TEXT + " TEXT"
//             + ");";
//     }
// }
// 
// Path: app/src/main/java/com/leavjenn/hews/data/local/table/PostTable.java
// public class PostTable {
// 
//     public static final String TABLE = "post";
//     public static final String COLUMN_ID = "id";
//     public static final String COLUMN_BY = "by";
//     public static final String COLUMN_DESCENDANTS = "descendants";
//     public static final String COLUMN_KIDS = "kids";
//     public static final String COLUMN_SCORE = "score";
//     public static final String COLUMN_TEXT = "text";
//     public static final String COLUMN_TIME = "time";
//     public static final String COLUMN_TITLE = "title";
//     public static final String COLUMN_TYPE = "type";
//     public static final String COLUMN_URL = "url";
//     public static final String COLUMN_PRETTY_URL = "prettyUrl";
//     public static final String COLUMN_SUMMARY = "summary";
//     public static final String COLUMN_ISBOOKMARKED = "isBookmarked";
// 
// 
//     public static String getCreateTableQuery() {
//         return "CREATE TABLE " + TABLE + "("
//             + COLUMN_ID + " INTEGER NOT NULL PRIMARY KEY, "
//             + COLUMN_BY + " TEXT, "
//             + COLUMN_DESCENDANTS + " TEXT, "
//             + COLUMN_KIDS + " TEXT, "
//             + COLUMN_SCORE + " TEXT, "
//             + COLUMN_TEXT + " TEXT, "
//             + COLUMN_TIME + " TEXT, "
//             + COLUMN_TITLE + " TEXT, "
//             + COLUMN_TYPE + " TEXT, "
//             + COLUMN_URL + " TEXT, "
//             + COLUMN_PRETTY_URL + " TEXT, "
//             + COLUMN_SUMMARY + " TEXT, "
//             + COLUMN_ISBOOKMARKED + " INTEGER"
//             + ");";
//     }
// }


// Path: app/src/main/java/com/leavjenn/hews/data/local/DbOpenHelper.java
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.leavjenn.hews.data.local.table.CommentTable;
import com.leavjenn.hews.data.local.table.PostTable;

package com.leavjenn.hews.data.local;



public class DbOpenHelper extends SQLiteOpenHelper {

    public DbOpenHelper(Context context) {
        super(context, "hews_db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(PostTable.getCreateTableQuery());
        db.execSQL(CommentTable.getCreateTableQuery());