Browse Source

table结构表

sat23 4 years ago
parent
commit
329f528009

+ 1 - 0
CTSManager/CTSManager/CTSManager.vcxproj

@@ -206,6 +206,7 @@
     <ClInclude Include="pch.h" />
     <ClInclude Include="PropertiesWnd.h" />
     <ClInclude Include="Resource.h" />
+    <ClInclude Include="table.h" />
     <ClInclude Include="targetver.h" />
     <ClInclude Include="ViewTree.h" />
   </ItemGroup>

+ 8 - 2
CTSManager/CTSManager/CTSManager.vcxproj.filters

@@ -13,6 +13,9 @@
       <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
       <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
     </Filter>
+    <Filter Include="sql">
+      <UniqueIdentifier>{d94ee133-5a5e-465b-b4da-ca45d005ac1f}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="CTSManager.h">
@@ -54,12 +57,15 @@
     <ClInclude Include="PropertiesWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="CalendarBar.h">
+    <ClInclude Include="calendarbar.h">
       <Filter>头文件</Filter>
     </ClInclude>
     <ClInclude Include="pch.h">
       <Filter>头文件</Filter>
     </ClInclude>
+    <ClInclude Include="table.h">
+      <Filter>sql</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="CTSManager.cpp">
@@ -92,7 +98,7 @@
     <ClCompile Include="PropertiesWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="CalendarBar.cpp">
+    <ClCompile Include="calendarbar.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
     <ClCompile Include="pch.cpp">

+ 1 - 1
CTSManager/CTSManager/pch.h

@@ -11,5 +11,5 @@
 #include "framework.h"
 
 #include "mysql.h"
-
+//#include <string>
 #endif //PCH_H

+ 94 - 0
CTSManager/CTSManager/table.h

@@ -0,0 +1,94 @@
+#ifndef __TABLE_20201102__
+#define __TABLE_20201102__
+
+#pragma once
+
+#include <string>
+
+#define INSER_PROVIDER _T("INSERT INTO `provider` (`name`,`note`) VALUES ('%s', '%s');")
+#define INSER_QUARTER _T("INSERT INTO `quarter` (`name`,`scp`,`note`) VALUES ('%s', '%s', '%s');")
+#define INSER_BRAND _T("INSERT INTO `brand` (`name`,`note`,``) VALUES ('%s', '%s');")
+#define INSER_SERVER _T("INSERT INTO `server` (`name`,`ip`,`type`,`user`,`password`,`note`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');")
+#define INSER_BRANCH _T("INSERT INTO `branch` (`name` ,`quarter`,`address`,`provider`,`chip`,`type`,`status`,`note`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');")
+#define INSER_USER _T("INSERT INTO `user` (`user`,`password`,`permission`) VALUES ('%s', '%s', '%s');")
+#define INSER_QBRANCH _T("INSERT INTO `qbranch` (`brand`,`quarter`,`whitelist`,`version`,`oemkey`,`approved`,`approveddate`,`fingerprint`,`builddate`,`gtvs`,`ftpdir`,`codedir`,`note`) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');")
+#define INSER_LOG _T("INSERT INTO `log` (`user`,`datetime`,`content`) VALUES ('%s', 'datetime', '%s');")
+
+// 供应商表;
+typedef struct {
+	std::string name;						// 供应商名称;
+	std::string note;						// 供应商备注;
+}STProvider, *pSTProvider;
+
+// 季度表;
+typedef struct {
+	std::string name;						// 季度名称;
+	std::string scp;						// SecurityPatch;
+	std::string note;						// 季度备注;
+}STQuarter, *pSTQuarter;
+
+// 品牌表;
+typedef struct {
+	std::string name;						// 品牌名称;
+	std::string note;						// 品牌备注;
+}STBrand, *pSTBrand;
+
+// 服务器表;
+typedef struct {
+	std::string name;						// 服务器名称;
+	std::string ip;							// 服务器IP;
+	std::string type;						// 服务器类型:ftp、ssh2;
+	std::string user;						// 服务器用户;
+	std::string password;					// 服务器用户密码;
+	std::string note;						// 服务器备注;
+}STServer, *pSTServer;
+
+// 分支表;
+typedef struct {
+	std::string name;						// 分支名称;
+	std::string quarter;					// 分支所属季度;
+	std::string address;					// 分支gerrit地址;
+	std::string provider;					// 分支供应商;
+	std::string chip;						// 分支机芯;
+	std::string type;						// 分支类型:主干、CTS、量产、ODF
+	std::string status;						// 分支状态:在线、停用;
+	std::string note;						// 分支备注;
+}STBranch, *pSTBranch;
+
+// 用户表(权限表);
+typedef struct {
+	std::string user;						// 用户账号;
+	std::string passwrod;					// 用户密码;
+	std::string permission;					// 用户权限;
+}STUser, *pSTUser;
+
+// 季度品牌表;
+typedef struct {
+	std::string brand;						// 季度品牌名称;
+	std::string quarter;					// 季度;
+	std::string whitelist;					// 白名单状态;
+	std::string verion;						// 软件版本号;
+	std::string oemkey;						// oem key;
+	std::string approved;					// 认证状态;
+	std::string approveddate;				// 认证通过日期;
+	// 图片不在此显示;
+	char* pLogo;							// logo;
+	char* pPic1;
+	char* pPic2;		
+	std::string fingerprint;				// 该季度品牌fingerprint;
+	std::string builddate;					// 编译日期;
+	std::string gtvs;						// gtvs版本;
+	std::string ftpdir;						// ftp下载路径;
+	std::string codedir;					// 代码路径,只对admin可见;
+	std::string note;						// 备注;
+}STQbrand, *pSTQbrand;
+
+// 日志表;
+typedef struct {
+	int id;									// 自增id;
+	std::string datetime;					// 发生时间;
+	std::string user;						// 操作用户;
+	std::string content;					// 操作内容;
+}STLog, *pSTLog;
+
+#endif