You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
5.2 KiB

4 months ago
  1. create table tb_product
  2. (
  3. id varchar(36) not null
  4. primary key,
  5. user_id varchar(32) null comment '用户id',
  6. buy_user_id varchar(32) null comment '采购用户id',
  7. company_name varchar(64) null comment '供应商名称',
  8. user_name varchar(32) null comment '客户姓名',
  9. phone varchar(32) null comment '客户电话',
  10. address varchar(128) null comment '提货地址',
  11. address_id varchar(32) null comment '地址id',
  12. pic text null comment '报价照片',
  13. price decimal(10, 2) default 0.00 not null comment '单价',
  14. num bigint(32) default 0 null comment '暂定数量、',
  15. audit_status int null comment '审核状态 0审核中 1 审核通过 2审核未通过',
  16. show_status int null comment '挂单状态 0挂单 1 已撤单',
  17. product_type int null comment '期货现货 0期货 1 现货',
  18. transaction_time datetime null comment '交货时间',
  19. create_by varchar(50) null comment '创建人',
  20. create_time datetime null comment '创建日期',
  21. update_by varchar(50) null comment '更新人',
  22. update_time datetime null comment '更新日期',
  23. sys_org_code varchar(64) null comment '所属部门',
  24. del_flag tinyint(1) default 0 not null comment '删除标识0-正常,1-已删除'
  25. );
  26. create table tb_user_role
  27. (
  28. id varchar(36) not null
  29. primary key,
  30. user_id varchar(32) null comment '用户id',
  31. role int null comment '角色信息 1供应商 2采购商',
  32. user_name varchar(32) null comment '用户名',
  33. company_name varchar(64) null comment '公司名称',
  34. tax_code varchar(32) null comment '税收编码',
  35. address varchar(128) null comment '公司地址',
  36. bank_account varchar(32) null comment '公司账号',
  37. phone varchar(32) null comment '电话',
  38. bank_nama varchar(32) null comment '开户行',
  39. business_license text null comment '营业执照上传',
  40. basic_account text null comment '基本户信息照片上传',
  41. bank_info text null comment '收款银行照片上传',
  42. audit_status int null comment '审核状态 0审核中 1 审核通过 2审核未通过',
  43. create_by varchar(50) null comment '创建人',
  44. create_time datetime null comment '创建日期',
  45. update_by varchar(50) null comment '更新人',
  46. update_time datetime null comment '更新日期',
  47. sys_org_code varchar(64) null comment '所属部门'
  48. );
  49. create index idx_phone
  50. on tb_user_role (phone, user_name);
  51. create index idx_userid
  52. on tb_user_role (user_id);
  53. create table tb_suggest
  54. (
  55. id varchar(36) not null
  56. primary key,
  57. user_id varchar(20) null comment '用户id',
  58. user_name varchar(32) null comment '用户名',
  59. user_phone varchar(64) null comment '用户手机号',
  60. content longtext null comment '问题描述',
  61. proof_img longtext null comment '问题截图',
  62. submit_time date null comment '提交时间',
  63. is_reply int null comment '是否回复(0:未回复 1:已回复)',
  64. reply_msg varchar(512) null comment '回复结果',
  65. reply_time date null comment '回复时间',
  66. reply_id varchar(19) null comment '回复人',
  67. create_by varchar(50) null comment '创建人',
  68. create_time date null comment '创建日期',
  69. update_by varchar(50) null comment '更新人',
  70. update_time date null comment '更新日期',
  71. sys_org_code varchar(64) null comment '所属部门'
  72. );
  73. create table tb_customs
  74. (
  75. id varchar(36) not null
  76. primary key,
  77. user_id varchar(32) null comment '用户id',
  78. role int null comment '角色信息 1供应商 2采购商',
  79. user_name varchar(32) null comment '用户名',
  80. password varchar(64) null comment '密码',
  81. company_name varchar(64) null comment '公司名称',
  82. tax_code varchar(32) null comment '税收编码',
  83. address varchar(128) null comment '公司地址',
  84. bank_account varchar(32) null comment '公司账号',
  85. phone varchar(32) null comment '电话',
  86. bank_nama varchar(32) null comment '开户行',
  87. business_license longtext null comment '营业执照上传',
  88. basic_account longtext null comment '基本户信息照片上传',
  89. bank_info longtext null comment '收款银行照片上传',
  90. audit_status int null comment '审核状态 0审核中 1 审核通过 2审核未通过',
  91. create_by varchar(50) null comment '创建人',
  92. create_time date null comment '创建日期',
  93. update_by varchar(50) null comment '更新人',
  94. update_time date null comment '更新日期',
  95. sys_org_code varchar(64) null comment '所属部门'
  96. );