/*
 Navicat Premium Dump SQL

 Source Server         : 1.13.177.47oracle
 Source Server Type    : Oracle
 Source Server Version : 110200 (Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options)
 Source Host           : 1.13.177.47:1521
 Source Schema         : HAIWEI

 Target Server Type    : Oracle
 Target Server Version : 110200 (Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options)
 File Encoding         : 65001

 Date: 10/12/2025 15:10:17
*/


-- ----------------------------
-- Table structure for BASE_DEVICELEDGER
-- ----------------------------
DROP TABLE "HAIWEI"."BASE_DEVICELEDGER";
CREATE TABLE "HAIWEI"."BASE_DEVICELEDGER" (
  "OBJ_ID" NUMBER NOT NULL,
  "DEVICE_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "DEVICE_NAME" VARCHAR2(64 BYTE),
  "DEVICE_MODEL" VARCHAR2(32 BYTE),
  "DEVICE_TYPE" VARCHAR2(32 BYTE),
  "DEVICE_ADDRESS" VARCHAR2(64 BYTE),
  "DEVICE_STATUS" NUMBER(1,0) DEFAULT 1,
  "USED_DEPARTMENT" VARCHAR2(64 BYTE),
  "COST_CENTER" VARCHAR2(32 BYTE),
  "MANUFACTURER" VARCHAR2(64 BYTE),
  "ENABLE_DATE" DATE,
  "PRODUCT_LINE_CODE" VARCHAR2(64 BYTE),
  "IS_FLAG" NUMBER(1,0) DEFAULT 0,
  "CREATED_BY" VARCHAR2(32 BYTE),
  "CREATED_TIME" DATE,
  "UPDATED_BY" VARCHAR2(32 BYTE),
  "UPDATED_TIME" DATE,
  "FACTORY_CODE" VARCHAR2(32 BYTE),
  "TEAM_CODE" VARCHAR2(64 BYTE),
  "ASSET_CODE" VARCHAR2(64 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."OBJ_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_CODE" IS '设备编号';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_NAME" IS '设备名称';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_MODEL" IS '设备型号';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_TYPE" IS '设备类型：1-生产设备；2-计量设备';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_ADDRESS" IS 'IP地址';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."DEVICE_STATUS" IS '设备状态（0-使用；1-停用；2-报废）';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."USED_DEPARTMENT" IS '使用部门';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."COST_CENTER" IS '成本中心';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."MANUFACTURER" IS '生产厂商';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."ENABLE_DATE" IS '启用日期';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."PRODUCT_LINE_CODE" IS '所属工位';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."IS_FLAG" IS '是否标识';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."CREATED_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."CREATED_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."UPDATED_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."UPDATED_TIME" IS '更新时间';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."FACTORY_CODE" IS '工厂编号';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."TEAM_CODE" IS '班组编号';
COMMENT ON COLUMN "HAIWEI"."BASE_DEVICELEDGER"."ASSET_CODE" IS '资产编号';
COMMENT ON TABLE "HAIWEI"."BASE_DEVICELEDGER" IS '设备台账';

-- ----------------------------
-- Table structure for DMS_BASE_ATTACH_INFO
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_ATTACH_INFO";
CREATE TABLE "HAIWEI"."DMS_BASE_ATTACH_INFO" (
  "ATTACH_ID" NUMBER NOT NULL,
  "ATTACH_NAME" NVARCHAR2(255),
  "ATTACH_TYPE" VARCHAR2(10 BYTE),
  "ATTACH_PATH" NVARCHAR2(500),
  "PROCESS_ID" NUMBER,
  "ACTIVE_FLAG" CHAR(1 BYTE) DEFAULT '1',
  "CREATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Table structure for DMS_BASE_INSPECT_PROJECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT";
CREATE TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" (
  "INSPECT_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "INSPECT_PROJECT_CODE" VARCHAR2(64 BYTE),
  "INSPECT_PROJECT" VARCHAR2(128 BYTE) NOT NULL,
  "INSPECT_TYPE" CHAR(1 BYTE) NOT NULL,
  "INSPECT_PROJECT_PROPERTY" CHAR(1 BYTE) NOT NULL,
  "RECORD_METHOD" VARCHAR2(64 BYTE),
  "UP_LIMIT" NUMBER,
  "LOW_LIMIT" NUMBER,
  "DEF_VALUE" NUMBER,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."INSPECT_PROJECT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."INSPECT_PROJECT_CODE" IS '项目编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."INSPECT_PROJECT" IS '巡检项目';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."INSPECT_TYPE" IS '检查类型(1巡检 2点检)';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."INSPECT_PROJECT_PROPERTY" IS '巡检项目属性(1定性 2定量)';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."RECORD_METHOD" IS '记录方式';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."UP_LIMIT" IS '上限';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."LOW_LIMIT" IS '下限';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."DEF_VALUE" IS '默认值';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_PROJECT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" IS '点巡检项目信息';

-- ----------------------------
-- Table structure for DMS_BASE_INSPECT_ROUTE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE";
CREATE TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" (
  "INSPECT_ROUTE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "ROUTE_CODE" VARCHAR2(64 BYTE),
  "ROUTE_NAME" VARCHAR2(64 BYTE) NOT NULL,
  "INSPECT_TYPE" CHAR(1 BYTE) NOT NULL,
  "CYCLE_PERIOD" CHAR(1 BYTE),
  "DEVICE_TYPE_ID" NUMBER(20,0),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "IS_FLAG" CHAR(1 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."INSPECT_ROUTE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."ROUTE_CODE" IS '线路编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."ROUTE_NAME" IS '线路名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."INSPECT_TYPE" IS '线路类型(1巡检 2点检)';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."CYCLE_PERIOD" IS '循环周期';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."DEVICE_TYPE_ID" IS '设备类型ID，关联base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_ROUTE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" IS '点巡检线路信息';

-- ----------------------------
-- Table structure for DMS_BASE_INSPECT_STANDARD
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD";
CREATE TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" (
  "INSPECT_STANDARD_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "STANDARD_CODE" VARCHAR2(64 BYTE),
  "STANDARD_NAME" VARCHAR2(255 BYTE) NOT NULL,
  "INSPECT_OBJECTIVE" VARCHAR2(255 BYTE),
  "INSPECT_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "INSPECT_ITEM_COUNT" NUMBER(11,0),
  "IS_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."INSPECT_STANDARD_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."STANDARD_CODE" IS '标准编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."STANDARD_NAME" IS '标准名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."INSPECT_OBJECTIVE" IS '巡检目的';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."INSPECT_PROJECT_ID" IS '巡检项目ID，关联dms_base_inspect_project的inspect_project_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."INSPECT_ITEM_COUNT" IS '检查项总数';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."IS_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_INSPECT_STANDARD"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" IS '点巡检标准信息';

-- ----------------------------
-- Table structure for DMS_BASE_LUBE_STANDARD
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD";
CREATE TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" (
  "LUBE_STANDARD_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "LUBE_STANDARD_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "DEVICE_TYPE_ID" NUMBER(20,0) NOT NULL,
  "LUBE_PROTOCOL" VARCHAR2(255 BYTE) NOT NULL,
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."LUBE_STANDARD_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."LUBE_STANDARD_CODE" IS '标准编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."DEVICE_TYPE_ID" IS '设备类型ID，关联base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."LUBE_PROTOCOL" IS '润滑标准';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STANDARD"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" IS '润滑标准信息';

-- ----------------------------
-- Table structure for DMS_BASE_LUBE_STATION
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_LUBE_STATION";
CREATE TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" (
  "LUBE_STATION_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "DEVICE_TYPE_ID" NUMBER(20,0) NOT NULL,
  "LUBE_STANDARD_ID" VARCHAR2(64 BYTE),
  "LUBE_STATION_CODE" VARCHAR2(64 BYTE),
  "LUBE_STATION_NAME" VARCHAR2(64 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."LUBE_STATION_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."DEVICE_TYPE_ID" IS '设备类型ID，关联base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."LUBE_STANDARD_ID" IS '润滑标准ID，关联润滑标准信息主键';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."LUBE_STATION_CODE" IS '部位编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."LUBE_STATION_NAME" IS '部位名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_LUBE_STATION"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" IS '润滑部位信息';

-- ----------------------------
-- Table structure for DMS_BASE_MAINT_PROJECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT";
CREATE TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" (
  "MAINT_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "MAINT_PROJECT_NAME" VARCHAR2(64 BYTE) NOT NULL,
  "MAINT_PROJECT_DESC" VARCHAR2(500 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."MAINT_PROJECT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."MAINT_PROJECT_NAME" IS '项目名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."MAINT_PROJECT_DESC" IS '项目描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_PROJECT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" IS '保养项目信息';

-- ----------------------------
-- Table structure for DMS_BASE_MAINT_STANDARD
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD";
CREATE TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" (
  "MAINT_STANDARD_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "MAINT_STANDARD_CODE" VARCHAR2(64 BYTE),
  "DEVICE_TYPE_ID" NUMBER(20,0),
  "MAINT_PROTOCOL" VARCHAR2(255 BYTE) NOT NULL,
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "IS_FLAG" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."MAINT_STANDARD_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."MAINT_STANDARD_CODE" IS '标准编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."DEVICE_TYPE_ID" IS '设备类型ID，关联base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."MAINT_PROTOCOL" IS '保养标准';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STANDARD"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" IS '保养标准信息';

-- ----------------------------
-- Table structure for DMS_BASE_MAINT_STATION
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_MAINT_STATION";
CREATE TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" (
  "MAINT_STATION_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "DEVICE_TYPE_ID" NUMBER(20,0),
  "MAINT_STANDARD_ID" NUMBER(20,0),
  "MAINT_STATION_CODE" VARCHAR2(64 BYTE),
  "MAINT_STATION_NAME" VARCHAR2(64 BYTE),
  "IS_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "PROTOCOL_CODE" VARCHAR2(255 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."MAINT_STATION_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."DEVICE_TYPE_ID" IS '设备类型ID，关联base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."MAINT_STANDARD_ID" IS '保养标准ID';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."MAINT_STATION_CODE" IS '部位编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."MAINT_STATION_NAME" IS '部位名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."IS_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_MAINT_STATION"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" IS '保养部位信息';

-- ----------------------------
-- Table structure for DMS_BASE_SHUT_REASON
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_SHUT_REASON";
CREATE TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" (
  "SHUT_REASON_ID" NUMBER(11,0) NOT NULL,
  "REASON_CODE" NVARCHAR2(255),
  "DEVICE_ID" NUMBER(20,0),
  "SHUT_TYPE_ID" NUMBER(11,0),
  "SHUT_REASON" NVARCHAR2(255),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."SHUT_REASON_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."REASON_CODE" IS '原因编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."DEVICE_ID" IS '设备ID，关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."SHUT_TYPE_ID" IS '停机类型,关联dms_base_shut_type的shut_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."SHUT_REASON" IS '停机原因';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_REASON"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" IS '停机原因信息';

-- ----------------------------
-- Table structure for DMS_BASE_SHUT_TYPE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE";
CREATE TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" (
  "SHUT_TYPE_ID" NUMBER(11,0) NOT NULL,
  "TYPE_CODE" NVARCHAR2(64),
  "SHUT_TYPE_NAME" NVARCHAR2(64) NOT NULL,
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."SHUT_TYPE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."TYPE_CODE" IS '类型编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."SHUT_TYPE_NAME" IS '停机类型名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_SHUT_TYPE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" IS '停机类型信息';

-- ----------------------------
-- Table structure for DMS_BASE_STATION_PROJECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT";
CREATE TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" (
  "MAINT_STATION_ID" NUMBER(20,0) NOT NULL,
  "MAINT_PROJECT_ID" NUMBER(20,0) NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_STATION_PROJECT"."MAINT_STATION_ID" IS '保养部位ID';
COMMENT ON COLUMN "HAIWEI"."DMS_BASE_STATION_PROJECT"."MAINT_PROJECT_ID" IS '保养项目ID';
COMMENT ON TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" IS '保养部位关联项目信息';

-- ----------------------------
-- Table structure for DMS_BILLS_FAULT_INSTANCE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE";
CREATE TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" (
  "REPAIR_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "BILLS_FAULT_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "INSTANCE_TYPE" CHAR(1 BYTE) NOT NULL,
  "FAULT_SOURCE_TYPE" CHAR(1 BYTE),
  "FAULT_SOURCE_ID" NUMBER(20,0),
  "WF_DEFINITION_ID" NUMBER(20,0),
  "APPLY_USER" VARCHAR2(64 BYTE),
  "APPLY_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "REQUIRE_END_TIME" DATE,
  "BILLS_STATUS" CHAR(1 BYTE) NOT NULL,
  "APPROVESTATUS" VARCHAR2(64 BYTE),
  "REPAIR_CONFIRM" CHAR(1 BYTE),
  "CONFIRM_USER" VARCHAR2(64 BYTE),
  "IS_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "KNOWLEDGE_REPAIR_ID" NUMBER(20,0),
  "VERIFY_METHOD" VARCHAR2(500 BYTE),
  "REVIEWER" VARCHAR2(50 BYTE),
  "REVIEWER_GROUP" VARCHAR2(100 BYTE),
  "DEVICE_ID" NUMBER(11,0),
  "APPLY_USER_PHONE" VARCHAR2(20 BYTE),
  "FAULT_LEVEL" VARCHAR2(2 BYTE),
  "DESIGN_OPERATIONS" VARCHAR2(255 BYTE),
  "FAULT_DESCRIPTION" VARCHAR2(255 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REPAIR_INSTANCE_ID" IS '主键标识;此表不会长期保存';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."BILLS_FAULT_CODE" IS '工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."INSTANCE_TYPE" IS '工单类型（1手工创建 2自动创建）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."FAULT_SOURCE_TYPE" IS '报修来源类型(1检修 2点检 3巡检 9其他)';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."FAULT_SOURCE_ID" IS '报修来源ID（预留字段不显示）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."WF_DEFINITION_ID" IS '流程定义ID,关联wf_definition_config的id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."APPLY_USER" IS '申请人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."APPLY_TIME" IS '申请时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REAL_BEGIN_TIME" IS '实际开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REAL_END_TIME" IS '实际完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REQUIRE_END_TIME" IS '要求完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."BILLS_STATUS" IS '工单状态（0待维修 1维修中 2维修完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."APPROVESTATUS" IS '审批状态（0通过，1不通过）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REPAIR_CONFIRM" IS '确认状态（0未确认 1确认完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."CONFIRM_USER" IS '确认人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."IS_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."KNOWLEDGE_REPAIR_ID" IS '关联维修知识库ID，关联dms_knowledge_repair表';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."VERIFY_METHOD" IS '验证方法，描述如何验证维修效果';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REVIEWER" IS '审核人姓名';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."REVIEWER_GROUP" IS '审核组名称';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."DEVICE_ID" IS '设备ID，关联设备台账表';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."APPLY_USER_PHONE" IS '申请人手机';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_FAULT_INSTANCE"."FAULT_LEVEL" IS '故障等级（1一般 2紧急 3严重）';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" IS '故障报修工单;手工创建故障报修工单';

-- ----------------------------
-- Table structure for DMS_BILLS_INSPECT_INSTANCE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE";
CREATE TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" (
  "INSPECT_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "PLAN_INSPECT_ID" NUMBER(20,0),
  "WF_DEFINITION_ID" NUMBER(20,0),
  "INSPECT_TYPE" CHAR(1 BYTE) NOT NULL,
  "INSPECT_ROUTE_ID" NUMBER(20,0),
  "BILLS_INSPECT_CODE" VARCHAR2(64 BYTE),
  "PLAN_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "INSPECT_STATUS" CHAR(1 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "STATUS" VARCHAR2(16 BYTE),
  "IS_FLAG" CHAR(1 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE"."INSPECT_INSTANCE_ID" IS '主键标识';

-- ----------------------------
-- Table structure for DMS_BILLS_LUBE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" (
  "BILLS_LUBE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "LUBE_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "LUBE_STATION_ID" NUMBER(20,0),
  "LUBE_STANDARD_ID" NUMBER(20,0),
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "MAINT_STATUS" CHAR(1 BYTE),
  "BEGIN_TIME" DATE,
  "END_TIME" DATE,
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."BILLS_LUBE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."LUBE_INSTANCE_ID" IS '润滑工单ID，关联润滑工单主键';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."LUBE_STATION_ID" IS '润滑部位,关联润滑部位主键';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."LUBE_STANDARD_ID" IS '润滑标准ID，关联润滑标准主键';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."MAINT_STATUS" IS '润滑状态（1待润滑 2润滑中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."BEGIN_TIME" IS '润滑开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."END_TIME" IS '润滑结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" IS '润滑工单明细';

-- ----------------------------
-- Table structure for DMS_BILLS_LUBE_INSTANCE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE";
CREATE TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" (
  "LUBE_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "PLAN_LUBE_ID" NUMBER(11,0),
  "BILLS_LUBE_CODE" VARCHAR2(64 BYTE),
  "LUBE_GROUP" VARCHAR2(64 BYTE),
  "LUBE_SUPERVISOR" VARCHAR2(64 BYTE),
  "LUBE_LEVEL" CHAR(1 BYTE),
  "PLAN_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "LUBE_STATUS" CHAR(1 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "STATUS" VARCHAR2(16 BYTE),
  "TENANT_ID" VARCHAR2(64 BYTE),
  "WF_DEFINITION_ID" NUMBER(20,0)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."LUBE_INSTANCE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."PLAN_LUBE_ID" IS '计划ID，关联dms_plan_lube的plan_lube_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."BILLS_LUBE_CODE" IS '润滑工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."LUBE_GROUP" IS '润滑组别';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."LUBE_SUPERVISOR" IS '润滑负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."LUBE_LEVEL" IS '润滑级别（1日常润滑 2月度润滑 3年度润滑）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."PLAN_BEGIN_TIME" IS '计划润滑开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."PLAN_END_TIME" IS '计划润滑完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."REAL_BEGIN_TIME" IS '实际润滑开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."REAL_END_TIME" IS '实际润滑完成时间;超期报警';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."LUBE_STATUS" IS '润滑状态（1待润滑 2润滑中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."STATUS" IS '流程状态';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_LUBE_INSTANCE"."TENANT_ID" IS '租户编号';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" IS '润滑工单';

-- ----------------------------
-- Table structure for DMS_BILLS_MAINT_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL";
CREATE TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" (
  "BILLS_MAINT_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "MAINT_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "MAINT_STATION_ID" NUMBER(20,0),
  "MAINT_STANDARD_ID" NUMBER(20,0),
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "MAINT_STATUS" CHAR(1 BYTE),
  "BEGIN_TIME" DATE,
  "END_TIME" DATE,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."BILLS_MAINT_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."MAINT_INSTANCE_ID" IS '保养工单ID，关联dms_bills_maint_instance的maint_instance_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."MAINT_STATION_ID" IS '保养部位,关联dms_base_maint_station的maint_station_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."MAINT_STANDARD_ID" IS '保养标准ID，关联保养标准主键';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."MAINT_STATUS" IS '保养状态（1待保养 2保养中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."BEGIN_TIME" IS '保养开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."END_TIME" IS '保养结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" IS '保养工单明细';

-- ----------------------------
-- Table structure for DMS_BILLS_MAINT_DETAIL_PROJECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT";
CREATE TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" (
  "MAINT_DETAIL_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "BILLS_MAINT_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "MAINT_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "MAINT_PROJECT_NAME" VARCHAR2(64 BYTE),
  "MAINT_PROJECT_DESC" VARCHAR2(500 BYTE),
  "MAINT_PROJECT_STATUS" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."MAINT_DETAIL_PROJECT_ID" IS '保养工单明细项目信息ID';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."BILLS_MAINT_DETAIL_ID" IS '保养工单明细ID';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."MAINT_PROJECT_ID" IS '保养项目ID';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."MAINT_PROJECT_NAME" IS '保养项目名称(冗余)';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."MAINT_PROJECT_DESC" IS '保养项目描述';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."MAINT_PROJECT_STATUS" IS '保养项目状态（0待保养 1保养完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" IS '保养工单明细项目信息;检查每个项目的点巡检结果详情';

-- ----------------------------
-- Table structure for DMS_BILLS_MAINT_INSTANCE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE";
CREATE TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" (
  "MAINT_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "PLAN_MAINT_ID" NUMBER(20,0),
  "WF_DEFINITION_ID" NUMBER(20,0),
  "BILLS_MAINT_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "MAINT_GROUP" VARCHAR2(64 BYTE),
  "MAINT_SUPERVISOR" VARCHAR2(64 BYTE),
  "MAINT_LEVEL" CHAR(1 BYTE),
  "PLAN_BEGIN_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_END_TIME" DATE,
  "MAINT_STATUS" CHAR(1 BYTE),
  "STATUS" VARCHAR2(16 BYTE),
  "MAINT_COMP_RATE" NUMBER,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_INSTANCE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."PLAN_MAINT_ID" IS '保养计划ID,关联dms_plan_maint的plan_maint_id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."WF_DEFINITION_ID" IS '流程定义ID,关联wf_definition_config的id';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."BILLS_MAINT_CODE" IS '保养单号';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_GROUP" IS '保养组别';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_SUPERVISOR" IS '保养负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_LEVEL" IS '保养级别(1日常保养 2月度保养 3年度保养)';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."PLAN_BEGIN_TIME" IS '计划保养时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."REAL_BEGIN_TIME" IS '实际开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."PLAN_END_TIME" IS '计划完成时间;根据计划的时限计算';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."REAL_END_TIME" IS '实际完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_STATUS" IS '保养状态(1待保养 2保养中 3已完成)';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."MAINT_COMP_RATE" IS '保养完成率';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_BILLS_MAINT_INSTANCE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" IS '保养工单';

-- ----------------------------
-- Table structure for DMS_DISPATCH_MEMBER
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_DISPATCH_MEMBER";
CREATE TABLE "HAIWEI"."DMS_DISPATCH_MEMBER" (
  "MEMBER_ID" NUMBER(20,0) NOT NULL,
  "PLAN_ID" NUMBER(20,0) NOT NULL,
  "USER_ID" NUMBER(20,0),
  "USER_NAME" VARCHAR2(64 BYTE),
  "MEMBER_ROLE" CHAR(1 BYTE),
  "ALLOCATED_HOURS" VARCHAR2(30 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_DISPATCH_MEMBER"."MEMBER_ROLE" IS '成员角色：1-负责人 2-主要执行人 3-协助执行人';
COMMENT ON TABLE "HAIWEI"."DMS_DISPATCH_MEMBER" IS '派工成员明细表';

-- ----------------------------
-- Table structure for DMS_DISPATCH_PLAN
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_DISPATCH_PLAN";
CREATE TABLE "HAIWEI"."DMS_DISPATCH_PLAN" (
  "PLAN_ID" NUMBER(20,0) NOT NULL,
  "PLAN_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "WORK_ORDER_ID" NUMBER(20,0),
  "WORK_ORDER_CODE" VARCHAR2(64 BYTE),
  "DEVICE_ID" NUMBER(20,0),
  "DEVICE_CODE" VARCHAR2(64 BYTE),
  "DEVICE_NAME" VARCHAR2(255 BYTE),
  "DISPATCH_TYPE" CHAR(1 BYTE) DEFAULT '1',
  "EXECUTOR_ID" NUMBER(20,0),
  "EXECUTOR_NAME" VARCHAR2(64 BYTE),
  "TEAM_ID" NUMBER(20,0),
  "TEAM_NAME" VARCHAR2(255 BYTE),
  "DISPATCH_TIME" DATE DEFAULT SYSDATE,
  "REQUIRE_START_TIME" DATE,
  "REQUIRE_END_TIME" DATE,
  "RECEIVE_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "RECEIVE_TIME" DATE,
  "REJECT_REASON" VARCHAR2(500 BYTE),
  "EXECUTION_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "PRIORITY" CHAR(1 BYTE) DEFAULT '3',
  "DISPATCHER_ID" NUMBER(20,0),
  "DISPATCHER_NAME" VARCHAR2(64 BYTE),
  "DISPATCH_NOTES" VARCHAR2(1000 BYTE),
  "IS_FLAG" CHAR(1 BYTE) DEFAULT '1',
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_DISPATCH_PLAN"."DISPATCH_TYPE" IS '派工类型：1-单人派工 2-团队派工';
COMMENT ON COLUMN "HAIWEI"."DMS_DISPATCH_PLAN"."RECEIVE_STATUS" IS '接收状态：0-待接收 1-已接收 2-已拒绝';
COMMENT ON COLUMN "HAIWEI"."DMS_DISPATCH_PLAN"."EXECUTION_STATUS" IS '执行状态：0-待执行 1-执行中 2-已完成 3-已取消';
COMMENT ON COLUMN "HAIWEI"."DMS_DISPATCH_PLAN"."PRIORITY" IS '优先级：1-紧急 2-高 3-中 4-低';
COMMENT ON TABLE "HAIWEI"."DMS_DISPATCH_PLAN" IS '派工计划表';

-- ----------------------------
-- Table structure for DMS_FAULT_COMPENTS_PARTS
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS";
CREATE TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS" (
  "COMPENTS_PARTS_ID" NUMBER(20,0) NOT NULL,
  "FAULT_ID" NUMBER(20,0),
  "PART_NAME" NVARCHAR2(10),
  "PART_SPECIFICATIONS" NVARCHAR2(10),
  "AMOUNT" NUMBER(11,0)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_COMPENTS_PARTS"."COMPENTS_PARTS_ID" IS '故障报修零部件内容ID';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_COMPENTS_PARTS"."FAULT_ID" IS '故障报修工单ID，关联故障报修工单主键';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_COMPENTS_PARTS"."PART_NAME" IS '零部件名称';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_COMPENTS_PARTS"."PART_SPECIFICATIONS" IS '零部件规格';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_COMPENTS_PARTS"."AMOUNT" IS '数量';
COMMENT ON TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS" IS '零部件更换内容表';

-- ----------------------------
-- Table structure for DMS_FAULT_INSTANCE_ACTIVITY
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY";
CREATE TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" (
  "INSTANCE_ACTIVITY_ID" NUMBER(20,0) NOT NULL,
  "REPAIR_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "PROCESS_ACTIVITY_ID" NUMBER(20,0),
  "FAULT_TYPE" NVARCHAR2(10),
  "FAULT_DESCRIPTION" NVARCHAR2(255),
  "DESIGN_OPERATIONS" NVARCHAR2(255),
  "DEVICE_ID" NUMBER(20,0),
  "REPAIR_TYPE" NCHAR(1),
  "OUTSRC_ID" NUMBER(20,0),
  "PROCESS_HANDLE_RESOLUTION" NVARCHAR2(255),
  "REMARK" NVARCHAR2(500),
  "PROCESS_HANDLE_STATUS" NCHAR(1) NOT NULL,
  "PROCESS_STEP_ORDER" NUMBER(11,0) NOT NULL,
  "START_TIME" DATE,
  "END_TIME" DATE,
  "HANDLE_USER_ID" NUMBER(20,0),
  "HANDLE_BY" NVARCHAR2(64),
  "HANDLE_TIME" DATE,
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "TRANSFER_USER_ID" NUMBER(20,0),
  "ATTR1" NVARCHAR2(255),
  "CHECKED_FAULT" NVARCHAR2(100),
  "REPAIR_CONTENT" NVARCHAR2(100),
  "PROTECTED_METHOD" NVARCHAR2(100),
  "REPAIRER" NVARCHAR2(100),
  "REPAIR_CONFIRM" NUMBER(11,0),
  "CONFIRM_TIME" DATE,
  "COMPONENTS_PARTS_ID" NUMBER(20,0),
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."INSTANCE_ACTIVITY_ID" IS '维修工单实例节点ID';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REPAIR_INSTANCE_ID" IS '故障报修工单ID，关联故障报修工单主键';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."PROCESS_ACTIVITY_ID" IS '工单流程节点ID（关联wf_process_activity的process_activity_id）';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."FAULT_TYPE" IS '故障类型(关联数据字典);最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."FAULT_DESCRIPTION" IS '故障描述;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."DESIGN_OPERATIONS" IS '涉及操作，关联数据字典，可以选择多个;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."DEVICE_ID" IS '设备ID，关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REPAIR_TYPE" IS '维修类型：1-内部维修；2-外协维修;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."OUTSRC_ID" IS '外协单位，关联dms_base_outsrc_info的outsrc_id;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."PROCESS_HANDLE_RESOLUTION" IS '处理意见;第一步不显示，从第2个步骤开始显示此字段';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."PROCESS_HANDLE_STATUS" IS '状态(0已结束，1执行中，2、待接取，3、已转发）';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."PROCESS_STEP_ORDER" IS '工单流程步骤顺序';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."START_TIME" IS '执行开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."END_TIME" IS '执行结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."HANDLE_USER_ID" IS '处理人ID（关联sys_user的user_id)';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."HANDLE_BY" IS '处理人';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."HANDLE_TIME" IS '处理时间';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."TRANSFER_USER_ID" IS '转单人用户id或转发协助用户id;1、在转发时，生成新的工单节点实例，执行人id为转发的用户，而转单人是刚才转发给此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束2、在添加协助时，生成新的工单节点实例，执行人id为添加协助的用户，而转单人是刚才添加协助此用户的用户id，是否协助工单为1，并且转发后当前工单的状态仍为执行中';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."ATTR1" IS '用户预留1';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."CHECKED_FAULT" IS '检查后的故障判断';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REPAIR_CONTENT" IS '维修内容';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."PROTECTED_METHOD" IS '维修措施';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REPAIRER" IS '维修人';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."REPAIR_CONFIRM" IS '维修结果（1，待确认。2，确认完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."CONFIRM_TIME" IS '确认时间';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."COMPONENTS_PARTS_ID" IS '更换零部件记录ID';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" IS '故障报修工单实例节点';

-- ----------------------------
-- Table structure for DMS_INSPECT_INSTANCE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" (
  "INSTANCE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "INSPECT_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "LINE_STEP" NUMBER(11,0),
  "REAL_LINE_STEP" NUMBER(11,0),
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "INSTANCE_DETAIL_STATUS" CHAR(1 BYTE),
  "INSPECT_STANDARD" VARCHAR2(128 BYTE),
  "INSPECT_DESC" VARCHAR2(500 BYTE),
  "INSPECT_STATUS" CHAR(1 BYTE),
  "BEGIN_TIME" DATE,
  "END_TIME" DATE,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSTANCE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSPECT_INSTANCE_ID" IS '点巡检工单ID';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."LINE_STEP" IS '巡检步骤';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."REAL_LINE_STEP" IS '实际巡检步骤';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSTANCE_DETAIL_STATUS" IS '巡检状态（1待巡检 2巡检中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSPECT_STANDARD" IS '巡检标准';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSPECT_DESC" IS '巡检描述';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."INSPECT_STATUS" IS '设备状态（1正常 0异常）';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."BEGIN_TIME" IS '巡检开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."END_TIME" IS '巡检结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" IS '点巡检工单明细';

-- ----------------------------
-- Table structure for DMS_INSPECT_PROJECT_DEVICE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE";
CREATE TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" (
  "INSPECT_PROJECT_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "TARGET_TYPE" CHAR(1 BYTE) NOT NULL,
  "TARGET_ID" NUMBER(20,0) NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE"."INSPECT_PROJECT_ID" IS '点巡检项目ID';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE"."TARGET_TYPE" IS '关联类型(1设备类型)';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE"."TARGET_ID" IS '关联类型的主键';
COMMENT ON TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" IS '点巡检项目关联物料信息';

-- ----------------------------
-- Table structure for DMS_INSPECT_ROUTE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" (
  "ROUTE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "INSPECT_ROUTE_ID" NUMBER(20,0) NOT NULL,
  "LINE_STEP" NUMBER(11,0),
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "INSPECT_STANDARD" VARCHAR2(128 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."ROUTE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."INSPECT_ROUTE_ID" IS '线路ID，关联dms_base_inspect_route的inspect_route_id';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."LINE_STEP" IS '巡检步骤';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."INSPECT_STANDARD" IS '巡检标准;预留，不需要关联巡检标准，一条巡检线路的巡检标准都相同';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" IS '点巡检线路明细';

-- ----------------------------
-- Table structure for DMS_INSTANCE_FILE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_INSTANCE_FILE";
CREATE TABLE "HAIWEI"."DMS_INSTANCE_FILE" (
  "INSTANCE_FILE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "TARGET_TYPE" CHAR(1 BYTE) NOT NULL,
  "TARGET_ID" NUMBER(20,0) NOT NULL,
  "FILE_PATH" VARCHAR2(255 BYTE) NOT NULL,
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."INSTANCE_FILE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."TARGET_TYPE" IS '关联类型(1维修前，2维修后)';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."TARGET_ID" IS '关联类型为1时关联维修工单实例节点主键，关联类型为2时关联维修记录ID';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."FILE_PATH" IS '故障文件地址，一般是图片';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_INSTANCE_FILE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_INSTANCE_FILE" IS '维修工单文件;手工创建，从故障报修开始';

-- ----------------------------
-- Table structure for DMS_KNOWLEDGE_LUBE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE";
CREATE TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" (
  "KNOWLEDGE_LUBE_ID" NUMBER(11,0) NOT NULL,
  "EXPERIENCE_CODE" NVARCHAR2(64),
  "DEVICE_TYPE_ID" NUMBER(11,0),
  "LUBE_STATION_ID" NUMBER(11,0),
  "PROTOCOL_CODE" NVARCHAR2(64),
  "OPERATIONS_DESCRIPTION" NVARCHAR2(255),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."KNOWLEDGE_LUBE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."EXPERIENCE_CODE" IS '经验编号';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."DEVICE_TYPE_ID" IS '设备类型ID，关联dms_base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."LUBE_STATION_ID" IS '润滑部位，关联dms_base_lube_station的lube_station_id';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."PROTOCOL_CODE" IS '润滑标准';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."OPERATIONS_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_LUBE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" IS '润滑知识库';

-- ----------------------------
-- Table structure for DMS_KNOWLEDGE_MAINT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT";
CREATE TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" (
  "KNOWLEDGE_MAINT_ID" NUMBER(11,0) NOT NULL,
  "EXPERIENCE_CODE" NVARCHAR2(64),
  "DEVICE_TYPE_ID" NUMBER(11,0),
  "MAINT_STATION_ID" NUMBER(11,0),
  "MAINT_PROTOCOL" NVARCHAR2(255),
  "OPERATION_DESCRIPTION" NVARCHAR2(255),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."KNOWLEDGE_MAINT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."EXPERIENCE_CODE" IS '经验编号';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."DEVICE_TYPE_ID" IS '设备类型ID，关联dms_base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."MAINT_STATION_ID" IS '保养部位,关联dms_base_maint_station的maint_station_id';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."MAINT_PROTOCOL" IS '保养标准';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_MAINT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" IS '保养知识库';

-- ----------------------------
-- Table structure for DMS_KNOWLEDGE_REPAIR
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR";
CREATE TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" (
  "KNOWLEDGE_REPAIR_ID" NUMBER(11,0) NOT NULL,
  "EXPERIENCE_CODE" NVARCHAR2(64),
  "DEVICE_TYPE_ID" NUMBER(11,0),
  "FAULT_DESCRIPTION" NVARCHAR2(255),
  "DESIGN_OPERATIONS" NVARCHAR2(128),
  "OPERATIONS_DESCRIPTION" NVARCHAR2(255),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."KNOWLEDGE_REPAIR_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."EXPERIENCE_CODE" IS '经验编号';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."DEVICE_TYPE_ID" IS '设备类型ID，关联dm_base_device_type的device_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."FAULT_DESCRIPTION" IS '故障描述';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."DESIGN_OPERATIONS" IS '涉及操作';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."OPERATIONS_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_KNOWLEDGE_REPAIR"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" IS '维修知识库';

-- ----------------------------
-- Table structure for DMS_MAINT_INSTANCE_ACTIVITY
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY";
CREATE TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" (
  "INSTANCE_ACTIVITY_ID" NUMBER(20,0) NOT NULL,
  "MAINT_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "WF_DEFINITION_ID" NUMBER(20,0),
  "WF_NODE_ID" NUMBER(20,0),
  "MAINT_LEVEL" CHAR(1 BYTE),
  "MAINT_GROUP" VARCHAR2(64 BYTE),
  "MAINT_SUPERVISOR" VARCHAR2(64 BYTE),
  "PROCESS_HANDLE_RESOLUTION" VARCHAR2(255 BYTE),
  "PROCESS_HANDLE_STATUS" CHAR(1 BYTE),
  "PROCESS_STEP_ORDER" NUMBER(11,0) NOT NULL,
  "START_TIME" DATE,
  "END_TIME" DATE,
  "HANDLE_USER_ID" NUMBER(20,0),
  "HANDLE_BY" VARCHAR2(64 BYTE),
  "HANDLE_TIME" DATE,
  "TRANSFER_USER_ID" NUMBER(20,0),
  "ATTR1" VARCHAR2(255 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE,
  "TENANT_ID" VARCHAR2(64 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."INSTANCE_ACTIVITY_ID" IS '保养工单实例节点ID';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."MAINT_INSTANCE_ID" IS '保养工单实例ID，关联dms_bills_maint_instance的maint_instance_id';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."WF_DEFINITION_ID" IS '流程定义ID,关联wf_definition_config的id';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."WF_NODE_ID" IS '工单流程节点ID（关联wf_task_back_node的id）';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."MAINT_LEVEL" IS '保养级别（1日常保养 2月度保养 3年度保养）;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."MAINT_GROUP" IS '保养组别;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."MAINT_SUPERVISOR" IS '保养负责人;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."PROCESS_HANDLE_RESOLUTION" IS '处理意见;第一步不显示，从第二步开始只显示此字段';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."PROCESS_HANDLE_STATUS" IS '状态(0已结束 1执行中 2待接取 3已转发）';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."PROCESS_STEP_ORDER" IS '工单流程步骤顺序';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."START_TIME" IS '执行开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."END_TIME" IS '执行结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."HANDLE_USER_ID" IS '处理人ID（关联sys_user的user_id)';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."HANDLE_BY" IS '处理人';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."HANDLE_TIME" IS '处理时间';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."TRANSFER_USER_ID" IS '转单人用户id或转发协助用户id;1、在转发时，生成新的工单节点实例，执行人id为转发的用户，而转单人是刚才转发给此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束2、在添加协助时，生成新的工单节点实例，执行人id为添加协助的用户，而转单人是刚才添加协助此用户的用户id，是否协助工单为1，并且转发后当前工单的状态仍为执行中';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."ATTR1" IS '用户预留1';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY"."TENANT_ID" IS '租户编号';
COMMENT ON TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" IS '保养工单实例节点;弃用';

-- ----------------------------
-- Table structure for DMS_PLAN_INSPECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_INSPECT";
CREATE TABLE "HAIWEI"."DMS_PLAN_INSPECT" (
  "PLAN_INSPECT_ID" NUMBER(20,0) NOT NULL,
  "PLAN_INSPECT_CODE" NVARCHAR2(64),
  "PLAN_INSPECT_NAME" NVARCHAR2(128),
  "INSPECT_TYPE" NCHAR(1),
  "INSPECT_ROUTE_ID" NUMBER(11,0),
  "DEVICE_AMOUNT" NUMBER(11,0),
  "PLAN_TIME" DATE,
  "TIME_LIMIT" NUMBER(20,0),
  "JOB_ID" NUMBER(20,0),
  "CYCLE_PERIOD" NCHAR(1),
  "PERFORMER" NVARCHAR2(64),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."PLAN_INSPECT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."PLAN_INSPECT_CODE" IS '计划编号';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."PLAN_INSPECT_NAME" IS '计划名称';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."INSPECT_TYPE" IS '检查类型(1巡检,2点检)';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."INSPECT_ROUTE_ID" IS '巡检线路ID，关联dm_base_inspect_route的inspect_route_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."DEVICE_AMOUNT" IS '设备总数';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."PLAN_TIME" IS '本次巡检时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."TIME_LIMIT" IS '时限(单位:s)';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."JOB_ID" IS '关联sys_job主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."CYCLE_PERIOD" IS '循环周期';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."PERFORMER" IS '执行人员';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_INSPECT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_INSPECT" IS '点巡检计划信息';

-- ----------------------------
-- Table structure for DMS_PLAN_LUBE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_LUBE";
CREATE TABLE "HAIWEI"."DMS_PLAN_LUBE" (
  "PLAN_LUBE_ID" NUMBER(11,0) NOT NULL,
  "PLAN_LUBE_CODE" NVARCHAR2(64),
  "LUBE_LEVEL" NCHAR(1),
  "LUBE_GROUP" NVARCHAR2(64),
  "LUBE_SUPERVISOR" NVARCHAR2(64),
  "LUBE_TIME" DATE,
  "TIME_LIMIT" NUMBER(20,0),
  "JOB_ID" NUMBER(20,0),
  "CYCLE_PERIOD" NCHAR(1),
  "CREATE_METHOD" NCHAR(1),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."PLAN_LUBE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."PLAN_LUBE_CODE" IS '计划编号';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."LUBE_LEVEL" IS '润滑级别：1-日常润滑；2-月度润滑；3-年度润滑';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."LUBE_GROUP" IS '润滑组别';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."LUBE_SUPERVISOR" IS '润滑负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."LUBE_TIME" IS '本次润滑时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."TIME_LIMIT" IS '时限（单位：s）';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."JOB_ID" IS '关联sys_job主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."CYCLE_PERIOD" IS '循环周期';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."CREATE_METHOD" IS '创建方式：1-人工创建；2-自动创建';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_LUBE" IS '润滑计划';

-- ----------------------------
-- Table structure for DMS_PLAN_LUBE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" (
  "PLAN_LUBE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "PLAN_LUBE_ID" NUMBER(11,0) NOT NULL,
  "DEVICE_ID" NUMBER(20,0) NOT NULL,
  "LUBE_STATION_ID" NUMBER(11,0),
  "LUBE_STANDARD_ID" NUMBER(11,0),
  "OPERATION_DESCRIPTION" NVARCHAR2(255),
  "IS_FLAG" NUMBER(11,0) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."PLAN_LUBE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."PLAN_LUBE_ID" IS '计划ID，关联润滑计划ID';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."DEVICE_ID" IS '设备ID，关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."LUBE_STATION_ID" IS '润滑部位,关联润滑部位主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."LUBE_STANDARD_ID" IS '润滑标准ID，关联润滑标准主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."IS_FLAG" IS '是否标识：1-是；2-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_LUBE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" IS '润滑计划明细';

-- ----------------------------
-- Table structure for DMS_PLAN_MAINT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_MAINT";
CREATE TABLE "HAIWEI"."DMS_PLAN_MAINT" (
  "PLAN_MAINT_ID" NUMBER(20,0) NOT NULL,
  "PLAN_MAINT_CODE" NVARCHAR2(64) NOT NULL,
  "MAINT_LEVEL" NUMBER(11,0),
  "MAINT_GROUP" NVARCHAR2(64),
  "MAINT_SUPERVISOR" NVARCHAR2(64),
  "MAINT_TIME" DATE,
  "JOB_ID" NUMBER(20,0),
  "TIME_LIMIT" NUMBER(20,0),
  "CYCLE_PERIOD" NUMBER(11,0),
  "MAINT_STATUS" NUMBER(11,0),
  "CREATE_METHOD" NUMBER(11,0),
  "IS_FLAG" NUMBER(11,0) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."PLAN_MAINT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."PLAN_MAINT_CODE" IS '计划编号';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."MAINT_LEVEL" IS '保养级别：1-日常保养；2-月度保养；3-年度保养';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."MAINT_GROUP" IS '保养组别';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."MAINT_SUPERVISOR" IS '保养负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."MAINT_TIME" IS '本次保养时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."JOB_ID" IS '关联sys_job主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."TIME_LIMIT" IS '时限（单位：s）;对于超期的报警';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."CYCLE_PERIOD" IS '循环周期';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."MAINT_STATUS" IS '保养状态：1-待保养；2-保养中；3-已完成';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."CREATE_METHOD" IS '创建方式：1-人工创建；2-自动创建';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."IS_FLAG" IS '是否标识：1-是；2-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_MAINT" IS '保养计划信息';

-- ----------------------------
-- Table structure for DMS_PLAN_MAINT_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL";
CREATE TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" (
  "PLAN_MAINT_DETAIL_ID" NUMBER(11,0) NOT NULL,
  "PLAN_MAINT_ID" NUMBER(20,0) NOT NULL,
  "DEVICE_ID" NUMBER(20,0) NOT NULL,
  "MAINT_STATION_ID" NUMBER(11,0),
  "MAINT_STANDARD_ID" NUMBER(11,0),
  "OPERATION_DESCRIPTION" NVARCHAR2(255),
  "IS_FLAG" NUMBER(11,0) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."PLAN_MAINT_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."PLAN_MAINT_ID" IS '计划ID，关联dms_plan_maint的plan_maint_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."DEVICE_ID" IS '设备ID，关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."MAINT_STATION_ID" IS '保养部位,关联dms_base_maint_station的maint_station_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."MAINT_STANDARD_ID" IS '保养标准ID，关联保养标准主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."IS_FLAG" IS '是否标识：1-是；2-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_MAINT_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" IS '保养计划明细';

-- ----------------------------
-- Table structure for DMS_PLAN_REPAIR
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_REPAIR";
CREATE TABLE "HAIWEI"."DMS_PLAN_REPAIR" (
  "PLAN_REPAIR_ID" NUMBER(20,0) NOT NULL,
  "PLAN_REPAIR_CODE" NVARCHAR2(64) NOT NULL,
  "REPAIR_TYPE" NCHAR(1),
  "REPAIR_GROUP" NVARCHAR2(64),
  "REPAIR_SUPERVISOR" NVARCHAR2(64),
  "REPAIR_TIME" DATE,
  "TIME_LIMIT" NUMBER(20,0),
  "JOB_ID" NUMBER(20,0),
  "CYCLE_PERIOD" NUMBER(11,0),
  "CREATE_METHOD" NCHAR(1),
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."PLAN_REPAIR_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."PLAN_REPAIR_CODE" IS '计划编号';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."REPAIR_TYPE" IS '检修类型(1、简单检修，2、整体检修)';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."REPAIR_GROUP" IS '检修组别';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."REPAIR_SUPERVISOR" IS '检修负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."REPAIR_TIME" IS '本次检修时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."TIME_LIMIT" IS '时限(单位：s);对超期的进行报警';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."JOB_ID" IS '关联sys_job主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."CYCLE_PERIOD" IS '循环周期';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."CREATE_METHOD" IS '创建方式：1-人工创建；2-自动创建';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."IS_FLAG" IS '是否标识：1-是；2-否';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_REPAIR" IS '检修计划信息;人工创建计划，对超期未检修的报警';

-- ----------------------------
-- Table structure for DMS_PLAN_REPAIR_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL";
CREATE TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" (
  "PLAN_REPAIR_DETAIL_ID" NUMBER(11,0) NOT NULL,
  "PLAN_REPAIR_ID" NUMBER(20,0) NOT NULL,
  "REPAIR_DETAIL_TARGET_TYPE" NCHAR(1),
  "REPAIR_DETAIL_TARGET_ID" NUMBER(20,0) NOT NULL,
  "FAULT_TYPE" NCHAR(1),
  "REPAIR_DESC" NVARCHAR2(255),
  "REPAIR_PROTOCOL" NVARCHAR2(128),
  "OPERATION_DESCRIPTION" NVARCHAR2(255),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."PLAN_REPAIR_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."PLAN_REPAIR_ID" IS '计划ID，关联dms_plan_repair的plan_maint_id';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."REPAIR_DETAIL_TARGET_TYPE" IS '检修计划明细类型(1设备，2设备类型)';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."REPAIR_DETAIL_TARGET_ID" IS '检修计划明细ID,根据检修计划明细类型关联对应表的主键';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."FAULT_TYPE" IS '故障类别（1、设备损坏）';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."REPAIR_DESC" IS '检修说明';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."REPAIR_PROTOCOL" IS '检修标准';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_PLAN_REPAIR_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" IS '检修计划明细';

-- ----------------------------
-- Table structure for DMS_RECORD_ALARM_INFO
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO";
CREATE TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" (
  "ALARM_ID" NUMBER(20,0) NOT NULL,
  "DEVICE_ID" NUMBER(20,0) NOT NULL,
  "ALARM_RULE_ID" NUMBER(20,0) NOT NULL,
  "ALARM_BEGIN_TIME" DATE,
  "ALARM_END_TIME" DATE,
  "CONTINUE_TIME" NUMBER(20,0),
  "ALARM_REASON" NVARCHAR2(500),
  "ALARM_DATA" NVARCHAR2(255),
  "ALARM_STATUS" NCHAR(1) NOT NULL,
  "HANDLE_SUGGEST" NVARCHAR2(500),
  "NOTICE_STATUS" NCHAR(1) NOT NULL,
  "HANDLE_USER" NVARCHAR2(32),
  "HANDLE_TIME" DATE,
  "CAUSE_ANALYSIS" NVARCHAR2(500),
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(32),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(32),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."DEVICE_ID" IS '设备台账id,关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_RULE_ID" IS '设备报警规则id,关联dms_base_alarm_rule的alarm_rule_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_BEGIN_TIME" IS '报警开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_END_TIME" IS '报警结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."CONTINUE_TIME" IS '报警持续时间（ms）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_REASON" IS '报警原因';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_DATA" IS '报警数据';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."ALARM_STATUS" IS '报警状态（0未处理 1人工已处理 2自动恢复）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."HANDLE_SUGGEST" IS '处理建议';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."NOTICE_STATUS" IS '通知状态（0未通知 1已通知）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."HANDLE_USER" IS '处理人员';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."HANDLE_TIME" IS '处理时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."CAUSE_ANALYSIS" IS '原因分析';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_INFO"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" IS '设备报警记录';

-- ----------------------------
-- Table structure for DMS_RECORD_ALARM_TIME
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME";
CREATE TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" (
  "ALARM_ID" NUMBER(20,0) NOT NULL,
  "DEVICE_ID" NUMBER(20,0) NOT NULL,
  "ALARM_RULE_ID" NUMBER(20,0) NOT NULL,
  "ALARM_BEGIN_TIME" DATE NOT NULL,
  "CONTINUE_TIME" NUMBER(20,0),
  "ALARM_REASON" NVARCHAR2(500),
  "ALARM_DATA" NVARCHAR2(255),
  "HANDLE_SUGGEST" NVARCHAR2(500),
  "REMARK" NVARCHAR2(500),
  "CREATE_BY" NVARCHAR2(32),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(32),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."ALARM_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."DEVICE_ID" IS '设备台账id,关联dms_base_device_ledger的device_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."ALARM_RULE_ID" IS '设备报警规则id,关联dms_base_alarm_rule的alarm_rule_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."ALARM_BEGIN_TIME" IS '报警开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."CONTINUE_TIME" IS '报警持续时间（ms）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."ALARM_REASON" IS '报警原因';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."ALARM_DATA" IS '报警数据';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."HANDLE_SUGGEST" IS '处理建议';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_ALARM_TIME"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" IS '设备报警实时信息';

-- ----------------------------
-- Table structure for DMS_RECORD_FAULT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_FAULT";
CREATE TABLE "HAIWEI"."DMS_RECORD_FAULT" (
  "RECORD_FAULT_ID" NUMBER(20,0) NOT NULL,
  "FAULT_SOURCE_TYPE" CHAR(1 BYTE),
  "FAULT_SOURCE_ID" NUMBER(20,0),
  "BILLS_FAULT_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "FAULT_TYPE" CHAR(1 BYTE),
  "FAULT_DESCRIPTION" VARCHAR2(255 BYTE),
  "PROCESS_HANDLE_RESOLUTION" VARCHAR2(255 BYTE),
  "DESIGN_OPERATIONS" VARCHAR2(255 BYTE),
  "REPAIR_TYPE" CHAR(1 BYTE),
  "OUTSOURCING_ID" NUMBER(20,0),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."RECORD_FAULT_ID" IS '主键标识;维修完成后保存此记录';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."FAULT_SOURCE_TYPE" IS '报修来源类型(1检修 2点检 3巡检 9其他)';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."FAULT_SOURCE_ID" IS '报修来源ID（预览字段不显示）根据报修来源类型关联来源主键';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."BILLS_FAULT_CODE" IS '故障工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."FAULT_TYPE" IS '故障类型(1外部故障 2内部故障)';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."FAULT_DESCRIPTION" IS '故障描述';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."PROCESS_HANDLE_RESOLUTION" IS '处理措施';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."DESIGN_OPERATIONS" IS '涉及操作，关联数据字典，可以选择多个';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."REPAIR_TYPE" IS '维修类型（1内部维修 2外协维修）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."OUTSOURCING_ID" IS '外协单位，关联dms_base_outsourcing_info的outsourcing_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_FAULT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_FAULT" IS '故障报修记录;此表暂时不用，后续可以作为历史记录保存，将工单的信息移到此表中。';

-- ----------------------------
-- Table structure for DMS_RECORD_INSPECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_INSPECT";
CREATE TABLE "HAIWEI"."DMS_RECORD_INSPECT" (
  "RECORD_INSPECT_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "PLAN_INSPECT_ID" NUMBER(20,0),
  "INSPECT_INSTANCE_ID" NUMBER(20,0),
  "BILLS_INSPECT_CODE" VARCHAR2(64 BYTE),
  "INSPECT_TYPE" CHAR(1 BYTE) NOT NULL,
  "INSPECT_ROUTE_ID" NUMBER(20,0),
  "DEVICE_AMOUNT" NUMBER(11,0),
  "PLAN_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "PERFORMER" VARCHAR2(64 BYTE),
  "INSPECT_STATUS" CHAR(1 BYTE),
  "INSPECT_DURATION" NUMBER,
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."RECORD_INSPECT_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."PLAN_INSPECT_ID" IS '计划ID，关联dms_plan_inspect的plan_inspect_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."INSPECT_INSTANCE_ID" IS '巡检工单ID';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."BILLS_INSPECT_CODE" IS '巡检单号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."INSPECT_TYPE" IS '检查类型(1巡检 2点检)';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."INSPECT_ROUTE_ID" IS '巡检线路，关联dms_base_inspect_route的inspect_route_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."DEVICE_AMOUNT" IS '设备总数';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."PLAN_BEGIN_TIME" IS '计划开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."PLAN_END_TIME" IS '计划完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."REAL_BEGIN_TIME" IS '实际开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."REAL_END_TIME" IS '实际结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."PERFORMER" IS '执行人员';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."INSPECT_STATUS" IS '巡检状态（1待巡检 2巡检中 3完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."INSPECT_DURATION" IS '巡检用时';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_INSPECT"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_INSPECT" IS '点巡检历史记录;历史记录表，暂时不用，后续可作为历史记录定时转移保存工单信息';

-- ----------------------------
-- Table structure for DMS_RECORD_LUBE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_LUBE";
CREATE TABLE "HAIWEI"."DMS_RECORD_LUBE" (
  "RECORD_LUBE_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "PLAN_LUBE_ID" NUMBER(11,0),
  "BILLS_LUBE_CODE" VARCHAR2(64 BYTE),
  "LUBE_GROUP" VARCHAR2(64 BYTE),
  "LUBE_SUPERVISOR" VARCHAR2(64 BYTE),
  "LUBE_LEVEL" CHAR(1 BYTE),
  "PLAN_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "LUBE_STATUS" CHAR(1 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."RECORD_LUBE_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."PLAN_LUBE_ID" IS '计划ID，关联dms_plan_lube的plan_lube_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."BILLS_LUBE_CODE" IS '润滑工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."LUBE_GROUP" IS '润滑组别';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."LUBE_SUPERVISOR" IS '润滑负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."LUBE_LEVEL" IS '润滑级别（1日常润滑 2月度润滑 3年度润滑）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."PLAN_BEGIN_TIME" IS '计划润滑开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."PLAN_END_TIME" IS '计划润滑完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."REAL_BEGIN_TIME" IS '实际润滑开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."REAL_END_TIME" IS '实际润滑完成时间;超期报警';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."LUBE_STATUS" IS '润滑状态（1待润滑 2润滑中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_LUBE" IS '润滑记录';

-- ----------------------------
-- Table structure for DMS_RECORD_LUBE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" (
  "RECORD_LUBE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "RECORD_LUBE_ID" NUMBER(20,0) NOT NULL,
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "LUBE_STATION_ID" NUMBER(20,0),
  "LUBE_STANDARD_ID" NUMBER(20,0),
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "MAINT_STATUS" NUMBER(20,0),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."RECORD_LUBE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."RECORD_LUBE_ID" IS '润滑工单ID，关联润滑工单主键';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."LUBE_STATION_ID" IS '润滑部位ID，关联润滑部位主键';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."LUBE_STANDARD_ID" IS '润滑标准ID，关联润滑标准主键';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."MAINT_STATUS" IS '保养状态（1待保养 2保养中 3已完成）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_LUBE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" IS '润滑记录明细';

-- ----------------------------
-- Table structure for DMS_RECORD_REPAIR
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_REPAIR";
CREATE TABLE "HAIWEI"."DMS_RECORD_REPAIR" (
  "RECORD_REPAIR_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "PLAN_REPAIR_ID" NUMBER(20,0),
  "BILLS_REPAIR_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "REPAIR_TYPE" CHAR(1 BYTE),
  "REPAIR_GROUP" VARCHAR2(64 BYTE),
  "REPAIR_SUPERVISOR" VARCHAR2(64 BYTE),
  "PLAN_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "REAL_END_TIME" DATE,
  "REPAIR_COMP_RATE" NUMBER,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."RECORD_REPAIR_ID" IS '主键标识;此表不会长期保存';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."PLAN_REPAIR_ID" IS '检修计划ID，关联dms_plan_repair的plan_repair_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."BILLS_REPAIR_CODE" IS '工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REPAIR_TYPE" IS '检修类型(1简单检修 2整体检修)';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REPAIR_GROUP" IS '检修组别';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REPAIR_SUPERVISOR" IS '检修负责人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."PLAN_BEGIN_TIME" IS '计划开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."PLAN_END_TIME" IS '计划完成时间;根据计划的时限计算';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REAL_BEGIN_TIME" IS '实际开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REAL_END_TIME" IS '实际完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REPAIR_COMP_RATE" IS '检修完成率';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_REPAIR" IS '检修记录;此表暂时不用，后续可以作为历史记录保存，将工单的信息移到此表中。';

-- ----------------------------
-- Table structure for DMS_RECORD_REPAIR_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL";
CREATE TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" (
  "REPAIR_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "REPAIR_ID" NUMBER(20,0) NOT NULL,
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "FAULT_TYPE" CHAR(1 BYTE),
  "REPAIR_DESC" VARCHAR2(255 BYTE),
  "REPAIR_PROTOCOL" VARCHAR2(128 BYTE),
  "OPERATION_DESCRIPTION" VARCHAR2(255 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."REPAIR_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."REPAIR_ID" IS '检修记录ID，关联检修历史记录主键';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."FAULT_TYPE" IS '故障类别（1设备损坏）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."REPAIR_DESC" IS '检修说明';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."REPAIR_PROTOCOL" IS '检修标准';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_REPAIR_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" IS '检修记录明细;此表暂时不用，后续可以作为历史记录保存，将工单的信息移到此表中。';

-- ----------------------------
-- Table structure for DMS_RECORD_SHUT_DOWN
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN";
CREATE TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" (
  "RECORD_SHUT_DOWN_ID" NUMBER(20,0) NOT NULL,
  "TENANT_ID" VARCHAR2(64 BYTE),
  "MACHINE_ID" NUMBER(20,0) NOT NULL,
  "SHUT_TYPE_ID" NUMBER(20,0),
  "SHUT_REASON_ID" NUMBER(20,0),
  "SHUT_BEGIN_TIME" DATE,
  "SHUT_END_TIME" DATE,
  "SHUT_TIME" NUMBER,
  "DOWNTIME_FLAG" CHAR(1 BYTE) NOT NULL,
  "SHUT_REASON" VARCHAR2(64 BYTE),
  "ACTIVE_FLAG" CHAR(1 BYTE) NOT NULL,
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_DEPT" NUMBER(20,0),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."RECORD_SHUT_DOWN_ID" IS '主键标识;scada上报的记录';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."TENANT_ID" IS '租户编号';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."MACHINE_ID" IS '设备ID，关联prod_base_machine_info的machine_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_TYPE_ID" IS '停机类型ID，关联dm_base_shut_type的shut_type_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_REASON_ID" IS '停机原因ID，关联dms_base_shut_reason的shut_reason_id';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_BEGIN_TIME" IS '停机开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_END_TIME" IS '停机结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_TIME" IS '停机时长(秒)';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."DOWNTIME_FLAG" IS '停机标识（0未结束 1已结束）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."SHUT_REASON" IS '停机原因';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."ACTIVE_FLAG" IS '激活标识（1是 0否）';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_RECORD_SHUT_DOWN"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" IS '停机记录';

-- ----------------------------
-- Table structure for DMS_REPAIR_INSTANCE
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_INSTANCE";
CREATE TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" (
  "REPAIR_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "PLAN_REPAIR_ID" NUMBER(20,0),
  "WF_PROCESS_ID" NUMBER(20,0) NOT NULL,
  "BILLS_REPAIR_CODE" NVARCHAR2(64) NOT NULL,
  "BILLS_STATUS" NCHAR(1) NOT NULL,
  "PLAN_BEGIN_TIME" DATE,
  "REAL_BEGIN_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "REAL_END_TIME" DATE,
  "REPAIR_COMP_RATE" NUMBER,
  "INSTANCE_TYPE" NCHAR(1) NOT NULL,
  "IS_FLAG" NCHAR(1) NOT NULL,
  "REMARK" NVARCHAR2(500),
  "APPLY_BY" NVARCHAR2(64),
  "APPLY_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."REPAIR_INSTANCE_ID" IS '主键标识;此表不会长期保存';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."PLAN_REPAIR_ID" IS '检修计划ID，关联dms_plan_repair的plan_repair_id';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."WF_PROCESS_ID" IS '工单流程ID，关联wf_process的wf_process_id;固定101';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."BILLS_REPAIR_CODE" IS '工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."BILLS_STATUS" IS '工单状态：0-待检修，1-检修中，2-检修完成';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."PLAN_BEGIN_TIME" IS '计划开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."REAL_BEGIN_TIME" IS '实际开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."PLAN_END_TIME" IS '计划完成时间;根据计划的时限计算';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."REAL_END_TIME" IS '实际完成时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."REPAIR_COMP_RATE" IS '检修完成率';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."INSTANCE_TYPE" IS '工单类型（1手工创建,2自动创建）';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."IS_FLAG" IS '是否标识：1-是；0-否';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."APPLY_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."APPLY_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."UPDATE_BY" IS '申请人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE"."UPDATE_TIME" IS '申请时间';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" IS '检修工单;一是根据检修计划自动创建的检修工单，二是手工创建检修工单';

-- ----------------------------
-- Table structure for DMS_REPAIR_INSTANCE_ACTIVITY
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY";
CREATE TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" (
  "INSTANCE_ACTIVITY_ID" NUMBER(20,0) NOT NULL,
  "REPAIR_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "PROCESS_ACTIVITY_ID" NUMBER(20,0),
  "REPAIR_TYPE" NCHAR(1),
  "REPAIR_GROUP" NVARCHAR2(64),
  "REPAIR_SUPERVISOR" NVARCHAR2(64),
  "PROCESS_HANDLE_RESOLUTION" NVARCHAR2(255),
  "REMARK" NVARCHAR2(500),
  "PROCESS_HANDLE_STATUS" NCHAR(1) NOT NULL,
  "PROCESS_STEP_ORDER" NUMBER(11,0) NOT NULL,
  "START_TIME" DATE,
  "END_TIME" DATE,
  "HANDLE_USER_ID" NUMBER(20,0),
  "HANDLE_BY" NVARCHAR2(64),
  "HANDLE_TIME" DATE,
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "TRANSFER_USER_ID" NUMBER(20,0),
  "ATTR1" NVARCHAR2(255)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."INSTANCE_ACTIVITY_ID" IS '维修工单实例节点ID';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."REPAIR_INSTANCE_ID" IS '维修工单实例ID，关联dms_bills_repair_instance的repair_instance_id';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."PROCESS_ACTIVITY_ID" IS '工单流程节点ID（关联wf_process_activity的process_activity_id）';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."REPAIR_TYPE" IS '检修类型(1、简单检修，2、整体检修);最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."REPAIR_GROUP" IS '检修组别;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."REPAIR_SUPERVISOR" IS '检修负责人;最后一步自动复制第1步的，可在第2步修改，修改保存后为第2步的记录，第1步为要求的，第2步为实际的';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."PROCESS_HANDLE_RESOLUTION" IS '处理意见;第1步不显示，从第2步骤开始显示此字段';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."REMARK" IS '备注';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."PROCESS_HANDLE_STATUS" IS '状态(0已结束，1执行中，2、待接取，3、已转发）';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."PROCESS_STEP_ORDER" IS '工单流程步骤顺序';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."START_TIME" IS '执行开始时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."END_TIME" IS '执行结束时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."HANDLE_USER_ID" IS '处理人ID（关联sys_user的user_id)';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."HANDLE_BY" IS '处理人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."HANDLE_TIME" IS '处理时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."TRANSFER_USER_ID" IS '转单人用户id或转发协助用户id;1、在转发时，生成新的工单节点实例，执行人id为转发的用户，而转单人是刚才转发给此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束2、在添加协助时，生成新的工单节点实例，执行人id为添加协助的用户，而转单人是刚才添加协助此用户的用户id，是否协助工单为1，并且转发后当前工单的状态仍为执行中';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY"."ATTR1" IS '用户预留1';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" IS '检修工单实例节点;最后一步作为检修记录';

-- ----------------------------
-- Table structure for DMS_REPAIR_INSTANCE_DETAIL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL";
CREATE TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" (
  "REPAIR_INSTANCE_DETAIL_ID" NUMBER(20,0) NOT NULL,
  "REPAIR_INSTANCE_ID" NUMBER(20,0) NOT NULL,
  "REPAIR_DETAIL_TARGET_TYPE" NCHAR(1),
  "REPAIR_DETAIL_TARGET_ID" NUMBER(20,0) NOT NULL,
  "FAULT_TYPE" NCHAR(1),
  "INSTANCE_DETAIL_STATUS" NCHAR(1),
  "REPAIR_DESC" NVARCHAR2(255),
  "REPAIR_PROTOCOL" NVARCHAR2(128),
  "OPERATION_DESCRIPTION" NVARCHAR2(255),
  "CREATE_BY" NVARCHAR2(64),
  "CREATE_TIME" DATE,
  "UPDATE_BY" NVARCHAR2(64),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_INSTANCE_DETAIL_ID" IS '主键标识';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_INSTANCE_ID" IS '检修工单ID，关联dms_repair_instance的repair_instance_id';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_DETAIL_TARGET_TYPE" IS '检修计划明细类型(1设备，2设备类型)';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_DETAIL_TARGET_ID" IS '检修计划明细ID,根据检修计划明细类型关联对应表的主键';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."FAULT_TYPE" IS '故障类别（1、设备损坏）';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."INSTANCE_DETAIL_STATUS" IS '检修状态：1-待检修；2-检修中；3-已完成';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_DESC" IS '检修说明';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."REPAIR_PROTOCOL" IS '检修标准';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."OPERATION_DESCRIPTION" IS '操作描述';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."CREATE_BY" IS '创建人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."UPDATE_BY" IS '更新人';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL"."UPDATE_TIME" IS '更新时间';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" IS '检修工单明细';

-- ----------------------------
-- Table structure for DMS_REPAIR_MATERIAL
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_MATERIAL";
CREATE TABLE "HAIWEI"."DMS_REPAIR_MATERIAL" (
  "MATERIAL_ID" NUMBER(20,0) NOT NULL,
  "WORK_ORDER_ID" NUMBER(20,0) NOT NULL,
  "MATERIAL_CODE" VARCHAR2(64 BYTE),
  "MATERIAL_NAME" VARCHAR2(255 BYTE),
  "MATERIAL_SPEC" VARCHAR2(255 BYTE),
  "MATERIAL_TYPE" CHAR(1 BYTE),
  "UNIT" VARCHAR2(20 BYTE),
  "PLAN_QUANTITY" NUMBER(12,2) DEFAULT 0,
  "ACTUAL_QUANTITY" NUMBER(12,2) DEFAULT 0,
  "UNIT_PRICE" NUMBER(12,2) DEFAULT 0,
  "TOTAL_AMOUNT" NUMBER(12,2) DEFAULT 0,
  "RECEIVE_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "RECEIVER" VARCHAR2(64 BYTE),
  "RECEIVE_TIME" VARCHAR2(30 BYTE),
  "WAREHOUSE_ID" NUMBER(20,0),
  "WAREHOUSE_NAME" VARCHAR2(255 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_MATERIAL"."MATERIAL_TYPE" IS '材料类型：1-备件 2-耗材 3-工具';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_MATERIAL"."RECEIVE_STATUS" IS '领用状态：0-待领用 1-已领用 2-已归还';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_MATERIAL" IS '维修材料明细表';

-- ----------------------------
-- Table structure for DMS_REPAIR_PROJECT
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_PROJECT";
CREATE TABLE "HAIWEI"."DMS_REPAIR_PROJECT" (
  "PROJECT_ID" NUMBER(20,0) NOT NULL,
  "WORK_ORDER_ID" NUMBER(20,0) NOT NULL,
  "PROJECT_SEQ" NUMBER(10,0),
  "PROJECT_NAME" VARCHAR2(255 BYTE),
  "PROJECT_TYPE" CHAR(1 BYTE),
  "PROJECT_CONTENT" VARCHAR2(1000 BYTE),
  "TECHNICAL_REQUIREMENT" VARCHAR2(500 BYTE),
  "PLAN_HOURS" NUMBER(10,2) DEFAULT 0,
  "ACTUAL_HOURS" NUMBER(10,2) DEFAULT 0,
  "EXECUTION_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "EXECUTOR" VARCHAR2(64 BYTE),
  "QUALITY_LEVEL" CHAR(1 BYTE),
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_PROJECT"."PROJECT_TYPE" IS '工程类型：1-拆卸 2-检查 3-更换 4-调整 5-清洁 6-润滑 7-其他';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_PROJECT"."EXECUTION_STATUS" IS '执行状态：0-待执行 1-执行中 2-已完成';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_PROJECT"."QUALITY_LEVEL" IS '完成质量：1-优秀 2-良好 3-合格 4-不合格';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_PROJECT" IS '维修工程明细表';

-- ----------------------------
-- Table structure for DMS_REPAIR_RECORD
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_RECORD";
CREATE TABLE "HAIWEI"."DMS_REPAIR_RECORD" (
  "RECORD_ID" NUMBER(20,0) NOT NULL,
  "WORK_ORDER_ID" NUMBER(20,0),
  "WORK_ORDER_CODE" VARCHAR2(64 BYTE),
  "DEVICE_ID" NUMBER(20,0),
  "DEVICE_CODE" VARCHAR2(64 BYTE),
  "DEVICE_NAME" VARCHAR2(255 BYTE),
  "FAULT_PHENOMENON" VARCHAR2(1000 BYTE),
  "FAULT_CAUSE" VARCHAR2(1000 BYTE),
  "REPAIR_METHOD" VARCHAR2(1000 BYTE),
  "REPAIR_PROCESS" CLOB,
  "REPLACED_PARTS" VARCHAR2(500 BYTE),
  "REPAIR_RESULT" CHAR(1 BYTE),
  "REPAIRER_ID" NUMBER(20,0),
  "REPAIRER_NAME" VARCHAR2(64 BYTE),
  "START_TIME" DATE,
  "END_TIME" DATE,
  "REPAIR_HOURS" NUMBER(10,2) DEFAULT 0,
  "REPAIR_COST" NUMBER(12,2) DEFAULT 0,
  "SHUTDOWN_DURATION" NUMBER(10,0),
  "ACCEPTOR" VARCHAR2(64 BYTE),
  "ACCEPT_TIME" DATE,
  "ACCEPT_RESULT" CHAR(1 BYTE),
  "ACCEPT_OPINION" VARCHAR2(500 BYTE),
  "FOLLOWUP_SUGGESTION" VARCHAR2(1000 BYTE),
  "IS_ARCHIVED" CHAR(1 BYTE) DEFAULT '0',
  "IS_FLAG" CHAR(1 BYTE) DEFAULT '1',
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_RECORD"."REPAIR_RESULT" IS '维修结果：1-成功 2-失败 3-部分完成';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_RECORD"."ACCEPT_RESULT" IS '验收结果：1-合格 2-不合格';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_RECORD"."IS_ARCHIVED" IS '是否存档：0-否 1-是';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_RECORD" IS '维修记录表';

-- ----------------------------
-- Table structure for DMS_REPAIR_WORK_ORDER
-- ----------------------------
DROP TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER";
CREATE TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER" (
  "WORK_ORDER_ID" NUMBER(20,0) NOT NULL,
  "WORK_ORDER_CODE" VARCHAR2(64 BYTE) NOT NULL,
  "FAULT_INSTANCE_ID" NUMBER(20,0),
  "DEVICE_ID" NUMBER(20,0),
  "DEVICE_CODE" VARCHAR2(64 BYTE),
  "DEVICE_NAME" VARCHAR2(255 BYTE),
  "FAULT_TYPE" CHAR(1 BYTE),
  "FAULT_DESCRIPTION" VARCHAR2(500 BYTE),
  "REPAIR_TYPE" CHAR(1 BYTE),
  "ORDER_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "PRIORITY" CHAR(1 BYTE) DEFAULT '3',
  "PLAN_START_TIME" DATE,
  "PLAN_END_TIME" DATE,
  "ACTUAL_START_TIME" DATE,
  "ACTUAL_END_TIME" DATE,
  "EXECUTOR_ID" NUMBER(20,0),
  "EXECUTOR_NAME" VARCHAR2(64 BYTE),
  "REPAIR_HOURS" NUMBER(10,2) DEFAULT 0,
  "BUDGET_COST" NUMBER(12,2) DEFAULT 0,
  "ACTUAL_COST" NUMBER(12,2) DEFAULT 0,
  "REPAIR_RESULT" CHAR(1 BYTE),
  "REPAIR_NOTES" VARCHAR2(1000 BYTE),
  "APPROVE_STATUS" CHAR(1 BYTE) DEFAULT '0',
  "APPROVER" VARCHAR2(64 BYTE),
  "APPROVE_TIME" DATE,
  "APPROVE_REMARK" VARCHAR2(500 BYTE),
  "NEED_SHUTDOWN" CHAR(1 BYTE) DEFAULT '0',
  "SHUTDOWN_DURATION" NUMBER(10,0),
  "IS_FLAG" CHAR(1 BYTE) DEFAULT '1',
  "REMARK" VARCHAR2(500 BYTE),
  "CREATE_BY" NUMBER(20,0),
  "CREATE_TIME" DATE DEFAULT SYSDATE,
  "UPDATE_BY" NUMBER(20,0),
  "UPDATE_TIME" DATE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."WORK_ORDER_ID" IS '维修工单ID';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."WORK_ORDER_CODE" IS '工单编号';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."FAULT_INSTANCE_ID" IS '关联故障报修ID';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."DEVICE_ID" IS '设备ID';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."REPAIR_TYPE" IS '维修类型：1-预防性 2-故障 3-改进性';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."ORDER_STATUS" IS '工单状态：0-待派工 1-已派工 2-维修中 3-已完成 4-已关闭';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."PRIORITY" IS '优先级：1-紧急 2-高 3-中 4-低';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."REPAIR_RESULT" IS '维修结果：1-成功 2-失败 3-部分完成';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."APPROVE_STATUS" IS '审批状态：0-待审批 1-审批中 2-已通过 3-已驳回';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."NEED_SHUTDOWN" IS '是否需要停机：0-否 1-是';
COMMENT ON COLUMN "HAIWEI"."DMS_REPAIR_WORK_ORDER"."IS_FLAG" IS '是否标识：1-是 0-否';
COMMENT ON TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER" IS '维修工单主表';

-- ----------------------------
-- Primary Key structure for table BASE_DEVICELEDGER
-- ----------------------------
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C005454" PRIMARY KEY ("OBJ_ID");

-- ----------------------------
-- Checks structure for table BASE_DEVICELEDGER
-- ----------------------------
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C0011489" CHECK ("OBJ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C0019119" CHECK ("OBJ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C0019120" CHECK ("DEVICE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C0023407" CHECK ("OBJ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C0023408" CHECK ("DEVICE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C005453" CHECK ("OBJ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C008302" CHECK ("OBJ_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."BASE_DEVICELEDGER" ADD CONSTRAINT "SYS_C009950" CHECK ("DEVICE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_ATTACH_INFO
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_ATTACH_INFO" ADD CONSTRAINT "SYS_C0026876" PRIMARY KEY ("ATTACH_ID");

-- ----------------------------
-- Primary Key structure for table DMS_BASE_INSPECT_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "PK__DMS_BASE__AB6389A238B0F15E" PRIMARY KEY ("INSPECT_PROJECT_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_INSPECT_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025847" CHECK (inspect_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025848" CHECK (inspect_project IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025849" CHECK (inspect_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025850" CHECK (inspect_project_property IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025970" CHECK ("INSPECT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025971" CHECK ("INSPECT_PROJECT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025972" CHECK ("INSPECT_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_PROJECT" ADD CONSTRAINT "SYS_C0025973" CHECK ("INSPECT_PROJECT_PROPERTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_INSPECT_ROUTE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "PK__DMS_BASE__0B31B67AAAF976D9" PRIMARY KEY ("INSPECT_ROUTE_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_INSPECT_ROUTE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025851" CHECK (inspect_route_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025852" CHECK (route_name IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025853" CHECK (inspect_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025974" CHECK ("INSPECT_ROUTE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025975" CHECK ("ROUTE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_ROUTE" ADD CONSTRAINT "SYS_C0025976" CHECK ("INSPECT_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_INSPECT_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "PK__DMS_BASE__03664F9EBADF065F" PRIMARY KEY ("INSPECT_STANDARD_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_INSPECT_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025855" CHECK (inspect_standard_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025856" CHECK (standard_name IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025857" CHECK (inspect_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025858" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025978" CHECK ("INSPECT_STANDARD_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025979" CHECK ("STANDARD_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025980" CHECK ("INSPECT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_INSPECT_STANDARD" ADD CONSTRAINT "SYS_C0025981" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_LUBE_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "PK__DMS_BASE__C67A3FAB62901DD4" PRIMARY KEY ("LUBE_STANDARD_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_LUBE_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025842" CHECK (lube_standard_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025843" CHECK (lube_standard_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025844" CHECK (device_type_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025845" CHECK (lube_protocol IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025846" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025982" CHECK ("LUBE_STANDARD_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025983" CHECK ("LUBE_STANDARD_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025984" CHECK ("DEVICE_TYPE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025985" CHECK ("LUBE_PROTOCOL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STANDARD" ADD CONSTRAINT "SYS_C0025986" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_LUBE_STATION
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "PK__DMS_BASE__3287C1DD687FDAE0" PRIMARY KEY ("LUBE_STATION_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_LUBE_STATION
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025862" CHECK (lube_station_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025863" CHECK (device_type_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025864" CHECK (lube_station_name IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025865" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025987" CHECK ("LUBE_STATION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025988" CHECK ("DEVICE_TYPE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025989" CHECK ("LUBE_STATION_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_LUBE_STATION" ADD CONSTRAINT "SYS_C0025990" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_MAINT_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "PK__DMS_BASE__0CFD68B92453E747" PRIMARY KEY ("MAINT_PROJECT_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_MAINT_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025859" CHECK (maint_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025860" CHECK (maint_project_name IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025861" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025991" CHECK ("MAINT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025992" CHECK ("MAINT_PROJECT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_PROJECT" ADD CONSTRAINT "SYS_C0025993" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_MAINT_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "PK__DMS_BASE__EC944F41CE133302" PRIMARY KEY ("MAINT_STANDARD_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_MAINT_STANDARD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025866" CHECK (maint_standard_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025867" CHECK (maint_protocol IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025868" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025994" CHECK ("MAINT_STANDARD_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025995" CHECK ("MAINT_PROTOCOL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STANDARD" ADD CONSTRAINT "SYS_C0025996" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_MAINT_STATION
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" ADD CONSTRAINT "PK__DMS_BASE__16D7DBD255E2EF9A" PRIMARY KEY ("MAINT_STATION_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_MAINT_STATION
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" ADD CONSTRAINT "SYS_C0025869" CHECK (maint_station_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" ADD CONSTRAINT "SYS_C0025870" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" ADD CONSTRAINT "SYS_C0025997" CHECK ("MAINT_STATION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_MAINT_STATION" ADD CONSTRAINT "SYS_C0025998" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_SHUT_REASON
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" ADD CONSTRAINT "SYS_C0026375" PRIMARY KEY ("SHUT_REASON_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_SHUT_REASON
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" ADD CONSTRAINT "SYS_C0026354" CHECK (shut_reason_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" ADD CONSTRAINT "SYS_C0026355" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" ADD CONSTRAINT "SYS_C0026381" CHECK ("SHUT_REASON_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_REASON" ADD CONSTRAINT "SYS_C0026382" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_SHUT_TYPE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026376" PRIMARY KEY ("SHUT_TYPE_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_SHUT_TYPE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026351" CHECK (shut_type_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026352" CHECK (shut_type_name IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026353" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026383" CHECK ("SHUT_TYPE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026384" CHECK ("SHUT_TYPE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_SHUT_TYPE" ADD CONSTRAINT "SYS_C0026385" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BASE_STATION_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" ADD CONSTRAINT "PK__DMS_BASE__96180D595911BD03" PRIMARY KEY ("MAINT_STATION_ID", "MAINT_PROJECT_ID");

-- ----------------------------
-- Checks structure for table DMS_BASE_STATION_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" ADD CONSTRAINT "SYS_C0025871" CHECK (maint_station_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" ADD CONSTRAINT "SYS_C0025872" CHECK (maint_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" ADD CONSTRAINT "SYS_C0025999" CHECK ("MAINT_STATION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BASE_STATION_PROJECT" ADD CONSTRAINT "SYS_C0026000" CHECK ("MAINT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_FAULT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "PK__DMS_BILL__26D0F0EC8D2AD20B" PRIMARY KEY ("REPAIR_INSTANCE_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_FAULT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0025873" CHECK (repair_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0025874" CHECK (bills_fault_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0025875" CHECK (instance_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0025877" CHECK (bills_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0025878" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0026001" CHECK ("REPAIR_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0026002" CHECK ("BILLS_FAULT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0026003" CHECK ("INSTANCE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0026005" CHECK ("BILLS_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_FAULT_INSTANCE" ADD CONSTRAINT "SYS_C0026006" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_INSPECT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" ADD CONSTRAINT "PK_DMS_BILLS_INSPECT_INSTANCE" PRIMARY KEY ("INSPECT_INSTANCE_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_INSPECT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" ADD CONSTRAINT "SYS_C0025879" CHECK (inspect_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" ADD CONSTRAINT "SYS_C0025880" CHECK (inspect_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" ADD CONSTRAINT "SYS_C0026007" CHECK ("INSPECT_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_INSPECT_INSTANCE" ADD CONSTRAINT "SYS_C0026008" CHECK ("INSPECT_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "PK__DMS_BILL__203648ADC0659B4E" PRIMARY KEY ("BILLS_LUBE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025881" CHECK (bills_lube_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025882" CHECK (lube_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025883" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025884" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026009" CHECK ("BILLS_LUBE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026010" CHECK ("LUBE_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026011" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026012" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_LUBE_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" ADD CONSTRAINT "PK__DMS_BILL__4DCEE4EB74C0E5EF" PRIMARY KEY ("LUBE_INSTANCE_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_LUBE_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" ADD CONSTRAINT "SYS_C0025885" CHECK (lube_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" ADD CONSTRAINT "SYS_C0025886" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" ADD CONSTRAINT "SYS_C0026013" CHECK ("LUBE_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_LUBE_INSTANCE" ADD CONSTRAINT "SYS_C0026014" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_MAINT_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "PK__DMS_BILL__194A43A82365C190" PRIMARY KEY ("BILLS_MAINT_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_MAINT_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025887" CHECK (bills_maint_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025888" CHECK (maint_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025889" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026015" CHECK ("BILLS_MAINT_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026016" CHECK ("MAINT_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026017" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_MAINT_DETAIL_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "PK__DMS_BILL__67ECCB3B533C0D8F" PRIMARY KEY ("MAINT_DETAIL_PROJECT_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_MAINT_DETAIL_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0025890" CHECK (maint_detail_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0025891" CHECK (bills_maint_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0025892" CHECK (maint_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0025893" CHECK (maint_project_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0026018" CHECK ("MAINT_DETAIL_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0026019" CHECK ("BILLS_MAINT_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0026020" CHECK ("MAINT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_DETAIL_PROJECT" ADD CONSTRAINT "SYS_C0026021" CHECK ("MAINT_PROJECT_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_BILLS_MAINT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" ADD CONSTRAINT "PK__DMS_BILL__78C7287AA8AD8F72" PRIMARY KEY ("MAINT_INSTANCE_ID");

-- ----------------------------
-- Checks structure for table DMS_BILLS_MAINT_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" ADD CONSTRAINT "SYS_C0025894" CHECK (maint_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" ADD CONSTRAINT "SYS_C0025895" CHECK (bills_maint_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" ADD CONSTRAINT "SYS_C0026022" CHECK ("MAINT_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_BILLS_MAINT_INSTANCE" ADD CONSTRAINT "SYS_C0026023" CHECK ("BILLS_MAINT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_DISPATCH_MEMBER
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_DISPATCH_MEMBER" ADD CONSTRAINT "PK_DISPATCH_MEMBER" PRIMARY KEY ("MEMBER_ID");

-- ----------------------------
-- Checks structure for table DMS_DISPATCH_MEMBER
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_DISPATCH_MEMBER" ADD CONSTRAINT "SYS_C0027103" CHECK ("MEMBER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_DISPATCH_MEMBER" ADD CONSTRAINT "SYS_C0027104" CHECK ("PLAN_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_DISPATCH_MEMBER
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_DISPATCH_MEMBER_PLAN"
  ON "HAIWEI"."DMS_DISPATCH_MEMBER" ("PLAN_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_DISPATCH_PLAN
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_DISPATCH_PLAN" ADD CONSTRAINT "PK_DISPATCH_PLAN" PRIMARY KEY ("PLAN_ID");

-- ----------------------------
-- Checks structure for table DMS_DISPATCH_PLAN
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_DISPATCH_PLAN" ADD CONSTRAINT "SYS_C0027100" CHECK ("PLAN_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_DISPATCH_PLAN" ADD CONSTRAINT "SYS_C0027101" CHECK ("PLAN_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_DISPATCH_PLAN
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_DISPATCH_EXECUTOR"
  ON "HAIWEI"."DMS_DISPATCH_PLAN" ("EXECUTOR_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_DISPATCH_PLAN_CODE"
  ON "HAIWEI"."DMS_DISPATCH_PLAN" ("PLAN_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_DISPATCH_TEAM"
  ON "HAIWEI"."DMS_DISPATCH_PLAN" ("TEAM_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_DISPATCH_WORK_ORDER"
  ON "HAIWEI"."DMS_DISPATCH_PLAN" ("WORK_ORDER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_FAULT_COMPENTS_PARTS
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS" ADD CONSTRAINT "SYS_C0026749" PRIMARY KEY ("COMPENTS_PARTS_ID");

-- ----------------------------
-- Checks structure for table DMS_FAULT_COMPENTS_PARTS
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS" ADD CONSTRAINT "SYS_C0026747" CHECK ( compents_parts_id  IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_COMPENTS_PARTS" ADD CONSTRAINT "SYS_C0026750" CHECK ("COMPENTS_PARTS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_FAULT_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026748" PRIMARY KEY ("INSTANCE_ACTIVITY_ID");

-- ----------------------------
-- Checks structure for table DMS_FAULT_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026743" CHECK ( instance_activity_id  IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026744" CHECK ( repair_instance_id  IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026745" CHECK ( process_handle_status  IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026746" CHECK ( process_step_order  IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026751" CHECK ("INSTANCE_ACTIVITY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026752" CHECK ("REPAIR_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026753" CHECK ("PROCESS_HANDLE_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_FAULT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026754" CHECK ("PROCESS_STEP_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_INSPECT_INSTANCE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "PK__DMS_INSP__1925BFCAD045EE6B" PRIMARY KEY ("INSTANCE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_INSPECT_INSTANCE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0025896" CHECK (instance_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0025897" CHECK (inspect_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0025898" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026024" CHECK ("INSTANCE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026025" CHECK ("INSPECT_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026026" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_INSPECT_PROJECT_DEVICE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "PK__DMS_INSP__243C5FEF8A045E9C" PRIMARY KEY ("INSPECT_PROJECT_ID", "TARGET_TYPE", "TARGET_ID");

-- ----------------------------
-- Checks structure for table DMS_INSPECT_PROJECT_DEVICE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0025899" CHECK (inspect_project_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0025900" CHECK (target_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0025901" CHECK (target_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0026027" CHECK ("INSPECT_PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0026028" CHECK ("TARGET_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_PROJECT_DEVICE" ADD CONSTRAINT "SYS_C0026029" CHECK ("TARGET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_INSPECT_ROUTE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "PK__DMS_INSP__996F200E4F77FFC2" PRIMARY KEY ("ROUTE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_INSPECT_ROUTE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0025902" CHECK (route_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0025903" CHECK (inspect_route_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0025904" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0026030" CHECK ("ROUTE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0026031" CHECK ("INSPECT_ROUTE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSPECT_ROUTE_DETAIL" ADD CONSTRAINT "SYS_C0026032" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_INSTANCE_FILE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "PK__DMS_INST__3CB991471965A507" PRIMARY KEY ("INSTANCE_FILE_ID");

-- ----------------------------
-- Checks structure for table DMS_INSTANCE_FILE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0025905" CHECK (instance_file_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0025906" CHECK (target_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0025907" CHECK (target_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0025908" CHECK (file_path IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0026033" CHECK ("INSTANCE_FILE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0026034" CHECK ("TARGET_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0026035" CHECK ("TARGET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_INSTANCE_FILE" ADD CONSTRAINT "SYS_C0026036" CHECK ("FILE_PATH" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_KNOWLEDGE_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" ADD CONSTRAINT "SYS_C0026726" PRIMARY KEY ("KNOWLEDGE_LUBE_ID");

-- ----------------------------
-- Checks structure for table DMS_KNOWLEDGE_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" ADD CONSTRAINT "SYS_C0026722" CHECK (knowledge_lube_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" ADD CONSTRAINT "SYS_C0026724" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" ADD CONSTRAINT "SYS_C0026728" CHECK ("KNOWLEDGE_LUBE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_LUBE" ADD CONSTRAINT "SYS_C0026729" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_KNOWLEDGE_MAINT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" ADD CONSTRAINT "SYS_C0026727" PRIMARY KEY ("KNOWLEDGE_MAINT_ID");

-- ----------------------------
-- Checks structure for table DMS_KNOWLEDGE_MAINT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" ADD CONSTRAINT "SYS_C0026719" CHECK (knowledge_maint_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" ADD CONSTRAINT "SYS_C0026721" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" ADD CONSTRAINT "SYS_C0026730" CHECK ("KNOWLEDGE_MAINT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_MAINT" ADD CONSTRAINT "SYS_C0026731" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_KNOWLEDGE_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" ADD CONSTRAINT "SYS_C0026725" PRIMARY KEY ("KNOWLEDGE_REPAIR_ID");

-- ----------------------------
-- Checks structure for table DMS_KNOWLEDGE_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" ADD CONSTRAINT "SYS_C0026716" CHECK (knowledge_repair_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" ADD CONSTRAINT "SYS_C0026718" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" ADD CONSTRAINT "SYS_C0026732" CHECK ("KNOWLEDGE_REPAIR_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_KNOWLEDGE_REPAIR" ADD CONSTRAINT "SYS_C0026733" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_MAINT_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "PK__DMS_MAIN__1220106FB998D35B" PRIMARY KEY ("INSTANCE_ACTIVITY_ID");

-- ----------------------------
-- Checks structure for table DMS_MAINT_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0025909" CHECK (instance_activity_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0025910" CHECK (maint_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0025911" CHECK (process_step_order IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026037" CHECK ("INSTANCE_ACTIVITY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026038" CHECK ("MAINT_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_MAINT_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026039" CHECK ("PROCESS_STEP_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_INSPECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_INSPECT" ADD CONSTRAINT "SYS_C0025170" PRIMARY KEY ("PLAN_INSPECT_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_INSPECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_INSPECT" ADD CONSTRAINT "SYS_C0025151" CHECK (plan_inspect_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_INSPECT" ADD CONSTRAINT "SYS_C0025152" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_INSPECT" ADD CONSTRAINT "SYS_C0026040" CHECK ("PLAN_INSPECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_INSPECT" ADD CONSTRAINT "SYS_C0026041" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE" ADD CONSTRAINT "SYS_C0025167" PRIMARY KEY ("PLAN_LUBE_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE" ADD CONSTRAINT "SYS_C0025146" CHECK (plan_lube_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE" ADD CONSTRAINT "SYS_C0025147" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE" ADD CONSTRAINT "SYS_C0026042" CHECK ("PLAN_LUBE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE" ADD CONSTRAINT "SYS_C0026043" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_PLAN_LUBE
-- ----------------------------
CREATE UNIQUE INDEX "HAIWEI"."UI_PLAN_LUBE_CODE"
  ON "HAIWEI"."DMS_PLAN_LUBE" ("PLAN_LUBE_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025169" PRIMARY KEY ("PLAN_LUBE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025153" CHECK (plan_lube_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025154" CHECK (plan_lube_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025155" CHECK (device_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025156" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026044" CHECK ("PLAN_LUBE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026045" CHECK ("PLAN_LUBE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026046" CHECK ("DEVICE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026047" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_MAINT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0025168" PRIMARY KEY ("PLAN_MAINT_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_MAINT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0025148" CHECK (plan_maint_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0025149" CHECK (plan_maint_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0025150" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0026048" CHECK ("PLAN_MAINT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0026049" CHECK ("PLAN_MAINT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT" ADD CONSTRAINT "SYS_C0026050" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_PLAN_MAINT
-- ----------------------------
CREATE UNIQUE INDEX "HAIWEI"."UI_PLAN_MAINT_CODE"
  ON "HAIWEI"."DMS_PLAN_MAINT" ("PLAN_MAINT_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_MAINT_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025171" PRIMARY KEY ("PLAN_MAINT_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_MAINT_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025157" CHECK (plan_maint_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025158" CHECK (plan_maint_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025159" CHECK (device_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0025160" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026051" CHECK ("PLAN_MAINT_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026052" CHECK ("PLAN_MAINT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026053" CHECK ("DEVICE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_MAINT_DETAIL" ADD CONSTRAINT "SYS_C0026054" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0025173" PRIMARY KEY ("PLAN_REPAIR_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0025164" CHECK (plan_repair_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0025165" CHECK (plan_repair_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0025166" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0026055" CHECK ("PLAN_REPAIR_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0026056" CHECK ("PLAN_REPAIR_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR" ADD CONSTRAINT "SYS_C0026057" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_PLAN_REPAIR_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025172" PRIMARY KEY ("PLAN_REPAIR_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_PLAN_REPAIR_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025161" CHECK (plan_repair_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025162" CHECK (plan_repair_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025163" CHECK (repair_detail_target_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026058" CHECK ("PLAN_REPAIR_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026059" CHECK ("PLAN_REPAIR_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_PLAN_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026060" CHECK ("REPAIR_DETAIL_TARGET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_ALARM_INFO
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026377" PRIMARY KEY ("ALARM_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_ALARM_INFO
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026356" CHECK (alarm_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026357" CHECK (device_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026358" CHECK (alarm_rule_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026359" CHECK (alarm_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026360" CHECK (notice_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026386" CHECK ("ALARM_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026387" CHECK ("DEVICE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026388" CHECK ("ALARM_RULE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026389" CHECK ("ALARM_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_INFO" ADD CONSTRAINT "SYS_C0026390" CHECK ("NOTICE_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_ALARM_TIME
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026374" PRIMARY KEY ("ALARM_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_ALARM_TIME
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026347" CHECK (alarm_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026348" CHECK (device_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026349" CHECK (alarm_rule_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026350" CHECK (alarm_begin_time IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026391" CHECK ("ALARM_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026392" CHECK ("DEVICE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026393" CHECK ("ALARM_RULE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_ALARM_TIME" ADD CONSTRAINT "SYS_C0026394" CHECK ("ALARM_BEGIN_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_FAULT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "PK__DMS_RECO__C37E7E3FE7303944" PRIMARY KEY ("RECORD_FAULT_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_FAULT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0025912" CHECK (record_fault_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0025913" CHECK (bills_fault_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0025914" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0025915" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0026061" CHECK ("RECORD_FAULT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0026062" CHECK ("BILLS_FAULT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0026063" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_FAULT" ADD CONSTRAINT "SYS_C0026064" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_INSPECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "PK__DMS_RECO__E236B6C92D616948" PRIMARY KEY ("RECORD_INSPECT_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_INSPECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0025916" CHECK (record_inspect_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0025917" CHECK (inspect_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0025918" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0026065" CHECK ("RECORD_INSPECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0026066" CHECK ("INSPECT_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_INSPECT" ADD CONSTRAINT "SYS_C0026067" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE" ADD CONSTRAINT "PK__DMS_RECO__8F6E59F7B599494C" PRIMARY KEY ("RECORD_LUBE_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_LUBE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE" ADD CONSTRAINT "SYS_C0025919" CHECK (record_lube_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE" ADD CONSTRAINT "SYS_C0025920" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE" ADD CONSTRAINT "SYS_C0026068" CHECK ("RECORD_LUBE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE" ADD CONSTRAINT "SYS_C0026069" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "PK__DMS_RECO__139232F988C01262" PRIMARY KEY ("RECORD_LUBE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_LUBE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025921" CHECK (record_lube_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025922" CHECK (record_lube_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0025923" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026070" CHECK ("RECORD_LUBE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026071" CHECK ("RECORD_LUBE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_LUBE_DETAIL" ADD CONSTRAINT "SYS_C0026072" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR" ADD CONSTRAINT "PK__DMS_RECO__694F399624A32065" PRIMARY KEY ("RECORD_REPAIR_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_REPAIR
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR" ADD CONSTRAINT "SYS_C0025924" CHECK (record_repair_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR" ADD CONSTRAINT "SYS_C0025925" CHECK (bills_repair_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR" ADD CONSTRAINT "SYS_C0026073" CHECK ("RECORD_REPAIR_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR" ADD CONSTRAINT "SYS_C0026074" CHECK ("BILLS_REPAIR_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_REPAIR_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "PK__DMS_RECO__D951C787E8DE57C7" PRIMARY KEY ("REPAIR_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_REPAIR_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025926" CHECK (repair_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025927" CHECK (repair_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0025928" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026075" CHECK ("REPAIR_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026076" CHECK ("REPAIR_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_REPAIR_DETAIL" ADD CONSTRAINT "SYS_C0026077" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_RECORD_SHUT_DOWN
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "PK__DMS_RECO__D60E441D645D46B4" PRIMARY KEY ("RECORD_SHUT_DOWN_ID");

-- ----------------------------
-- Checks structure for table DMS_RECORD_SHUT_DOWN
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0025929" CHECK (record_shut_down_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0025930" CHECK (machine_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0025931" CHECK (downtime_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0025932" CHECK (active_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0026078" CHECK ("RECORD_SHUT_DOWN_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0026079" CHECK ("MACHINE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0026080" CHECK ("DOWNTIME_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_RECORD_SHUT_DOWN" ADD CONSTRAINT "SYS_C0026081" CHECK ("ACTIVE_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026378" PRIMARY KEY ("REPAIR_INSTANCE_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_INSTANCE
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026361" CHECK (repair_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026362" CHECK (wf_process_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026363" CHECK (bills_repair_code IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026364" CHECK (bills_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026365" CHECK (instance_type IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026366" CHECK (is_flag IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026395" CHECK ("REPAIR_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026396" CHECK ("WF_PROCESS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026397" CHECK ("BILLS_REPAIR_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026398" CHECK ("BILLS_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026399" CHECK ("INSTANCE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE" ADD CONSTRAINT "SYS_C0026400" CHECK ("IS_FLAG" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026379" PRIMARY KEY ("INSTANCE_ACTIVITY_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_INSTANCE_ACTIVITY
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026370" CHECK (instance_activity_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026371" CHECK (repair_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026372" CHECK (process_handle_status IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026373" CHECK (process_step_order IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026401" CHECK ("INSTANCE_ACTIVITY_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026402" CHECK ("REPAIR_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026403" CHECK ("PROCESS_HANDLE_STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_ACTIVITY" ADD CONSTRAINT "SYS_C0026404" CHECK ("PROCESS_STEP_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_INSTANCE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026380" PRIMARY KEY ("REPAIR_INSTANCE_DETAIL_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_INSTANCE_DETAIL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026367" CHECK (repair_instance_detail_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026368" CHECK (repair_instance_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026369" CHECK (repair_detail_target_id IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026405" CHECK ("REPAIR_INSTANCE_DETAIL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026406" CHECK ("REPAIR_INSTANCE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_INSTANCE_DETAIL" ADD CONSTRAINT "SYS_C0026407" CHECK ("REPAIR_DETAIL_TARGET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_MATERIAL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_MATERIAL" ADD CONSTRAINT "PK_REPAIR_MATERIAL" PRIMARY KEY ("MATERIAL_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_MATERIAL
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_MATERIAL" ADD CONSTRAINT "SYS_C0027097" CHECK ("MATERIAL_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_MATERIAL" ADD CONSTRAINT "SYS_C0027098" CHECK ("WORK_ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_REPAIR_MATERIAL
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_REPAIR_MATERIAL_CODE"
  ON "HAIWEI"."DMS_REPAIR_MATERIAL" ("MATERIAL_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_REPAIR_MATERIAL_ORDER"
  ON "HAIWEI"."DMS_REPAIR_MATERIAL" ("WORK_ORDER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_PROJECT" ADD CONSTRAINT "PK_REPAIR_PROJECT" PRIMARY KEY ("PROJECT_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_PROJECT
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_PROJECT" ADD CONSTRAINT "SYS_C0027094" CHECK ("PROJECT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_PROJECT" ADD CONSTRAINT "SYS_C0027095" CHECK ("WORK_ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_REPAIR_PROJECT
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_REPAIR_PROJECT_ORDER"
  ON "HAIWEI"."DMS_REPAIR_PROJECT" ("WORK_ORDER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_RECORD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_RECORD" ADD CONSTRAINT "PK_REPAIR_RECORD" PRIMARY KEY ("RECORD_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_RECORD
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_RECORD" ADD CONSTRAINT "SYS_C0027106" CHECK ("RECORD_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_REPAIR_RECORD
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_REPAIR_RECORD_DEVICE"
  ON "HAIWEI"."DMS_REPAIR_RECORD" ("DEVICE_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_REPAIR_RECORD_ORDER"
  ON "HAIWEI"."DMS_REPAIR_RECORD" ("WORK_ORDER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_REPAIR_RECORD_TIME"
  ON "HAIWEI"."DMS_REPAIR_RECORD" ("START_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);

-- ----------------------------
-- Primary Key structure for table DMS_REPAIR_WORK_ORDER
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER" ADD CONSTRAINT "PK_REPAIR_WORK_ORDER" PRIMARY KEY ("WORK_ORDER_ID");

-- ----------------------------
-- Checks structure for table DMS_REPAIR_WORK_ORDER
-- ----------------------------
ALTER TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER" ADD CONSTRAINT "SYS_C0027091" CHECK ("WORK_ORDER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "HAIWEI"."DMS_REPAIR_WORK_ORDER" ADD CONSTRAINT "SYS_C0027092" CHECK ("WORK_ORDER_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table DMS_REPAIR_WORK_ORDER
-- ----------------------------
CREATE INDEX "HAIWEI"."IDX_WORK_ORDER_CODE"
  ON "HAIWEI"."DMS_REPAIR_WORK_ORDER" ("WORK_ORDER_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_WORK_ORDER_DEVICE"
  ON "HAIWEI"."DMS_REPAIR_WORK_ORDER" ("DEVICE_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_WORK_ORDER_EXECUTOR"
  ON "HAIWEI"."DMS_REPAIR_WORK_ORDER" ("EXECUTOR_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
CREATE INDEX "HAIWEI"."IDX_WORK_ORDER_STATUS"
  ON "HAIWEI"."DMS_REPAIR_WORK_ORDER" ("ORDER_STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
);
