forked from cp6/DayZ-Trader-Bank-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.sql
65 lines (59 loc) · 2.4 KB
/
database.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0 */;
/*!40101 SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for dz_tb_logs
CREATE DATABASE IF NOT EXISTS `dz_tb_logs` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `dz_tb_logs`;
-- Dumping structure for table dz_tb_logs.bank
CREATE TABLE IF NOT EXISTS `bank`
(
`type` tinyint(1) DEFAULT NULL,
`amount` int(11) DEFAULT NULL,
`p_before` int(11) DEFAULT NULL COMMENT 'player money before',
`p_after` int(11) DEFAULT NULL COMMENT 'player money after',
`b_before` int(11) DEFAULT NULL COMMENT 'bank account before',
`b_after` int(11) DEFAULT NULL COMMENT 'bank account after',
`uid` varchar(124) DEFAULT NULL,
`datetime` datetime DEFAULT NULL,
UNIQUE KEY `Index 1` (`type`, `amount`, `uid`, `datetime`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
-- Data exporting was unselected.
-- Dumping structure for table dz_tb_logs.items
CREATE TABLE IF NOT EXISTS `items`
(
`id` int(11) NOT NULL,
`classname` varchar(124) DEFAULT NULL,
`name` varchar(124) DEFAULT NULL,
`sold` int(11) DEFAULT 0,
`bought` int(11) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `Index 2` (`classname`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
-- Data exporting was unselected.
-- Dumping structure for table dz_tb_logs.players
CREATE TABLE IF NOT EXISTS `players`
(
`uid` varchar(124) DEFAULT NULL,
`name` varchar(124) DEFAULT NULL,
`datetime` datetime DEFAULT current_timestamp(),
UNIQUE KEY `Index 1` (`uid`, `name`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
-- Data exporting was unselected.
-- Dumping structure for table dz_tb_logs.trader
CREATE TABLE IF NOT EXISTS `trader`
(
`type` tinyint(1) DEFAULT NULL,
`amount` int(11) DEFAULT NULL,
`player_amount` int(11) DEFAULT NULL,
`trader_uid` int(11) DEFAULT NULL,
`item_id` int(11) DEFAULT NULL,
`player_uid` varchar(124) DEFAULT NULL,
`datetime` datetime DEFAULT NULL,
UNIQUE KEY `Index 1` (`type`, `datetime`, `player_uid`, `item_id`, `player_amount`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;