搭建PVB架构,实现前端的基础布局、菜单、表格、图示等功能

This commit is contained in:
lixiaoyuan
2025-08-20 19:00:22 +08:00
parent 5de7687bcc
commit 7e965b6fb4
142 changed files with 28270 additions and 411 deletions

138
src/database/DataModelDef.h Normal file
View File

@@ -0,0 +1,138 @@
#include <string>
using namespace std;
///////////////////////////////////////////////////////////////////////////////////////////////////
/// 用户 表结构字段
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";
}
///////////////////////////////////////////////////////////////////////////////////////////////////
/// 角色 表结构字段
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";
}
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 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";
}