package com.zxhl.cms.db;

/**
 * Created by gaoleichao on 2018/10/29.
 */

public final class DBConfig {

    public static final String DB_TRUE = "1";
    public static final String DB_FALSE = "0";

    /* database name */
    public static final String DB_NAME = "localnews_database";

    /* database version code */
    public static final int DB_VERSION = 1;  //数据库表添加一列，升级数据库

    /* database table names */
    public static final String CLICK_AD_TABLE_NAME = "click_ad_list";//点点赚
    public static final String NEWS_AND_AD_TABLE_NAME = "news_and_ad_list";//资讯和广告列表
    public static final String NEWS_TAB_TABLE_NAME = "news_tab_list";//资讯和广告列表
    public static final String STEP_TABLE_NAME = "step_table_name";//资讯和广告列表

    public static final String USERCENTER_APLI_TABLE_NAME = "usercenter_apli_list";//用户中心应用模块列表

    public static final String USERCENTER_SETTING_TABLE_NAME = "usercenter_setting_list";//用户中心我的阅读

    public static final String WATCH_OR_CLICK_OR_TIMER_AD_TABLE_NAME = "watch_or_click_or_timer_list";//看看赚

    public static final String NEWS_READ_HISTORY_TABLE_NAME = "news_history_list";//资讯阅读历史

    /* VideoDetail db fields */
    public static final String CONTENT = "content"; //内容
    public static final String CONTENTID = "content_id"; //内容
    public static final String ID = "id"; //id

    static final String CREATE_CLICK_AD_TABLE_SQL =
            "create table " + CLICK_AD_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_WATCH_AD_TABLE_SQL =
            "create table " + WATCH_OR_CLICK_OR_TIMER_AD_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_NEWS_OR_AD_TABLE_SQL =
            "create table " + NEWS_AND_AD_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_NEWS_TAB_LIST_TABLE_SQL =
            "create table " + NEWS_TAB_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_STEP_TABLE_SQL =
            "create table " + STEP_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_USERCENTER_SETTING_TABLE_SQL =
            "create table " + USERCENTER_SETTING_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_USERCENTER_APLI_TABLE_SQL =
            "create table " + USERCENTER_APLI_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
    static final String CREATE_NEWS_READ_HISTORY_TABLE_SQL =
            "create table " + NEWS_READ_HISTORY_TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT," +
                    CONTENTID + " varchar2(1000)," +
                    CONTENT + " TEXT" +
                    ")";
}
