/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50717
Source Host           : localhost:3306
Source Database       : chess

Target Server Type    : MYSQL
Target Server Version : 50717
File Encoding         : 65001

Date: 2022-11-02 10:18:03
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for account
-- ----------------------------
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `UserName` varchar(200) DEFAULT NULL,
  `Password` varchar(50) DEFAULT NULL,
  `NickName` varchar(200) DEFAULT NULL,
  `Face` varchar(500) DEFAULT NULL,
  `OpenID` varchar(500) DEFAULT NULL,
  `PushClientID` varchar(200) DEFAULT NULL,
  `CreateTime` datetime DEFAULT NULL,
  `LastLoginTime` datetime DEFAULT NULL,
  `ReferrerID` int(11) DEFAULT NULL,
  `Diamond` int(11) DEFAULT NULL,
  `Gold` int(11) DEFAULT NULL,
  `Score` int(11) DEFAULT NULL,
  `SystemName` varchar(20) DEFAULT NULL,
  `PlatformName` varchar(50) DEFAULT NULL,
  `Longitude` varchar(22) DEFAULT NULL,
  `Latitude` varchar(22) DEFAULT NULL,
  `Address` varchar(400) DEFAULT NULL,
  `WinTimes` int(11) DEFAULT NULL,
  `BattleIP` varchar(200) DEFAULT NULL,
  `BattlePort` varchar(100) DEFAULT NULL,
  `BattleCode` varchar(100) DEFAULT NULL,
  `Vip` int(11) DEFAULT NULL,
  `LastGetGoldTime` datetime DEFAULT NULL,
  `IsAI` bit(1) DEFAULT NULL,
  `TaskProcess` int(11) DEFAULT NULL,
  `FirstSignTime` datetime DEFAULT NULL,
  `VipBeginTime` datetime DEFAULT NULL,
  `SignRecord` text,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1216 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for battlerecord
-- ----------------------------
DROP TABLE IF EXISTS `battlerecord`;
CREATE TABLE `battlerecord` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `BattleCode` varchar(50) DEFAULT NULL,
  `GameNum` int(11) DEFAULT NULL,
  `BeginTime` datetime DEFAULT NULL,
  `EndTime` datetime DEFAULT NULL,
  `BattleContent` longtext,
  `Sider1ID` int(11) DEFAULT NULL,
  `Sider1Score` int(11) DEFAULT NULL,
  `Sider2ID` int(11) DEFAULT NULL,
  `Sider2Score` int(11) DEFAULT NULL,
  `Sider3ID` int(11) DEFAULT NULL,
  `Sider3Score` int(11) DEFAULT NULL,
  `Sider4ID` int(11) DEFAULT NULL,
  `Sider4Score` int(11) DEFAULT NULL,
  `IsFinished` bit(1) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for battleservers
-- ----------------------------
DROP TABLE IF EXISTS `battleservers`;
CREATE TABLE `battleservers` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(200) DEFAULT NULL,
  `IP` varchar(200) DEFAULT NULL,
  `Port` int(11) DEFAULT NULL,
  `State` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for buyrecord
-- ----------------------------
DROP TABLE IF EXISTS `buyrecord`;
CREATE TABLE `buyrecord` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `BuyerID` int(11) DEFAULT NULL,
  `GoodsID` int(11) DEFAULT NULL,
  `Num` int(11) DEFAULT NULL,
  `CostGold` int(11) DEFAULT NULL,
  `CostDiamond` int(11) DEFAULT NULL,
  `NowGold` int(11) DEFAULT NULL,
  `NowDiamond` int(11) DEFAULT NULL,
  `BuyTime` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for friends
-- ----------------------------
DROP TABLE IF EXISTS `friends`;
CREATE TABLE `friends` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `AccountID` int(11) DEFAULT NULL,
  `FriendID` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for loginrecord
-- ----------------------------
DROP TABLE IF EXISTS `loginrecord`;
CREATE TABLE `loginrecord` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `AccountID` int(11) DEFAULT NULL,
  `LoginTime` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=694 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for store
-- ----------------------------
DROP TABLE IF EXISTS `store`;
CREATE TABLE `store` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Type` varchar(50) DEFAULT NULL,
  `Icon` varchar(200) DEFAULT NULL,
  `Name` varchar(200) DEFAULT NULL,
  `Description` varchar(2000) DEFAULT NULL,
  `Price` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
