epusdt.sql 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. -- auto-generated definition
  2. create table orders
  3. (
  4. id int auto_increment
  5. primary key,
  6. trade_id varchar(32) not null comment 'epusdt订单号',
  7. order_id varchar(32) not null comment '客户交易id',
  8. block_transaction_id varchar(128) null comment '区块唯一编号',
  9. actual_amount decimal(19, 4) not null comment '订单实际需要支付的金额,保留4位小数',
  10. amount decimal(19, 4) not null comment '订单金额,保留4位小数',
  11. token varchar(50) not null comment '所属钱包地址',
  12. status int default 1 not null comment '1:等待支付,2:支付成功,3:已过期',
  13. notify_url varchar(128) not null comment '异步回调地址',
  14. redirect_url varchar(128) null comment '同步回调地址',
  15. callback_num int default 0 null comment '回调次数',
  16. callback_confirm int default 2 null comment '回调是否已确认? 1是 2否',
  17. created_at timestamp null,
  18. updated_at timestamp null,
  19. deleted_at timestamp null,
  20. constraint orders_order_id_uindex
  21. unique (order_id),
  22. constraint orders_trade_id_uindex
  23. unique (trade_id)
  24. );
  25. create index orders_block_transaction_id_index
  26. on orders (block_transaction_id);
  27. -- auto-generated definition
  28. create table wallet_address
  29. (
  30. id int auto_increment
  31. primary key,
  32. token varchar(50) not null comment '钱包token',
  33. status int default 1 not null comment '1:启用 2:禁用',
  34. created_at timestamp null,
  35. updated_at timestamp null,
  36. deleted_at timestamp null
  37. )
  38. comment '钱包表';
  39. create index wallet_address_token_index
  40. on wallet_address (token);