-- 表: bs_purchase

DROP TABLE IF EXISTS `bs_purchase`;
CREATE TABLE `bs_purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL COMMENT '用户ID',
  `bs_id` int(11) NOT NULL COMMENT '程序ID',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '购买价格',
  `pay_time` datetime NOT NULL COMMENT '支付时间',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态：1已支付',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid_bs_id` (`uid`,`bs_id`),
  KEY `uid` (`uid`),
  KEY `bs_id` (`bs_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='程序购买记录表';
