// Path: app/src/main/java/com/turo/ktalk/model/dao/ContactTable.java
// public class ContactTable {
//     public static final String TAB_NAME = "tab_contact";
// 
//     public static final String COL_HXID = "hxid";
//     public static final String COL_NAME = "name";
//     public static final String COL_NICK = "nick";
//     public static final String COL_PHOTO = "photo";
//     public static final String COL_IS_CONTACT = "is_contact";//是否是联系人
// 
//     public static final String CREATE_TAB = "create table "
//             + TAB_NAME + " ("
//             + COL_HXID + " text primary key,"
//             + COL_NAME + " text,"
//             + COL_NICK + " text,"
//             + COL_PHOTO + " text,"
//             + COL_IS_CONTACT + " integer);";
// }
// 
// Path: app/src/main/java/com/turo/ktalk/model/dao/InviteTable.java
// public class InviteTable {
// 
//     public static final String TAB_NAME = "tab_invite";
// 
//     public static final String COL_USER_HXID = "user_hxid"; //用户的环信id
//     public static final String COL_USER_NAME = "user_name"; //用户的名称
// 
//     public static final String COL_GROUP_NAME = "group_name"; //群组名称
//     public static final String COL_GROUP_HXID = "group_hxid"; //群组环信id
// 
//     public static final String COL_REASON = "reason"; //邀请的原因
//     public static final String COL_STATUS = "status"; //邀请状态
// 
//     public static final String CREATE_TAB = "create table "
//             + TAB_NAME + " ("
//             + COL_USER_HXID + " text primary key,"
//             + COL_USER_NAME + " text,"
//             + COL_GROUP_HXID + " text,"
//             + COL_GROUP_NAME + " text,"
//             + COL_REASON + " text,"
//             + COL_STATUS + " integer);";
// }


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.turo.ktalk.model.dao.ContactTable;
import com.turo.ktalk.model.dao.InviteTable;
package com.turo.ktalk.model.db;



/**
 * Created by YQ950209 on 2017/4/27.
 */

public class DBHelper extends SQLiteOpenHelper {
    public DBHelper(Context context, String name) {
        super(context, name, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        //创建联系人的表
        db.execSQL(ContactTable.CREATE_TAB);

        //创建邀请信息的表
// Path: app/src/main/java/com/turo/ktalk/model/dao/ContactTable.java
// public class ContactTable {
//     public static final String TAB_NAME = "tab_contact";
// 
//     public static final String COL_HXID = "hxid";
//     public static final String COL_NAME = "name";
//     public static final String COL_NICK = "nick";
//     public static final String COL_PHOTO = "photo";
//     public static final String COL_IS_CONTACT = "is_contact";//是否是联系人
// 
//     public static final String CREATE_TAB = "create table "
//             + TAB_NAME + " ("
//             + COL_HXID + " text primary key,"
//             + COL_NAME + " text,"
//             + COL_NICK + " text,"
//             + COL_PHOTO + " text,"
//             + COL_IS_CONTACT + " integer);";
// }
// 
// Path: app/src/main/java/com/turo/ktalk/model/dao/InviteTable.java
// public class InviteTable {
// 
//     public static final String TAB_NAME = "tab_invite";
// 
//     public static final String COL_USER_HXID = "user_hxid"; //用户的环信id
//     public static final String COL_USER_NAME = "user_name"; //用户的名称
// 
//     public static final String COL_GROUP_NAME = "group_name"; //群组名称
//     public static final String COL_GROUP_HXID = "group_hxid"; //群组环信id
// 
//     public static final String COL_REASON = "reason"; //邀请的原因
//     public static final String COL_STATUS = "status"; //邀请状态
// 
//     public static final String CREATE_TAB = "create table "
//             + TAB_NAME + " ("
//             + COL_USER_HXID + " text primary key,"
//             + COL_USER_NAME + " text,"
//             + COL_GROUP_HXID + " text,"
//             + COL_GROUP_NAME + " text,"
//             + COL_REASON + " text,"
//             + COL_STATUS + " integer);";
// }


// Path: app/src/main/java/com/turo/ktalk/model/db/DBHelper.java
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.turo.ktalk.model.dao.ContactTable;
import com.turo.ktalk.model.dao.InviteTable;

package com.turo.ktalk.model.db;



/**
 * Created by YQ950209 on 2017/4/27.
 */

public class DBHelper extends SQLiteOpenHelper {
    public DBHelper(Context context, String name) {
        super(context, name, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        //创建联系人的表
        db.execSQL(ContactTable.CREATE_TAB);

        //创建邀请信息的表
        db.execSQL(InviteTable.CREATE_TAB);