#pragma once #include using namespace std; /////////////////////////////////////////////////////////////////////////////////////////////////// /// 工作模式定义 表结构字段 namespace DMDefWorkMode { const string TABLENAME = "def_work_mode"; const string WORK_MODE_ID = "work_mode_id"; const string NAME = "name"; } /////////////////////////////////////////////////////////////////////////////////////////////////// /// 用户 表结构字段 namespace DMUser { const string TABLENAME = "user"; // 表名称 const string USER_ID = "user_id"; const string ACCOUNT = "account"; const string PASSWD = "passwd"; const string NAME = "name"; const string GENDER = "gender"; const string AGE = "age"; const string PHONE = "phone"; const string EMAIL = "email"; const string IS_OPEN = "is_open"; const string LOGINTIME = "login_time"; const string CREATETIME = "create_time"; const string UPDATETIME = "update_time"; // 联合查询时使用 const string ROLE_NAME = "role_name"; } /////////////////////////////////////////////////////////////////////////////////////////////////// /// 用户角色 表结构字段 namespace DMUserRole { const string TABLENAME = "user_role"; const string USER_ID = "user_id"; const string ROLE_ID = "role_id"; const string CREATETIME = "create_time"; const string UPDATETIME = "update_time"; } /////////////////////////////////////////////////////////////////////////////////////////////////// /// 角色 表结构字段 namespace DMRole { const string TABLENAME = "role"; const string ROLE_ID = "role_id"; const string NAME = "name"; const string TYPE = "type"; const string DESCRIBE = "describe"; const string IS_OPEN = "is_open"; const string CREATETIME = "create_time"; const string UPDATETIME = "update_time"; } namespace DMPermission { const string TABLENAME = "permission"; const string PERMISSION_ID = "permission_id"; const string NAME = "name"; const string DESCRIBE = "describe"; const string IS_OPEN = "is_open"; const string CREATETIME = "create_time"; const string UPDATETIME = "update_time"; } namespace DMRolePermission { const string TABLENAME = "role_permission"; const string FID_ID = "id"; const string FID_ROLE_ID = "role_id"; const string FID_PERMISSION_ID = "permission_id"; } namespace DMStation { const string TABLENAME = "station"; const string STATION_ID = "station_id"; const string NAME = "name"; const string ADDRESS = "address"; const string LONGITUDE = "lon"; const string LATITUDE = "lat"; const string TEL = "tel"; const string CAPACITY = "capacity"; const string STATUS = "status"; const string WORK_MODE_ID = "work_mode_id"; const string POLICY_ID = "policy_id"; } namespace DMDefDeviceType { const string TABLENAME = "def_device_type"; const string DEVICE_TYPE_ID = "device_type_id"; const string NAME = "name"; const string ATTRS = "attrs"; } namespace DMDevice { const string TABLENAME = "device"; const string DEVICE_ID = "device_id"; const string STATION_ID = "station_id"; const string TYPE = "type"; const string NAME = "name"; const string CODE = "code"; const string MODEL = "model"; const string FACTORY = "factory"; const string TEL = "factory_tel"; const string ATTRS = "attrs"; const string IS_OPEN = "is_open"; const string STATUS = "status"; const string CREATE_TIME = "create_time"; const string UPDATE_TIME = "update_time"; } namespace DMDefPolicyType { const string TABLENAME = "def_policy_type"; const string POLICY_TYPE_ID = "policy_type_id"; const string NAME = "name"; } namespace DMPolicy { const string TABLENAME = "policy"; const string POLICY_ID = "policy_id"; const string TYPE = "type"; const string NAME = "name"; const string DESCRIBE = "describe"; const string VALUE = "value"; const string IS_OPEN = "is_open"; const string CREATE_TIME = "create_time"; const string UPDATE_TIME = "update_time"; } namespace DMSystemLog { const string TABLENAME = "system_log"; const string LOG_ID = "log_id"; const string TYPE = "type"; const string USER_ID = "user_id"; const string USER_ACCOUNT = "user_account"; const string CONTENT = "content"; const string STATUS = "status"; const string CREATE_TIME = "create_time"; const string UPDATE_TIME = "update_time"; } namespace DMAlertLog { const string TABLENAME = "alert_log"; const string LOG_ID = "log_id"; const string TYPE = "type"; const string DEVICE_ID = "device_id"; const string CONTENT = "content"; const string STATUS = "status"; const string CREATE_TIME = "create_time"; } namespace DMStatStation { const string TABLENAME = "stat_staion"; const string DT = "dt"; const string STATION_ID = "station_id"; const string STORAGE_ELECT_IN = "storage_elect_in"; const string STORAGE_ELECT_OUT = "storage_elect_out"; const string STORAGE_NUM_ERR = "storage_num_err"; const string SOLAR_ELECT_GEN = "solar_elect_gen"; const string SOLAR_ELECT_GRID = "solar_elect_grid"; const string SOLAR_NUM_ERR = "solar_num_err"; const string CHARGE_ELECT = "charge_elect"; const string CHARGE_NUM = "charge_num"; const string CHARGE_NUM_ERR = "charge_num_err"; }