-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主机： localhost
-- 生成日期： 2025-01-01 11:34:17
-- 服务器版本： 5.7.26
-- PHP 版本： 7.3.4

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 */;

--
-- 数据库： `card_system`
--

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

--
-- 表的结构 `admins`
--

CREATE TABLE `admins` (
  `id` int(11) NOT NULL,
  `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- 转存表中的数据 `admins`
--

INSERT INTO `admins` (`id`, `username`, `password`, `created_at`) VALUES
(1, 'admin', '$2y$10$GAZBIhMvaFRNA3beLq96renvbSIq2G4bH8JQt0z5dZ1sIPT38C8jq', '2025-01-01 01:52:41');

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

--
-- 表的结构 `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `order_number` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` tinyint(1) DEFAULT '0',
  `payment_type` enum('qrcode','url') COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_data` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- 表的结构 `products`
--

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(10,2) NOT NULL,
  `stock` int(11) NOT NULL DEFAULT '0',
  `status` tinyint(1) DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- 转存表中的数据 `products`
--

INSERT INTO `products` (`id`, `name`, `description`, `image`, `price`, `stock`, `status`, `created_at`, `updated_at`) VALUES
(2, 'VIP会员', 'VIP会员', '6774ae95ca45e.jpg', '999.00', 100, 1, '2025-01-01 02:27:14', '2025-01-01 02:55:17'),
(3, '购物卡一张', '购物卡一张', '6774ae7b64ca2.jpg', '999.00', 100, 1, '2025-01-01 02:27:59', '2025-01-01 02:54:51'),
(4, '充值卡一张', '充值卡一张', '6774ae64e9a1c.jpg', '100.00', 10000, 1, '2025-01-01 02:28:50', '2025-01-01 02:55:28'),
(5, '购物卡三张', '购物卡三张', '6774ad7962301.jpg', '9.90', 100, 1, '2025-01-01 02:33:26', '2025-01-01 02:55:37'),
(7, '通讯录源码', '通讯录源码', '6774aecd4bdd9.jpg', '9.90', 100, 1, '2025-01-01 02:56:13', '2025-01-01 02:56:13'),
(8, '网站源码', '网站源码', '6774aeec4544f.jpg', '100.00', 0, 1, '2025-01-01 02:56:44', '2025-01-01 02:56:44'),
(9, '网站源码大全', '网站源码大全', '6774af4daf0fd.jpg', '9.90', 9, 1, '2025-01-01 02:58:21', '2025-01-01 02:58:32'),
(10, '话费充值卡', '面值50元', '6774af7d0ef26.jpg', '49.90', 100, 1, '2025-01-01 02:59:09', '2025-01-01 02:59:09'),
(12, '话费充值卡', '面值100元', '6774aff500d58.jpg', '90.00', 100, 1, '2025-01-01 03:01:09', '2025-01-01 03:01:09'),
(13, '话费充值卡200', '面值200元', '6774b0144cfcb.jpg', '100.00', 100, 1, '2025-01-01 03:01:40', '2025-01-01 03:01:40'),
(14, '测试商品', '测试商品', '6774b2a112aa6.jpg', '100.00', 100, 1, '2025-01-01 03:12:33', '2025-01-01 03:12:33');

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

--
-- 表的结构 `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `site_title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `site_announcement` text COLLATE utf8mb4_unicode_ci,
  `contact_info` text COLLATE utf8mb4_unicode_ci,
  `footer_text` text COLLATE utf8mb4_unicode_ci,
  `payment_type` enum('qrcode','url') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'qrcode',
  `qrcode_config` text COLLATE utf8mb4_unicode_ci,
  `url_config` text COLLATE utf8mb4_unicode_ci,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- 转存表中的数据 `settings`
--

INSERT INTO `settings` (`id`, `site_title`, `site_announcement`, `contact_info`, `footer_text`, `payment_type`, `qrcode_config`, `url_config`, `updated_at`) VALUES
(1, '自动发卡系统', '网站只做商品展示点击立即购买会跳转到购买页面哦', '123456789', '© 2025 自动发卡系统 版权所有', 'qrcode', 'payment_qrcode_1735696875.jpg', 'https://www.baidu.com/', '2025-01-01 03:12:15');

--
-- 转储表的索引
--

--
-- 表的索引 `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`);

--
-- 表的索引 `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `order_number` (`order_number`),
  ADD KEY `product_id` (`product_id`);

--
-- 表的索引 `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`);

--
-- 表的索引 `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用表AUTO_INCREMENT `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- 使用表AUTO_INCREMENT `products`
--
ALTER TABLE `products`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- 使用表AUTO_INCREMENT `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;
