V14__2.0.8.sql 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. create table tmp_layer_info (
  2. tmp_layer_id SERIAL not null,
  3. zone_id INT4 null,
  4. layer_name VARCHAR(255) null,
  5. create_time TIMESTAMP not null default CURRENT_TIMESTAMP,
  6. locking BOOL null,
  7. user_id INT4 null,
  8. status INT2 not null default 1,
  9. layer_id VARCHAR(255) null,
  10. constraint PK_TMP_LAYER_INFO primary key (tmp_layer_id)
  11. );
  12. comment on table tmp_layer_info is
  13. '临时图层信息';
  14. comment on column tmp_layer_info.tmp_layer_id is
  15. '临时图层ID';
  16. comment on column tmp_layer_info.zone_id is
  17. '作品ID';
  18. comment on column tmp_layer_info.layer_name is
  19. '图层名称';
  20. comment on column tmp_layer_info.create_time is
  21. '创建时间';
  22. comment on column tmp_layer_info.locking is
  23. '是否锁定';
  24. comment on column tmp_layer_info.user_id is
  25. '用户ID';
  26. comment on column tmp_layer_info.status is
  27. '同步状态1:位同步,2:已同步';
  28. comment on column tmp_layer_info.layer_id is
  29. '图层ID';
  30. create table tmp_geom_info (
  31. tmp_id SERIAL not null,
  32. zone_id INT4 null,
  33. model_id INT4 null,
  34. layer_id VARCHAR(255) null,
  35. geom_name VARCHAR(255) null,
  36. building_id INT4 null,
  37. floor INT4 null,
  38. room_id INT4 null,
  39. geom geometry null,
  40. properties jsonb null,
  41. locking BOOL null,
  42. trans jsonb null,
  43. pics varchar(1024) null,
  44. video_url varchar(1024) null,
  45. audio_url CHAR(10) null,
  46. brief text null,
  47. navigation BOOL null,
  48. navigation_end varchar(100) null,
  49. type_number INT2 null,
  50. static_id INT4 null,
  51. material_id INT4 null,
  52. texture_id INT4 null,
  53. color VARCHAR(255) null,
  54. create_time TIMESTAMP not null default CURRENT_TIMESTAMP,
  55. status INT2 not null default 1,
  56. user_id INT4 null,
  57. tmp_layer_id INT4 null,
  58. constraint PK_TMP_GEOM_INFO primary key (tmp_id)
  59. );
  60. comment on table tmp_geom_info is
  61. '临时空间信息';
  62. comment on column tmp_geom_info.tmp_id is
  63. '临时ID';
  64. comment on column tmp_geom_info.zone_id is
  65. '区域ID';
  66. comment on column tmp_geom_info.model_id is
  67. '模型ID';
  68. comment on column tmp_geom_info.layer_id is
  69. '图层ID';
  70. comment on column tmp_geom_info.geom_name is
  71. '元素名称';
  72. comment on column tmp_geom_info.building_id is
  73. '大楼ID';
  74. comment on column tmp_geom_info.floor is
  75. '楼层';
  76. comment on column tmp_geom_info.room_id is
  77. '房间';
  78. comment on column tmp_geom_info.geom is
  79. '空间信息';
  80. comment on column tmp_geom_info.properties is
  81. '属性信息';
  82. comment on column tmp_geom_info.locking is
  83. '锁定';
  84. comment on column tmp_geom_info.trans is
  85. '变换';
  86. comment on column tmp_geom_info.pics is
  87. '图片地址';
  88. comment on column tmp_geom_info.video_url is
  89. '视频文件地址';
  90. comment on column tmp_geom_info.audio_url is
  91. '音频文件地址';
  92. comment on column tmp_geom_info.brief is
  93. '简介';
  94. comment on column tmp_geom_info.navigation is
  95. '是否导航';
  96. comment on column tmp_geom_info.navigation_end is
  97. '导航终点';
  98. comment on column tmp_geom_info.type_number is
  99. '类型编号0:模型 1:特效';
  100. comment on column tmp_geom_info.static_id is
  101. '特效ID';
  102. comment on column tmp_geom_info.material_id is
  103. '材质ID';
  104. comment on column tmp_geom_info.texture_id is
  105. '贴图ID';
  106. comment on column tmp_geom_info.color is
  107. '颜色';
  108. comment on column tmp_geom_info.create_time is
  109. '创建时间';
  110. comment on column tmp_geom_info.status is
  111. '同步状态1:位同步,2:已同步';
  112. comment on column tmp_geom_info.user_id is
  113. '用户ID';
  114. comment on column tmp_geom_info.tmp_layer_id is
  115. '临时图层ID';
  116. alter table tmp_geom_info
  117. add constraint FK_TMP_GEOM_REF_LAYER foreign key (tmp_layer_id)
  118. references tmp_layer_info (tmp_layer_id)
  119. on delete cascade on update cascade;