install.sql 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. CREATE TABLE `qimall_addons_card_secret` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `mall_id` int(11) DEFAULT NULL COMMENT '商城ID',
  4. `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '卡号名称',
  5. `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '卡号密码',
  6. `use_status` int(11) DEFAULT '1' COMMENT '使用状态 (1.未领取,2.待领取,3已领取,4.已失效)',
  7. `status` int(11) DEFAULT '1' COMMENT '状态(-1是已删除,0是禁用,1是正常)',
  8. `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
  9. `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
  10. `cate_id` int(11) DEFAULT NULL COMMENT '分类ID',
  11. PRIMARY KEY (`id`),
  12. KEY `mall_id` (`mall_id`,`name`) USING BTREE
  13. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='卡密';
  14. CREATE TABLE `qimall_addons_card_secret_cate` (
  15. `id` int(11) NOT NULL AUTO_INCREMENT,
  16. `mall_id` int(11) DEFAULT NULL COMMENT '商城ID',
  17. `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  18. `sort` int(11) DEFAULT '99' COMMENT '排序,越小越前面',
  19. `status` int(11) DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
  20. `no_use_num` int(11) DEFAULT '0' COMMENT '未发卡数量',
  21. `use_num` int(11) NOT NULL DEFAULT '0' COMMENT '已发卡数量',
  22. `created_at` int(255) DEFAULT NULL,
  23. `updated_at` int(11) DEFAULT NULL,
  24. PRIMARY KEY (`id`),
  25. KEY `maill_id` (`mall_id`) USING BTREE
  26. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='卡密分类';
  27. CREATE TABLE `qimall_addons_card_secret_goods` (
  28. `id` int(11) NOT NULL AUTO_INCREMENT,
  29. `cate_id` int(11) DEFAULT NULL COMMENT '绑定分类ID',
  30. `goods_id` int(11) DEFAULT NULL COMMENT '商品ID',
  31. `status` int(11) DEFAULT '1' COMMENT '状态(-1是已删除,0是禁用,1是正常)',
  32. `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
  33. `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
  34. `mall_id` int(11) DEFAULT NULL COMMENT '商城ID',
  35. PRIMARY KEY (`id`)
  36. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='商品设置表';
  37. CREATE TABLE `qimall_addons_card_secret_import_fail_log` (
  38. `id` int(11) NOT NULL AUTO_INCREMENT,
  39. `mall_id` int(11) DEFAULT NULL COMMENT '商城ID',
  40. `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '卡号名称',
  41. `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '卡号密码',
  42. `use_status` int(11) DEFAULT '1' COMMENT '使用状态 (1.未领取,2.待领取,3.已失效)',
  43. `status` int(11) DEFAULT '1' COMMENT '状态(-1是已删除,0是禁用,1是正常)',
  44. `import_id` int(11) DEFAULT NULL COMMENT '导入ID',
  45. `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
  46. `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
  47. `cate_id` int(11) DEFAULT NULL COMMENT '分类ID',
  48. PRIMARY KEY (`id`),
  49. KEY `mall_id` (`mall_id`,`name`) USING BTREE
  50. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='导入失败记录';
  51. CREATE TABLE `qimall_addons_card_secret_import_log` (
  52. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  53. `cate_id` int(11) DEFAULT NULL COMMENT '卡密分类ID',
  54. `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID',
  55. `file` varchar(200) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '导入文件路径',
  56. `operator_name` varchar(100) NOT NULL DEFAULT '' COMMENT '操作人昵称',
  57. `operator_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作人ID',
  58. `export_count` int(11) NOT NULL DEFAULT '0' COMMENT '总导入数量',
  59. `export_success_count` int(11) NOT NULL DEFAULT '0' COMMENT '导入成功数量',
  60. `export_fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '导入失败数量',
  61. `status` int(1) NOT NULL DEFAULT '1' COMMENT '0是禁用,1是正常,-1是删除',
  62. `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  63. `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  64. `export_status` int(1) NOT NULL DEFAULT '0' COMMENT '0是正在处理中,1是导入完成',
  65. PRIMARY KEY (`id`)
  66. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='卡密导入记录';
  67. CREATE TABLE `qimall_addons_card_secret_use` (
  68. `id` int(11) NOT NULL AUTO_INCREMENT,
  69. `mall_id` int(11) DEFAULT NULL COMMENT '商城ID',
  70. `user_id` int(11) DEFAULT NULL COMMENT '用户ID',
  71. `card_secret_id` int(11) DEFAULT NULL COMMENT '密码ID',
  72. `order_id` int(11) DEFAULT NULL COMMENT '订单ID',
  73. `goods_id` int(11) DEFAULT NULL COMMENT '商品ID',
  74. `use_status` int(11) DEFAULT '1' COMMENT '使用状态 (1.未领取,2.待领取,3已领取,4.已失效)',
  75. `status` int(11) DEFAULT '1' COMMENT '状态(-1是已删除,0是禁用,1是正常)',
  76. `cate_id` int(11) DEFAULT NULL COMMENT '分类ID',
  77. `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
  78. `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
  79. PRIMARY KEY (`id`),
  80. KEY `user_id` (`user_id`,`mall_id`) USING BTREE
  81. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='使用卡列表';