dic.ddl.sql 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ##数据字典表
  2. # 字典类型
  3. DROP TABLE IF EXISTS `dic_dt_type`;
  4. create table dic_dt_type
  5. (
  6. id varchar(20) not null primary key ,
  7. group_code varchar(20) null,
  8. type varchar(40) not null,
  9. name varchar(40) not null,
  10. description varchar(200) null,
  11. status int not null,
  12. create_time timestamp null,
  13. create_user varchar(40) null,
  14. update_time timestamp null,
  15. update_user varchar(40) null,
  16. remark varchar(200) null
  17. ) comment '字典类型';
  18. # 字典数据
  19. DROP TABLE IF EXISTS `dic_dt_data`;
  20. create table dic_dt_data
  21. (
  22. id varchar(20) not null primary key ,
  23. dict_type_id varchar(20) not null,
  24. parent_id varchar(20) null,
  25. type varchar(40) not null,
  26. code varchar(40) not null,
  27. label varchar(40) not null,
  28. status int not null,
  29. create_time timestamp null,
  30. create_user varchar(40) null,
  31. update_time timestamp null,
  32. update_user varchar(40) null,
  33. remark varchar(200) null
  34. ) comment '字典数据';
  35. # 字典数据映射
  36. DROP TABLE IF EXISTS `dic_dt_data_map`;
  37. create table dic_dt_data_map
  38. (
  39. id varchar(20) not null primary key ,
  40. dict_data_id varchar(20) not null,
  41. type varchar(40) not null,
  42. group_code varchar(20) not null,
  43. target_code varchar(20) not null,
  44. label varchar(40) not null,
  45. code varchar(40) not null,
  46. status int not null,
  47. create_time timestamp null,
  48. create_user varchar(40) null,
  49. update_time timestamp null,
  50. update_user varchar(40) null,
  51. remark varchar(200) null
  52. ) comment '字典数据映射';
  53. # 知识库类型
  54. DROP TABLE IF EXISTS `dic_kl_type`;
  55. create table dic_kl_type
  56. (
  57. id varchar(20) not null primary key ,
  58. code varchar(40) not null,
  59. name varchar(40) not null,
  60. description varchar(500) null,
  61. status int not null,
  62. create_time timestamp null,
  63. create_user varchar(40) null,
  64. update_time timestamp null,
  65. update_user varchar(40) null,
  66. remark varchar(200) null
  67. ) comment '知识库类型';
  68. # 知识库数据
  69. DROP TABLE IF EXISTS `dic_kl_data`;
  70. create table dic_kl_data
  71. (
  72. id varchar(20) not null primary key ,
  73. kl_type_code varchar(20) not null,
  74. kl_type_name varchar(40) not null,
  75. parent_id varchar(20) null,
  76. code varchar(40) not null,
  77. label varchar(40) not null,
  78. value varchar(500) null,
  79. status int not null,
  80. create_time timestamp null,
  81. create_user varchar(40) null,
  82. update_time timestamp null,
  83. update_user varchar(40) null,
  84. remark varchar(200) null
  85. ) comment '知识库数据';