com.snow.auto_monitor/build/sql/db.sql

62 lines
1.7 KiB
MySQL
Raw Normal View History

2024-07-12 18:11:21 +08:00
create table merchant (
id int primary key auto_increment,
name varchar(255) not null,
2024-07-15 15:45:09 +08:00
private_key varchar(255),
2024-07-12 18:11:21 +08:00
created_at timestamp default current_timestamp
);
create table orders (
id int primary key auto_increment,
order_no varchar(255) not null,
merchant_id int,
out_trade_no varchar(64),
product_id int,
recharge_account varchar(64),
account_type tinyint,
number int,
notify_url varchar(255),
extend_parameter varchar(1024),
2024-07-26 15:09:57 +08:00
status tinyint,-- 1.成功 2.充值中 3.充值失败 4.异常需要人工处理 5.取消订单
transfer_status tinyint,-- 1.成功 2.充值中(出队) 3. 等待充值(等待入队) 4.充值失败 5.异常需要人工处理 6.取消订单 7.订单入队
2024-07-22 10:16:48 +08:00
fail_reason varchar(255),
2024-07-15 15:45:09 +08:00
created_at timestamp default current_timestamp
2024-07-12 18:11:21 +08:00
);
create table whitelist (
id int primary key auto_increment,
merchant_id int,
ip varchar(64),
created_at timestamp default current_timestamp
);
create table product (
2024-07-24 18:22:35 +08:00
-- v1
2024-07-12 18:11:21 +08:00
id int primary key auto_increment,
name varchar(255) not null,
price int,
2024-07-17 17:04:25 +08:00
product_url varchar(255),
2024-07-17 16:53:26 +08:00
status tinyint, -- 1.上架 2.下架
2024-07-24 18:22:35 +08:00
created_at timestamp default current_timestamp,
-- v2
2024-08-07 13:46:10 +08:00
type tinyint-- 1.拼多多 2.多多进宝 3. 拼多多+多多进宝 4. 直接返回成功商品
2024-07-26 17:56:54 +08:00
extend_parameter varchar(1024),
2024-07-12 18:11:21 +08:00
);
2024-07-24 18:22:35 +08:00
--
create table combination_product(
id int primary key auto_increment,
name varchar(255) not null,
parent_id int,
child_id int,
status tinyint -- 暂未用到
2024-08-07 13:46:10 +08:00
)
create table device (
id int primary key auto_increment,
device_no varchar(255),
phone varchar(255),
code int,
created_at timestamp default current_timestamp
);