sql20190719.sql 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. CREATE TABLE `tb_virt_food` (
  2. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  3. `food_type` tinyint(3) DEFAULT '1' COMMENT '饭卡类型 1-通用 2-企业',
  4. `food_name` varchar(50) DEFAULT NULL COMMENT '饭卡组名称',
  5. `account_number` varchar(20) DEFAULT NULL COMMENT '账户',
  6. `account_password` varchar(20) DEFAULT NULL COMMENT '账户密码',
  7. `org_id` bigint(20) DEFAULT NULL COMMENT '主项目ID',
  8. `virt_id` bigint(20) DEFAULT NULL COMMENT '企业ID-企业类型时必填',
  9. `card_no` varchar(50) DEFAULT NULL COMMENT '饭卡号',
  10. `approval_status` tinyint(2) DEFAULT NULL COMMENT '1-待审核 2-审核通过 3-审核不通过',
  11. `approval_remarks` varchar(100) DEFAULT NULL,
  12. `enabled` tinyint(2) DEFAULT NULL COMMENT '启动1 禁用2',
  13. `created_by` bigint(20) DEFAULT NULL COMMENT '创建者',
  14. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  15. `updated_by` bigint(20) DEFAULT NULL COMMENT '修改者',
  16. `updated_at` datetime DEFAULT NULL COMMENT '修改时间',
  17. PRIMARY KEY (`id`),
  18. UNIQUE KEY `card_no` (`card_no`),
  19. UNIQUE KEY `food_name` (`food_name`),
  20. KEY `org_id` (`org_id`) USING BTREE
  21. ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
  22. CREATE TABLE `tb_virt_food_config` (
  23. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  24. `food_id` bigint(20) DEFAULT NULL,
  25. `merchant_name1` varchar(100) DEFAULT NULL,
  26. `merchant_name2` varchar(100) DEFAULT NULL,
  27. `merchant_name3` varchar(100) DEFAULT NULL,
  28. `merchant_name4` varchar(100) DEFAULT NULL,
  29. `discount1` varchar(10) DEFAULT NULL,
  30. `discount2` varchar(10) DEFAULT NULL,
  31. `discount3` varchar(10) DEFAULT NULL,
  32. `discount4` varchar(10) DEFAULT NULL,
  33. `logo1` varchar(200) DEFAULT NULL,
  34. `logo2` varchar(200) DEFAULT NULL,
  35. `logo3` varchar(200) DEFAULT NULL,
  36. `logo4` varchar(200) DEFAULT NULL,
  37. `out_url` varchar(100) DEFAULT NULL,
  38. `created_by` bigint(20) DEFAULT NULL COMMENT '创建者',
  39. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  40. `updated_by` bigint(20) DEFAULT NULL COMMENT '修改者',
  41. `updated_at` datetime DEFAULT NULL COMMENT '修改时间',
  42. PRIMARY KEY (`id`),
  43. UNIQUE KEY `food_id` (`food_id`)
  44. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  45. CREATE TABLE `tb_virt_food_org` (
  46. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  47. `food_id` bigint(20) DEFAULT NULL,
  48. `org_id` bigint(20) DEFAULT NULL,
  49. PRIMARY KEY (`id`)
  50. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
  51. CREATE TABLE `tb_virt_food_outconfig` (
  52. `id` bigint(20) NOT NULL,
  53. `remarks` varchar(50) DEFAULT NULL,
  54. `interface_url` varchar(100) DEFAULT NULL,
  55. `encodekey` varchar(100) DEFAULT NULL,
  56. `qudaohao` varchar(50) DEFAULT NULL,
  57. `param1` varchar(50) DEFAULT NULL,
  58. `param2` varchar(50) DEFAULT NULL,
  59. `param3` varchar(50) DEFAULT NULL,
  60. PRIMARY KEY (`id`)
  61. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  62. CREATE TABLE `tb_virt_food_person` (
  63. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  64. `food_id` bigint(20) DEFAULT NULL COMMENT '饭卡组ID',
  65. `openid` varchar(40) DEFAULT NULL,
  66. `org_id` bigint(20) DEFAULT NULL COMMENT '项目ID',
  67. `virt_id` bigint(20) DEFAULT NULL,
  68. `mobile` varchar(20) DEFAULT NULL,
  69. `created_by` bigint(20) DEFAULT NULL COMMENT '创建者',
  70. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  71. PRIMARY KEY (`id`)
  72. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  73. INSERT INTO `tb_virt_food_outconfig` (`id`, `remarks`, `interface_url`, `encodekey`, `qudaohao`, `param1`, `param2`, `param3`) VALUES ('1', '威富通企业注册接口', 'https://wxacard.hstydev.com/localserver2/welfare-openapi-web/channel/gateway', '56d55ef6d5de41ba84df5883e0e90039', '8888888888', NULL, NULL, NULL);