-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 13, 2019 at 06:32 PM
-- Server version: 5.7.24-log
-- PHP Version: 7.2.10

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `crazy20190731`
--

-- --------------------------------------------------------

--
-- Table structure for table `article`
--

CREATE TABLE `article` (
  `id` int(11) NOT NULL,
  `contant` LONGTEXT NOT NULL,
  `add_time` datetime NOT NULL,
  `title` varchar(255) NOT NULL,
  `menu` int(11) NOT NULL,
  `img_url` varchar(255) NOT NULL,
  `is_index` int(11) NOT NULL,
  `wx_url` text NOT NULL,
  `race_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `race`
--

CREATE TABLE `race` (
  `id` int(11) NOT NULL,
  `race_title` varchar(255) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_times` datetime NOT NULL,
  `sign_start_time` datetime NOT NULL,
  `place` varchar(255) NOT NULL,
  `contant` text NOT NULL,
  `click_point` int(11) NOT NULL,
  `photo_link` text NOT NULL,
  `contant_c` LONGTEXT NOT NULL,
  `add_time` datetime NOT NULL,
  `sign_end_time` datetime DEFAULT NULL,
  `display` int(11) NOT NULL DEFAULT '1',
  `low_price` varchar(9) DEFAULT '0',
  `race_type` int(11) NOT NULL DEFAULT '0',
  `team_mount` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `race`
--

INSERT INTO `race` (`id`, `race_title`, `start_time`, `end_times`, `sign_start_time`, `place`, `contant`, `click_point`, `photo_link`, `contant_c`, `add_time`, `sign_end_time`, `display`, `low_price`, `race_type`, `team_mount`) VALUES
(55, '5675', '2019-08-08 14:31:43', '2019-08-08 14:31:48', '2019-08-23 14:31:51', '5467', '', 1, '567', '5647', '2019-08-13 14:33:31', '2019-08-13 14:31:54', 1, '0', 0, 0),
(56, '5675', '2019-08-15 14:36:53', '2019-08-30 14:31:48', '2019-08-13 14:36:59', '5467', '', 1, '567', '1231', '2019-08-13 14:36:12', '2019-08-21 14:31:54', 1, '0.01', 0, 0),
(57, '羽毛球', '2019-08-15 18:23:20', '2019-08-17 18:23:32', '2019-08-13 18:23:39', '体育中心', '', 1, '', '水电费水电费水电费收到发多少', '2019-08-13 18:24:28', '2019-08-15 18:23:41', 1, '0', 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `race_check`
--

CREATE TABLE `race_check` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `check_time` varchar(255) NOT NULL,
  `start_time` varchar(255) NOT NULL,
  `diff_time` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `race_group`
--

CREATE TABLE `race_group` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `price` varchar(50) DEFAULT NULL,
  `mount` int(11) DEFAULT NULL,
  `reg_mount` int(11) DEFAULT '0',
  `payed_mount` int(11) DEFAULT '0',
  `cancl_mount` int(11) DEFAULT '0',
  `distance` float DEFAULT NULL,
  `audi` int(11) DEFAULT '1',
  `s_age` int(3) DEFAULT NULL,
  `b_age` int(3) DEFAULT NULL,
  `race_line` text,
  `p_update` int(11) DEFAULT '1',
  `is_team` int(11) DEFAULT '0',
  `team_check` int(11) DEFAULT '0',
  `team_mount` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `race_group`
--

INSERT INTO `race_group` (`id`, `race_id`, `title`, `price`, `mount`, `reg_mount`, `payed_mount`, `cancl_mount`, `distance`, `audi`, `s_age`, `b_age`, `race_line`, `p_update`, `is_team`, `team_check`, `team_mount`) VALUES
(68, 56, '789', '0.01', 6789, 1, 0, 0, 7689, 1, 0, 99, '6789', 1, 1, 0, 0),
(69, 56, '组别测试', '10', 1001, 0, 0, 0, 0, 1, NULL, NULL, '0', 1, 1, 0, 0),
(70, 57, '女子组', '1', 200, 1, 0, 0, 0, 1, NULL, NULL, '无', 2, 1, 2, 2),
(71, 57, '男子组', '2', 200, 0, 0, 0, 0, 1, NULL, NULL, '0', 2, 1, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `race_images`
--

CREATE TABLE `race_images` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `update_time` datetime NOT NULL,
  `images_url` text NOT NULL,
  `is_index` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `race_images`
--

INSERT INTO `race_images` (`id`, `race_id`, `update_time`, `images_url`, `is_index`) VALUES
(65, 56, '2019-08-13 02:36:19', 'uploadimg/1565678179.jpg', 1),
(66, 57, '2019-08-13 06:26:09', 'uploadimg/1565691969.jpg', 1);

-- --------------------------------------------------------

--
-- Table structure for table `race_input`
--

CREATE TABLE `race_input` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `input_name` varchar(255) NOT NULL,
  `input_title` varchar(255) NOT NULL,
  `addtime` datetime NOT NULL,
  `is_del` int(11) NOT NULL DEFAULT '0',
  `input_type` int(11) NOT NULL,
  `default_values` text NOT NULL,
  `instructions` text NOT NULL,
  `can_null` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `race_input_data`
--

CREATE TABLE `race_input_data` (
  `id` int(11) NOT NULL,
  `input_value` text NOT NULL,
  `input_name` varchar(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `reg_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `race_reg`
--

CREATE TABLE `race_reg` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `realname` varchar(10) NOT NULL,
  `sex` int(11) NOT NULL,
  `tel` varchar(20) NOT NULL,
  `xx` int(11) NOT NULL,
  `idcard_type` int(11) NOT NULL,
  `idcard` varchar(20) NOT NULL,
  `size` int(11) NOT NULL DEFAULT '1',
  `j_realname` varchar(30) NOT NULL,
  `j_tel` varchar(30) NOT NULL,
  `born` date NOT NULL,
  `shoe_size` varchar(10) NOT NULL,
  `email` varchar(50) NOT NULL,
  `address` varchar(255) NOT NULL,
  `j_address` varchar(255) NOT NULL,
  `j_rel` varchar(50) NOT NULL,
  `city` varchar(20) NOT NULL,
  `cert_img` varchar(255) NOT NULL,
  `edu` int(11) NOT NULL,
  `cert_heal_img` varchar(255) NOT NULL,
  `group_id` int(5) NOT NULL,
  `is_del` int(1) NOT NULL DEFAULT '0',
  `state` int(11) DEFAULT '1' COMMENT '1未审核 2审核未付费 3审核已付费',
  `q1` int(11) NOT NULL,
  `q2` int(11) NOT NULL,
  `race_check` int(11) NOT NULL DEFAULT '0',
  `race_check_time` varchar(20) NOT NULL,
  `finish_time` varchar(255) DEFAULT NULL,
  `team_id` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `race_reg`
--

INSERT INTO `race_reg` (`id`, `race_id`, `user_id`, `realname`, `sex`, `tel`, `xx`, `idcard_type`, `idcard`, `size`, `j_realname`, `j_tel`, `born`, `shoe_size`, `email`, `address`, `j_address`, `j_rel`, `city`, `cert_img`, `edu`, `cert_heal_img`, `group_id`, `is_del`, `state`, `q1`, `q2`, `race_check`, `race_check_time`, `finish_time`, `team_id`) VALUES
(31, 56, 218, '234234', 1, '13435627874', 0, 1, '234234', 1, '', '', '2014-03-30', '', 'asdsa@sasd.com', 'guangzhou', '', '', '', 'plug-in/uploadimg/1565691518.png', 0, '', 68, 0, 3, 1, 1, 0, '0000-00-00 00:00:00', '', 0),
(32, 57, 219, '刘建刚', 1, '13810176315', 0, 1, '130681198401040211', 1, '', '', '1984-01-04', '', '13310658@qq.com', '开发区', '', '', '', '', 0, '', 70, 0, 3, 1, 1, 0, '0000-00-00 00:00:00', '', 0);

-- --------------------------------------------------------

--
-- Table structure for table `race_reg_pay`
--

CREATE TABLE `race_reg_pay` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `reg_id` int(11) NOT NULL,
  `pay_type` int(11) NOT NULL,
  `state` int(11) NOT NULL,
  `money_value` int(11) NOT NULL,
  `add_time` datetime NOT NULL,
  `group_id` int(11) NOT NULL,
  `openid` varchar(255) DEFAULT NULL,
  `out_trade_no` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `race_reg_pay`
--

INSERT INTO `race_reg_pay` (`id`, `race_id`, `user_id`, `reg_id`, `pay_type`, `state`, `money_value`, `add_time`, `group_id`, `openid`, `out_trade_no`) VALUES
(1864, 56, 218, 30, 1, 2, 0, '2019-08-13 18:14:59', 68, 'obw9ExNICP6TFdDgNplygI6oQpIQ', '148740561220190813181719'),
(1865, 56, 218, 31, 1, 2, 0, '2019-08-13 18:18:47', 68, 'obw9ExNICP6TFdDgNplygI6oQpIQ', '148740561220190813182030'),
(1866, 57, 219, 32, 1, 2, 1, '2019-08-13 18:31:43', 70, 'obw9ExLupH6byZhmM60PYLZpCvec', '148740561220190813183145');

-- --------------------------------------------------------

--
-- Table structure for table `race_sign`
--

CREATE TABLE `race_sign` (
  `id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `group_title` varchar(255) NOT NULL,
  `group_cost` varchar(20) NOT NULL,
  `group_mount` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `race_team`
--

CREATE TABLE `race_team` (
  `id` int(11) NOT NULL,
  `team_name` varchar(50) NOT NULL,
  `team_content` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `race_id` int(11) NOT NULL,
  `add_time` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `is_check` int(11) NOT NULL DEFAULT '0',
  `mount` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `w_user`
--

CREATE TABLE `w_user` (
  `id` int(10) UNSIGNED NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password_o` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobi` varchar(255) NOT NULL,
  `reg_time` datetime NOT NULL,
  `is_del` int(1) NOT NULL DEFAULT '0',
  `fullname` varchar(255) NOT NULL,
  `active` int(11) NOT NULL DEFAULT '0',
  `company_id` int(11) DEFAULT NULL,
  `race_no` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `w_user`
--

INSERT INTO `w_user` (`id`, `username`, `password_o`, `password`, `email`, `mobi`, `reg_time`, `is_del`, `fullname`, `active`, `company_id`, `race_no`) VALUES
(218, NULL, '123456', 'e10adc3949ba59abbe56e057f20f883e', NULL, '13435627874', '2019-08-13 02:38:00', 0, 'Nick', 0, NULL, '0A318'),
(219, NULL, '123456', 'e10adc3949ba59abbe56e057f20f883e', NULL, '13810176315', '2019-08-13 06:31:17', 0, '13810176315', 0, NULL, '0A319');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `article`
--
ALTER TABLE `article`
  ADD UNIQUE KEY `id` (`id`);

--
-- Indexes for table `race`
--
ALTER TABLE `race`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id` (`id`);

--
-- Indexes for table `race_check`
--
ALTER TABLE `race_check`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `race_group`
--
ALTER TABLE `race_group`
  ADD PRIMARY KEY (`id`,`race_id`);

--
-- Indexes for table `race_images`
--
ALTER TABLE `race_images`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `race_input`
--
ALTER TABLE `race_input`
  ADD PRIMARY KEY (`id`,`race_id`);

--
-- Indexes for table `race_input_data`
--
ALTER TABLE `race_input_data`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `race_reg`
--
ALTER TABLE `race_reg`
  ADD PRIMARY KEY (`id`,`race_id`,`user_id`,`idcard`);

--
-- Indexes for table `race_reg_pay`
--
ALTER TABLE `race_reg_pay`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `race_sign`
--
ALTER TABLE `race_sign`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `race_team`
--
ALTER TABLE `race_team`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `w_user`
--
ALTER TABLE `w_user`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `article`
--
ALTER TABLE `article`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `race`
--
ALTER TABLE `race`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;

--
-- AUTO_INCREMENT for table `race_check`
--
ALTER TABLE `race_check`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `race_group`
--
ALTER TABLE `race_group`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

--
-- AUTO_INCREMENT for table `race_images`
--
ALTER TABLE `race_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- AUTO_INCREMENT for table `race_input`
--
ALTER TABLE `race_input`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `race_input_data`
--
ALTER TABLE `race_input_data`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `race_reg`
--
ALTER TABLE `race_reg`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `race_reg_pay`
--
ALTER TABLE `race_reg_pay`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1867;

--
-- AUTO_INCREMENT for table `race_sign`
--
ALTER TABLE `race_sign`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `race_team`
--
ALTER TABLE `race_team`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `w_user`
--
ALTER TABLE `w_user`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=220;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
