/*
 Navicat Premium Data Transfer

 Source Server         : pgsql政务正式2.21.138.148
 Source Server Type    : PostgreSQL
 Source Server Version : 140009
 Source Host           : 2.21.138.148:5333
 Source Catalog        : citylifeline_db
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 140009
 File Encoding         : 65001

 Date: 29/07/2024 16:25:29
*/


-- ----------------------------
-- Table structure for work_order_admin
-- ----------------------------
DROP TABLE IF EXISTS "public"."work_order_admin";
CREATE TABLE "public"."work_order_admin" (
  "id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "work_order_code" varchar(64) COLLATE "pg_catalog"."default",
  "scene" varchar(16) COLLATE "pg_catalog"."default",
  "work_order_content" varchar(255) COLLATE "pg_catalog"."default",
  "place" varchar(200) COLLATE "pg_catalog"."default",
  "area" varchar(16) COLLATE "pg_catalog"."default",
  "dispatch_time" timestamp(6),
  "process_limited" timestamp(6),
  "feedback" varchar(500) COLLATE "pg_catalog"."default",
  "handler" varchar(64) COLLATE "pg_catalog"."default",
  "handler_id" varchar(64) COLLATE "pg_catalog"."default",
  "state" varchar(16) COLLATE "pg_catalog"."default",
  "geom_data" "public"."geometry",
  "defined" int4,
  "deleted" int4,
  "created_at" timestamp(6),
  "created_by" varchar(100) COLLATE "pg_catalog"."default",
  "updated_at" timestamp(6),
  "updated_by" varchar(100) COLLATE "pg_catalog"."default",
  "process_time" timestamp(6),
  "work_order_type" varchar(32) COLLATE "pg_catalog"."default",
  "foreign_id" varchar(64) COLLATE "pg_catalog"."default",
  "attachments" varchar(600) COLLATE "pg_catalog"."default",
  "complete_time" timestamp(6),
  "send_scene" varchar(64) COLLATE "pg_catalog"."default",
  "complete_attachments" varchar(600) COLLATE "pg_catalog"."default",
  "disposal_dept" varchar(255) COLLATE "pg_catalog"."default",
  "disposal_dept_id" varchar(64) COLLATE "pg_catalog"."default",
  "yjyabh" varchar(255) COLLATE "pg_catalog"."default",
  "order_source" varchar(64) COLLATE "pg_catalog"."default",
  "order_urgent" varchar(64) COLLATE "pg_catalog"."default",
  "sms_phone" varchar(1000) COLLATE "pg_catalog"."default",
  "sms_content" varchar(1000) COLLATE "pg_catalog"."default",
  "is_handle_urge" varchar(4) COLLATE "pg_catalog"."default",
  "handle_urge_user" varchar(100) COLLATE "pg_catalog"."default",
  "handle_urge_time" timestamp(0),
  "check_result" varchar(255) COLLATE "pg_catalog"."default",
  "check_describe" varchar(2000) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."work_order_admin"."id" IS 'id';
COMMENT ON COLUMN "public"."work_order_admin"."work_order_code" IS '工单编号';
COMMENT ON COLUMN "public"."work_order_admin"."scene" IS '专项场景';
COMMENT ON COLUMN "public"."work_order_admin"."work_order_content" IS '工单内容';
COMMENT ON COLUMN "public"."work_order_admin"."place" IS '位置';
COMMENT ON COLUMN "public"."work_order_admin"."area" IS '行政区划';
COMMENT ON COLUMN "public"."work_order_admin"."dispatch_time" IS '下发时间';
COMMENT ON COLUMN "public"."work_order_admin"."process_limited" IS '处理时限';
COMMENT ON COLUMN "public"."work_order_admin"."feedback" IS '处理结果说明';
COMMENT ON COLUMN "public"."work_order_admin"."handler" IS '处理人员';
COMMENT ON COLUMN "public"."work_order_admin"."handler_id" IS '处理人员编号';
COMMENT ON COLUMN "public"."work_order_admin"."state" IS '工单状态 0待处理 1处理中 2已完成';
COMMENT ON COLUMN "public"."work_order_admin"."geom_data" IS '空间信息';
COMMENT ON COLUMN "public"."work_order_admin"."defined" IS '1为传给本系统部门使用,null为传给专项使用';
COMMENT ON COLUMN "public"."work_order_admin"."deleted" IS '0删除,1不删除';
COMMENT ON COLUMN "public"."work_order_admin"."process_time" IS '处理时间';
COMMENT ON COLUMN "public"."work_order_admin"."work_order_type" IS '工单类型 0事件工单、1预警工单、2风险工单、3隐患工单、4设备工单';
COMMENT ON COLUMN "public"."work_order_admin"."foreign_id" IS '关联id(没有关联id就是对应的名称,目前5-督办工单，6-其他工单是名称)';
COMMENT ON COLUMN "public"."work_order_admin"."attachments" IS '附件';
COMMENT ON COLUMN "public"."work_order_admin"."complete_time" IS '完成时间';
COMMENT ON COLUMN "public"."work_order_admin"."send_scene" IS '需下发专项';
COMMENT ON COLUMN "public"."work_order_admin"."complete_attachments" IS '工单处理附件';
COMMENT ON COLUMN "public"."work_order_admin"."disposal_dept" IS '处理单位(部门)';
COMMENT ON COLUMN "public"."work_order_admin"."disposal_dept_id" IS '处理单位(部门)id';
COMMENT ON COLUMN "public"."work_order_admin"."yjyabh" IS '关联应急预案编号';
COMMENT ON COLUMN "public"."work_order_admin"."order_source" IS '不知道干什么用的?';
COMMENT ON COLUMN "public"."work_order_admin"."is_handle_urge" IS '是否催办(0是，1否)';
COMMENT ON COLUMN "public"."work_order_admin"."handle_urge_user" IS '催办人';
COMMENT ON COLUMN "public"."work_order_admin"."handle_urge_time" IS '催办时间';
COMMENT ON COLUMN "public"."work_order_admin"."check_result" IS '复查结果';
COMMENT ON COLUMN "public"."work_order_admin"."check_describe" IS '复查描述';
COMMENT ON TABLE "public"."work_order_admin" IS '工单管理表';

-- ----------------------------
-- Primary Key structure for table work_order_admin
-- ----------------------------
ALTER TABLE "public"."work_order_admin" ADD CONSTRAINT "work_order_admin_pkey" PRIMARY KEY ("id");
