package com.yeshi.base.entity.db; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.provider.BaseColumns; public class DownloadTable implements BaseColumns { public static final String AUTHORITY = "com.weikou.mgvideo.provider.download"; public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" + "downloads"); /** * The MIME type of {@link #CONTENT_URI}. */ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.weikou.download"; /** * The MIME type of a {@link #CONTENT_URI} sub-directory of a single row. */ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.weikou.download"; public static final String TABLE_NAME = "DOWNLOAD"; public static final String TASK_ID = "_TASK_ID"; public static final String VIDEO_ID = "_VIDEO_ID"; public static final String VIDEO_DETAIL_ID = "_VIDEO_DETAIL_ID"; public static final String VIDEO_THIRD_TYPE = "_VIDEO_THIRD_TYPE"; public static final String VIDEO_DETAIL = "_VIDEO_DETAIL"; public static void createTables(SQLiteDatabase db) { db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (" + DownloadTable._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + DownloadTable.TASK_ID + " INTEGER," + DownloadTable.VIDEO_ID + " TEXT," + DownloadTable.VIDEO_DETAIL_ID + " TEXT," + DownloadTable.VIDEO_THIRD_TYPE + " TEXT," + DownloadTable.VIDEO_DETAIL + " TEXT)"); } }