
#ifndef __KK_HISTORY_DB_H__
#define __KK_HISTORY_DB_H__

enum{
	DB_SENSOR_DEVICECODE = 0,
	DB_SENSOR_IDENTIFIER,
	DB_SENSOR_VALUE,
	DB_SENSOR_RECORDTIME,
};
enum{
	DB_OUTLET_DEVICECODE = 0,
	DB_OUTLET_POWER,
	DB_OUTLET_METERING,
	DB_OUTLET_RECORDTIME,
};
int kk_history_db_init(void);
int kk_history_delete_by_recordtime(const char *table,time_t itime);
int kk_history_insert_sensor_info(const char* deviceCode,const char* identifier,const char* valueStr,time_t itime);
int kk_history_insert_Outlet_info(const char* deviceCode,const char* power,const char* metering,time_t itime);

#endif
