admin
2021-07-28 c0269fcfa876b9c5cf309b2006462b4d09c5ef95
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
40
41
42
43
44
45
package com.hanju.video.app.db;
 
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.provider.BaseColumns;
 
public class MessageTable implements BaseColumns {
 
    public static final String AUTHORITY = "com.yeshi.ddysvideo.provider.message";
 
    public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" + "messages");
    /**
     * The MIME type of {@link #CONTENT_URI}.
     */
    public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.weikou.message";
    /**
     * 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.message";
 
    public static final String TABLE_NAME = "MESSAGE";
    
    public static final String MESSAGE_ID = "_MESSAGE_ID";
 
    public static final String MESSAGE_TITLE = "_MESSAGE_TITLE";
    
    public static final String MESSAGE_CONTENT = "_MESSAGE_CONTENT";
    
    public static final String MESSAGE_STATUS = "_MESSAGE_STATUS";
    
    public static final String UPDATE_TIME = "_UPDATE_TIME";
    
    public static final String CREATE_TIME = "_CREATE_TIME";
 
    public static void createTables(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " ("
                + MessageTable._ID               + " INTEGER PRIMARY KEY AUTOINCREMENT,"
                + MessageTable.MESSAGE_ID        + " TEXT,"
                + MessageTable.MESSAGE_TITLE     + " TEXT,"
                + MessageTable.MESSAGE_CONTENT   + " TEXT,"
                + MessageTable.MESSAGE_STATUS    + " INTEGER,"
                + MessageTable.UPDATE_TIME       + " INTEGER,"
                + MessageTable.CREATE_TIME       + " INTEGER)");
    }
}