orders.db 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. -- table order_list
  2. -- 购物车
  3. create table order_list(
  4. olId varchar(20) not null comment '购物车ID',
  5. channelId varchar(20) not null comment '渠道ID,对应渠道表channel',
  6. custId varchar(20) not null comment '客户ID,对应客户表cust',
  7. olTypeCd varchar(10) not null comment '购物车类型,网站 1 微信 2 APP 3 对应 order_list_type',
  8. extSystemId varchar(20) not null comment '对应外部系统 关联ID,方便维护',
  9. status_cd varchar(10) default '0' COMMENT '数据状态 对应 status',
  10. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  11. remark varchar(200) comment '备注'
  12. );
  13. -- 订单项
  14. create table busi_order(
  15. boId varchar(20) not null comment '业务动作ID',
  16. olId varchar(20) not null comment '购物车ID',
  17. actionTypeCd varchar(10) not null comment '购物车动作,对应表action_type',
  18. status_cd varchar(10) default '0' COMMENT '数据状态 对应 status',
  19. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  20. start_dt timestamp NOT NULL COMMENT '开始时间',
  21. end_dt timestamp NOT NULL COMMENT '结束时间',
  22. remark varchar(200) comment '备注'
  23. );
  24. --购物车属性表
  25. create table order_list_attr(
  26. olId varchar(20) not null COMMENT '客户ID',
  27. attrCd varchar(50) not null COMMENT '属性编码,对应 Attr 表',
  28. value varchar(200) not null COMMENT '属性编码对应值',
  29. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  30. );
  31. --购物车属性表
  32. create table busi_order_attr(
  33. boId varchar(20) not null COMMENT '订单项ID',
  34. attrCd varchar(50) not null COMMENT '属性编码,对应 Attr 表',
  35. value varchar(200) not null COMMENT '属性编码对应值',
  36. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  37. );
  38. -- 动作类型表
  39. create table action_type(
  40. id int not null,
  41. actionTypeCd varchar(10) not null comment '业务动作编码',
  42. name varchar(200) not null comment '业务动作名称',
  43. describe varchar(500) not null comment '业务动作描述',
  44. serviceCd varchar(10) not null comment '业务动作隶属于那个服务,U1 客户服务,M2 账户服务',
  45. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  46. );
  47. -- 数据状态字典表
  48. create table status(
  49. id int not null,
  50. status_cd varchar(20),
  51. name varchar(200) not null comment '状态名称',
  52. describe varchar(500) not null comment '状态描述',
  53. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  54. );
  55. -- 属性字典表
  56. create table attr(
  57. id int not null,
  58. domain varchar(20) not null comment '属性域,CUST 客户域 ORDER_LIST 购物车域 BUSI_ORDER 订单项域'
  59. attrCd varchar(20) not null comment '属性编码',
  60. name varchar(200) not null comment '属性名称',
  61. describe varchar(500) not null comment '属性描述',
  62. create_dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  63. );