package com.mjsheng.myappstore.database;

public class DBSqlBuilder {

    public static final String APPLICATION_HISTORY = "application_history"; // 搜索历史纪录
    public static final String APPLICATION_MESSAGE = "application_message"; // 应用信息
    public static final String CONFIG_APP_TABLE = "config_app_table";  // 子系统app
    public static final String COURSE_TABLE = "course_table"; // 课程表
    public static final String DETAIL_LOG_TABLE = "detail_log_table"; // 学习日志
    public static final String DOWNLOADING_TABLE = "downloading_table"; // 待安装应用


    public static String BuilderHistoryTable() {
        return "create table " + APPLICATION_HISTORY
                + " (_id integer primary key autoincrement,"
                + "category text,"
                + "search_time integer,"
                + "order_id integer);";
    }

    public static String BuilderMessageTable() {
        return "create table " + APPLICATION_MESSAGE
                + " (_id integer primary key autoincrement,"
                + "file_name text,"
                + "key text,"
                + "order_id integer);";
    }


    public static String BuilderConfigTable() {
        return "create table " + CONFIG_APP_TABLE
                + " (_id integer primary key autoincrement,"
                + "category text,"
                + "sub_category text,"
                + "pkg_name text,"
                + "order_id integer);";
    }

    public static String BuilderCourseTable() {
        return "create table " + COURSE_TABLE
                + " (_id integer primary key autoincrement,"
                + "week text,"
                + "day text,"
                + "pitchnumber text,"
                + "course text,"
                + "order_id integer);";
    }

    public static String BuilderDetailLogTable() {
        return "create table " + DETAIL_LOG_TABLE
                + " (_id integer primary key autoincrement,"
                + "category text,"
                + "sub_category text,"
                + "start_date text,"
                + "start_times text,"
                + "learn_time integer,"
                + "image text,"
                + "pkg_name text"
                + "order_id integer);";
    }

    public static String BuilderDownloadTable() {
        return "create table " + DOWNLOADING_TABLE
                + " (_id integer primary key autoincrement,"
                + "category text,"
                + "sub_category text,"
                + "pkg_name text);"
                + "order_id integer);";
    }
}