-- ----------------------------
-- Table structure for BLADE_CHECK_RECORD
-- ----------------------------
-- DROP TABLE "BLADE_CHECK_RECORD";
CREATE TABLE "BLADE_CHECK_RECORD"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "CHECK_CODE" NVARCHAR2(128),
    "DEVICE_ID" NUMBER (20),
    "DEVICE_TYPE_ID" NUMBER (20),
    "CHECK_USER_ID" NUMBER (20),
    "CHECK_TIME"  DATE,
    "CHECK_RESULT" NUMBER (4) DEFAULT 1,
    "CHECK_PROJECT_ID" NUMBER (20),
    "REMARK" NVARCHAR2(255),
    "DEVICE_CODE" NVARCHAR2(255),
    "DEVICE_NAME" NVARCHAR2(255),
    "DEVICE_TYPE_NAME" NVARCHAR2(255),
    "CHECK_USER_NAME" NVARCHAR2(255),
    "CHECK_PROJECT_CODE" NVARCHAR2(255),
    "CHECK_PROJECT_NAME" NVARCHAR2(255),
    "MACHINE_MODEL" NVARCHAR2(64)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_CODE" IS '点检记录编码';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."DEVICE_ID" IS '机器id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."DEVICE_TYPE_ID" IS '机器类型id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_USER_ID" IS '检验人员id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_TIME" IS '点检时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_RESULT" IS '点检结果：0-不正常，1-正常';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_PROJECT_ID" IS '点检项目id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."REMARK" IS '备注';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."DEVICE_CODE" IS '机器编码';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."DEVICE_NAME" IS '机器名称';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."DEVICE_TYPE_NAME" IS '机器类型名称';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_USER_NAME" IS '检验人员名称';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_PROJECT_CODE" IS '点检项目编码';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."CHECK_PROJECT_NAME" IS '点检项目名称';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD"."MACHINE_MODEL" IS '机器规格';
COMMENT
ON TABLE "BLADE_CHECK_RECORD" IS '点检记录';

-- ----------------------------
-- Primary Key structure for table BLADE_CHECK_RECORD
-- ----------------------------
ALTER TABLE "BLADE_CHECK_RECORD"
    ADD CONSTRAINT "1655780182PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Indexes structure for table BLADE_CHECK_RECORD
-- ----------------------------
CREATE UNIQUE INDEX "1654843159UniqueCheck_code"
    ON "BLADE_CHECK_RECORD" ("IS_DELETED" ASC, "CHECK_CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );


-- ----------------------------
-- Table structure for BLADE_CHECK_RECORD_FILE
-- ----------------------------
-- DROP TABLE "BLADE_CHECK_RECORD_FILE";
CREATE TABLE "BLADE_CHECK_RECORD_FILE"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "CHECK_RECORD_ID" NUMBER (20),
    "FILE_NAME" NVARCHAR2(255),
    "OBJECT_KEY" NVARCHAR2(255),
    "LINK" NVARCHAR2(255),
    "CONTENT_TYPE" NVARCHAR2(255),
    "FILE_SIZE" NVARCHAR2(100),
    "UPLOAD_TIME" DATE,
    "FILE_TYPE" NUMBER (4)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."CHECK_RECORD_ID" IS '点检记录id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."FILE_NAME" IS '文件名称';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."OBJECT_KEY" IS '文件key';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."LINK" IS '文件link';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."CONTENT_TYPE" IS '文件类型';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."FILE_SIZE" IS '文件大小';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."UPLOAD_TIME" IS '上传时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_FILE"."FILE_TYPE" IS '文件类型(1:图片 2 附件)';
COMMENT
ON TABLE "BLADE_CHECK_RECORD_FILE" IS '点检记录点检项';


-- ----------------------------
-- Primary Key structure for table BLADE_CHECK_RECORD_FILE
-- ----------------------------
ALTER TABLE "BLADE_CHECK_RECORD_FILE"
    ADD CONSTRAINT "1655780183PrimaryId" PRIMARY KEY ("ID");


-- ----------------------------
-- Table structure for BLADE_CHECK_RECORD_ITEM
-- ----------------------------
-- DROP TABLE "BLADE_CHECK_RECORD_ITEM";
CREATE TABLE "BLADE_CHECK_RECORD_ITEM"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "CHECK_RECORD_ID" NUMBER (20),
    "ITEM_ID" NUMBER (20),
    "CHECK_VALUE" NVARCHAR2(255),
    "NAME" NVARCHAR2(64),
    "VALUE_TYPE" NVARCHAR2(64),
    "REQUIREMENT" NVARCHAR2(255),
    "STANDARD_VALUE" NVARCHAR2(64)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."CHECK_RECORD_ID" IS '点检记录id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."ITEM_ID" IS '点检项id';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."CHECK_VALUE" IS '检验数值';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."NAME" IS '点检项';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."VALUE_TYPE" IS '数值类型';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."REQUIREMENT" IS '点检要求';
COMMENT
ON COLUMN "BLADE_CHECK_RECORD_ITEM"."STANDARD_VALUE" IS '标准数值';
COMMENT
ON TABLE "BLADE_CHECK_RECORD_ITEM" IS '点检记录点检项';

-- ----------------------------
-- Primary Key structure for table BLADE_CHECK_RECORD_ITEM
-- ----------------------------
ALTER TABLE "BLADE_CHECK_RECORD_ITEM"
    ADD CONSTRAINT "1655780184PrimaryId" PRIMARY KEY ("ID");



-- ----------------------------
-- Table structure for BLADE_MAINTAIN_PLAN
-- ----------------------------
-- DROP TABLE "BLADE_MAINTAIN_PLAN";
CREATE TABLE "BLADE_MAINTAIN_PLAN"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME"       DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME"       DATE,
    "TENANT_ID" NVARCHAR2(12),
    "CODE" NVARCHAR2(128),
    "DEVICE_ID" NUMBER (20),
    "DEVICE_CODE" NVARCHAR2(128),
    "DEVICE_NAME" NVARCHAR2(64),
    "DEVICE_TYPE_ID" NUMBER (20),
    "DEVICE_TYPE_NAME" NVARCHAR2(64),
    "PROJECT_ID" NVARCHAR2(32),
    "PROJECT_CODE" NVARCHAR2(128),
    "PROJECT_NAME" NVARCHAR2(64),
    "MAINTAIN_DATE"     DATE,
    "PRE_WARNING_DAYS" NUMBER (11),
    "PLAN_STATUS" NUMBER (11),
    "IS_AUTO" NUMBER (11),
    "INTERVAL_TIME" NUMBER (11),
    "PRE_MAINTAIN_TIME" DATE,
    "MACHINE_MODEL" NVARCHAR2(128),
    "REMARK" NVARCHAR2(255),
    "MAINTAIN_NATURE" NVARCHAR2(255),
    "MAINTAIN_USER_ID" NUMBER (20),
    "MAINTAIN_USER_NAME" NVARCHAR2(255)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."CODE" IS '计划任务编码';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."DEVICE_ID" IS '机器Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."DEVICE_CODE" IS '机器编码';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."DEVICE_NAME" IS '机器名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."DEVICE_TYPE_ID" IS '机器类型Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."DEVICE_TYPE_NAME" IS '机器类型名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PROJECT_ID" IS '保养项目id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PROJECT_CODE" IS '保养项目编号';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PROJECT_NAME" IS '保养项目名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."MAINTAIN_DATE" IS '下次保养日期';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PRE_WARNING_DAYS" IS '保养预警提示（天）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PLAN_STATUS" IS '计划状态（1：正常；2：待执行；3：执行中；4：待确认；5：已确认）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."IS_AUTO" IS '是否自动生成计划（0：否；1：是）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."INTERVAL_TIME" IS '周期（天）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."PRE_MAINTAIN_TIME" IS '上一次保养时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."MACHINE_MODEL" IS '机器规格';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."REMARK" IS '备注';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."MAINTAIN_NATURE" IS '保养性质（1:厂内,2:委外）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."MAINTAIN_USER_ID" IS '保养负责人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN"."MAINTAIN_USER_NAME" IS '保养负责人';
COMMENT
ON TABLE "BLADE_MAINTAIN_PLAN" IS '保养计划';

------
-- Primary Key structure for table BLADE_MAINTAIN_PLAN
-- ----------------------------
ALTER TABLE "BLADE_MAINTAIN_PLAN"
    ADD CONSTRAINT "1655780223PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Indexes structure for table BLADE_MAINTAIN_PLAN
-- ----------------------------
CREATE UNIQUE INDEX "1654843166UniqueCode"
    ON "BLADE_MAINTAIN_PLAN" ("IS_DELETED" ASC, "CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );

-- ----------------------------
-- Table structure for BLADE_MAINTAIN_PLAN_ITEM
-- ----------------------------
-- DROP TABLE "BLADE_MAINTAIN_PLAN_ITEM";
CREATE TABLE "BLADE_MAINTAIN_PLAN_ITEM"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "PLAN_ID" NUMBER (20),
    "ITEM_ID" NUMBER (20)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."PLAN_ID" IS '保养计划id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_PLAN_ITEM"."ITEM_ID" IS '保养项id';
COMMENT
ON TABLE "BLADE_MAINTAIN_PLAN_ITEM" IS '保养计划保养项';

-- ----------------------
-- ----------------------------
-- Primary Key structure for table BLADE_MAINTAIN_PLAN_ITEM
-- ----------------------------
ALTER TABLE "BLADE_MAINTAIN_PLAN_ITEM"
    ADD CONSTRAINT "1655780224PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Table structure for BLADE_MAINTAIN_RECORD
-- ----------------------------
-- DROP TABLE "BLADE_MAINTAIN_RECORD";
CREATE TABLE "BLADE_MAINTAIN_RECORD"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "RECORD_CODE" NVARCHAR2(128),
    "PLAN_ID" NUMBER (20),
    "START_TIME"  DATE,
    "END_TIME"    DATE,
    "IS_DELAY" NUMBER (11) DEFAULT 0,
    "DELAY_DAYS" NUMBER (11),
    "MAINTAIN_USER_ID" NUMBER (20),
    "MAINTAIN_USER_NAME" NVARCHAR2(64),
    "DELAY_REASON" NVARCHAR2(255),
    "RECORD_STATUS" NUMBER (11),
    "PLAN_CODE" NVARCHAR2(128),
    "DEVICE_ID" NUMBER (20),
    "DEVICE_CODE" NVARCHAR2(128),
    "DEVICE_NAME" NVARCHAR2(64),
    "DEVICE_TYPE_ID" NUMBER (20),
    "DEVICE_TYPE_NAME" NVARCHAR2(64),
    "PROJECT_ID" NVARCHAR2(32),
    "PROJECT_CODE" NVARCHAR2(128),
    "PROJECT_NAME" NVARCHAR2(64),
    "REMARK" NVARCHAR2(255),
    "MAINTAIN_NATURE" NVARCHAR2(255)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."RECORD_CODE" IS '保养记录单号';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."PLAN_ID" IS '计划任务Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."START_TIME" IS '开始时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."END_TIME" IS '结束时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."IS_DELAY" IS '是否延期（0：未延期；1：已延期）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DELAY_DAYS" IS '延期天数';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."MAINTAIN_USER_ID" IS '保养负责人Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."MAINTAIN_USER_NAME" IS '保养负责人名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DELAY_REASON" IS '延期原因';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."RECORD_STATUS" IS '保养记录状态（1：待确认；2：已确认）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."PLAN_CODE" IS '计划单号';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DEVICE_ID" IS '机器Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DEVICE_CODE" IS '机器编码';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DEVICE_NAME" IS '机器名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DEVICE_TYPE_ID" IS '机器类型Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."DEVICE_TYPE_NAME" IS '机器类型名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."PROJECT_ID" IS '保养项目id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."PROJECT_CODE" IS '保养项目编号';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."PROJECT_NAME" IS '保养项目名称';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."REMARK" IS '备注';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD"."MAINTAIN_NATURE" IS '保养性质（1:厂内,2:委外）';
COMMENT
ON TABLE "BLADE_MAINTAIN_RECORD" IS '保养记录表';

-- ----------------------------
-- Primary Key structure for table BLADE_MAINTAIN_RECORD
-- ----------------------------
ALTER TABLE "BLADE_MAINTAIN_RECORD"
    ADD CONSTRAINT "1655780227PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Indexes structure for table BLADE_MAINTAIN_RECORD
-- ----------------------------
CREATE UNIQUE INDEX "1654843168UniqueRecord_code"
    ON "BLADE_MAINTAIN_RECORD" ("IS_DELETED" ASC, "RECORD_CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );


-- ----------------------------
-- Table structure for BLADE_MAINTAIN_RECORD_ITEM
-- ----------------------------
-- DROP TABLE "BLADE_MAINTAIN_RECORD_ITEM";
CREATE TABLE "BLADE_MAINTAIN_RECORD_ITEM"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "RECORD_ID" NUMBER (20),
    "ITEM_ID" NUMBER (20),
    "CODE" NVARCHAR2(128),
    "NAME" NVARCHAR2(64),
    "REQUIREMENT" NVARCHAR2(255),
    "REMARK" NVARCHAR2(255),
    "IS_EXECUTE" NUMBER (11),
    "IS_DEFAULT" NUMBER (11)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."RECORD_ID" IS '保养记录单号';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."ITEM_ID" IS '保养项Id';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."CODE" IS '保养编码';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."NAME" IS '保养项';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."REQUIREMENT" IS '保养要求';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."REMARK" IS '备注';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."IS_EXECUTE" IS '保养判定（0：否，1：是）';
COMMENT
ON COLUMN "BLADE_MAINTAIN_RECORD_ITEM"."IS_DEFAULT" IS '是否默认（0：否，1：是）';
COMMENT
ON TABLE "BLADE_MAINTAIN_RECORD_ITEM" IS '保养记录保养项';


-- ----------------------------
-- Primary Key structure for table BLADE_MAINTAIN_RECORD_ITEM
-- ----------------------------
ALTER TABLE "BLADE_MAINTAIN_RECORD_ITEM"
    ADD CONSTRAINT "1655780228PrimaryId" PRIMARY KEY ("ID");


-- ----------------------------
-- Table structure for BLADE_REPAIR_APPLY
-- ----------------------------
-- DROP TABLE "BLADE_REPAIR_APPLY";
CREATE TABLE "BLADE_REPAIR_APPLY"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME"      DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME"      DATE,
    "TENANT_ID" NVARCHAR2(12),
    "APPLY_CODE" NVARCHAR2(128),
    "DEVICE_ID" NUMBER (20),
    "DEVICE_CODE" NVARCHAR2(128),
    "DEVICE_NAME" NVARCHAR2(64),
    "DEVICE_TYPE_ID" NUMBER (20),
    "DEVICE_TYPE_NAME" NVARCHAR2(64),
    "APPLY_USER_ID" NUMBER (20),
    "APPLY_USER_NAME" NVARCHAR2(64),
    "REPAIR_USER_ID" NUMBER (20),
    "REPAIR_USER_NAME" NVARCHAR2(64),
    "IS_AFFECT" NUMBER (11),
    "MALFUNCTION_TIME" DATE,
    "URGENCY" NUMBER (11),
    "DESCRIPTION" NVARCHAR2(255),
    "APPLY_STATUS" NUMBER (11),
    "MALFUNCTION_ID" NUMBER (20),
    "MALFUNCTION_CODE" NVARCHAR2(128),
    "MALFUNCTION_NAME" NVARCHAR2(64),
    "REPAIR_NATURE" NUMBER (11),
    "START_TIME"       DATE,
    "REMARK" NVARCHAR2(255)
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."APPLY_CODE" IS '维修申请编号';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DEVICE_ID" IS '设备id';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DEVICE_CODE" IS '设备编码';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DEVICE_NAME" IS '设备名称';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DEVICE_TYPE_ID" IS '设备类型id';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DEVICE_TYPE_NAME" IS '设备类型名称';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."APPLY_USER_ID" IS '维修申请人id';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."APPLY_USER_NAME" IS '维修申请人姓名';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."REPAIR_USER_ID" IS '维修负责人id';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."REPAIR_USER_NAME" IS '维修负责人姓名';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."IS_AFFECT" IS '影响生产：是-1，否-2';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."MALFUNCTION_TIME" IS '故障发生时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."URGENCY" IS '紧急度：高-3，中-2，低-1';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."DESCRIPTION" IS '故障描述';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."APPLY_STATUS" IS '申请单状态：待执行-1，执行中-2，待确认-3，已确认-4';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."MALFUNCTION_ID" IS '所属故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."MALFUNCTION_CODE" IS '故障类型编码';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."MALFUNCTION_NAME" IS '故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."REPAIR_NATURE" IS '维修性质（1:厂内,2:委外）';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."START_TIME" IS '执行开始时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY"."REMARK" IS '备注';
COMMENT
ON TABLE "BLADE_REPAIR_APPLY" IS '维修申请信息';

-- ----------------------------
-- Primary Key structure for table BLADE_REPAIR_APPLY
-- ----------------------------
ALTER TABLE "BLADE_REPAIR_APPLY"
    ADD CONSTRAINT "1655780259PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Indexes structure for table BLADE_REPAIR_APPLY
-- ----------------------------
CREATE UNIQUE INDEX "1654843187UniqueApply_code"
    ON "BLADE_REPAIR_APPLY" ("IS_DELETED" ASC, "APPLY_CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );

-- ----------------------------
-- Table structure for BLADE_REPAIR_APPLY_FILE
-- ----------------------------
-- DROP TABLE "BLADE_REPAIR_APPLY_FILE";
CREATE TABLE "BLADE_REPAIR_APPLY_FILE"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "REPAIR_APPLY_ID" NUMBER (20),
    "FILE_NAME" NVARCHAR2(100),
    "OBJECT_KEY" NVARCHAR2(100),
    "CONTENT_TYPE" NVARCHAR2(100),
    "LINK" NVARCHAR2(100),
    "FILE_SIZE" NVARCHAR2(100),
    "UPLOAD_TIME" DATE
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."REPAIR_APPLY_ID" IS '维修申请id';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."FILE_NAME" IS '文件名称';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."OBJECT_KEY" IS '文件key';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."CONTENT_TYPE" IS '文件mini类型';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."LINK" IS '文件外链';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."FILE_SIZE" IS '文件大小';
COMMENT
ON COLUMN "BLADE_REPAIR_APPLY_FILE"."UPLOAD_TIME" IS '上传时间';
COMMENT
ON TABLE "BLADE_REPAIR_APPLY_FILE" IS '维修申请单关联的附件信息';

-- ----------------------------
-- Primary Key structure for table BLADE_REPAIR_APPLY_FILE
-- ----------------------------
ALTER TABLE "BLADE_REPAIR_APPLY_FILE"
    ADD CONSTRAINT "1655780260PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Table structure for BLADE_REPAIR_RECORD
-- ----------------------------
-- DROP TABLE "BLADE_REPAIR_RECORD";
CREATE TABLE "BLADE_REPAIR_RECORD"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME"       DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME"       DATE,
    "TENANT_ID" NVARCHAR2(12),
    "REPAIR_APPLY_ID" NUMBER (20),
    "RECORD_CODE" NVARCHAR2(128),
    "RECORD_STATUS" NUMBER (11),
    "RECORD_TYPE" NUMBER (11),
    "ERROR_CODE" NVARCHAR2(32),
    "REPAIR_START_TIME" DATE,
    "REPAIR_END_TIME"   DATE,
    "REPAIR_TIME" NUMBER (11),
    "REPAIR_USER_ID" NUMBER (20),
    "REPAIR_USER_NAME" NVARCHAR2(64),
    "MALFUNCTION_DETAILS" NVARCHAR2(255),
    "MALFUNCTION_TIME"  DATE,
    "IS_AFFECT" NUMBER (11),
    "DEVICE_ID" NUMBER (20),
    "DEVICE_CODE" NVARCHAR2(128),
    "DEVICE_NAME" NVARCHAR2(64),
    "DEVICE_TYPE_ID" NUMBER (20),
    "DEVICE_TYPE_NAME" NVARCHAR2(64),
    "MALFUNCTION_ID" NUMBER (20),
    "MALFUNCTION_CODE" NVARCHAR2(128),
    "MALFUNCTION_NAME" NVARCHAR2(64),
    "URGENCY" NUMBER (11),
    "REPAIR_NATURE" NUMBER (11),
    "REAL_MALFUNCTION_ID" NUMBER (20),
    "REAL_MALFUNCTION_CODE" NVARCHAR2(128),
    "REAL_MALFUNCTION_NAME" NVARCHAR2(64),
    "REMARK" NVARCHAR2(255),
    "APPLY_TIME"        DATE
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_APPLY_ID" IS '维修申请id';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."RECORD_CODE" IS '维修记录编号';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."RECORD_STATUS" IS '维修记录状态：待确认-1 已确认-2';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."RECORD_TYPE" IS '维修记录类型：临时-1 例行-2';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."ERROR_CODE" IS '故障码';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_START_TIME" IS '维修开始时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_END_TIME" IS '维修完成时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_TIME" IS '维修用时（分钟）';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_USER_ID" IS '维修负责人id';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_USER_NAME" IS '维修负责人姓名';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."MALFUNCTION_DETAILS" IS '故障详情';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."MALFUNCTION_TIME" IS '发生时间(例行维修)';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."IS_AFFECT" IS '影响生产：是 1   否 2（例行维修）';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."DEVICE_ID" IS '设备id';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."DEVICE_CODE" IS '设备编码';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."DEVICE_NAME" IS '设备名称';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."DEVICE_TYPE_ID" IS '设备类型id';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."DEVICE_TYPE_NAME" IS '设备类型名称';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."MALFUNCTION_ID" IS '所属故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."MALFUNCTION_CODE" IS '类型编码';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."MALFUNCTION_NAME" IS '故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."URGENCY" IS '紧急度：高-3，中-2，低-1';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REPAIR_NATURE" IS '维修性质（1:厂内,2:委外）';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REAL_MALFUNCTION_ID" IS '实际所属故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REAL_MALFUNCTION_CODE" IS '实际故障类型编码';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REAL_MALFUNCTION_NAME" IS '实际故障类型';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."REMARK" IS '备注';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD"."APPLY_TIME" IS '需要删除';
COMMENT
ON TABLE "BLADE_REPAIR_RECORD" IS '维修记录信息';

-- ----------------------------
-- Primary Key structure for table BLADE_REPAIR_RECORD
-- ----------------------------
ALTER TABLE "BLADE_REPAIR_RECORD"
    ADD CONSTRAINT "1655780261PrimaryId" PRIMARY KEY ("ID");


-- ----------------------------
-- Indexes structure for table BLADE_REPAIR_RECORD
-- ----------------------------
CREATE UNIQUE INDEX "1654843188UniqueRecord_code"
    ON "BLADE_REPAIR_RECORD" ("RECORD_CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );
CREATE UNIQUE INDEX "1654843189UniqueRecord_code"
    ON "BLADE_REPAIR_RECORD" ("IS_DELETED" ASC, "RECORD_CODE" ASC) LOGGING
    TABLESPACE "USERS"
    VISIBLE
    PCTFREE 10
    INITRANS 2
    STORAGE (
    BUFFER_POOL DEFAULT
    );

-- ----------------------------
-- Table structure for BLADE_REPAIR_RECORD_FILE
-- ----------------------------
-- DROP TABLE "BLADE_REPAIR_RECORD_FILE";
CREATE TABLE "BLADE_REPAIR_RECORD_FILE"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "REPAIR_RECORD_ID" NUMBER (20),
    "FILE_NAME" NVARCHAR2(100),
    "OBJECT_KEY" NVARCHAR2(100),
    "CONTENT_TYPE" NVARCHAR2(100),
    "LINK" NVARCHAR2(100),
    "FILE_SIZE" NVARCHAR2(100),
    "UPLOAD_TIME" DATE
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."REPAIR_RECORD_ID" IS '维修记录id';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."FILE_NAME" IS '文件名称';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."OBJECT_KEY" IS '文件key';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."CONTENT_TYPE" IS '文件mini类型';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."LINK" IS '文件外链';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."FILE_SIZE" IS '文件大小';
COMMENT
ON COLUMN "BLADE_REPAIR_RECORD_FILE"."UPLOAD_TIME" IS '上传时间';
COMMENT
ON TABLE "BLADE_REPAIR_RECORD_FILE" IS '维修记录关联的附件信息';

-- ----------------------------
-- Primary Key structure for table BLADE_REPAIR_RECORD_FILE
-- ----------------------------
ALTER TABLE "BLADE_REPAIR_RECORD_FILE"
    ADD CONSTRAINT "1655780262PrimaryId" PRIMARY KEY ("ID");

-- ----------------------------
-- Table structure for BLADE_DEVICE_MATERIAL_RECORD
-- ----------------------------
-- DROP TABLE "BLADE_DEVICE_MATERIAL_RECORD";
CREATE TABLE "BLADE_DEVICE_MATERIAL_RECORD"
(
    "ID" NUMBER (20) NOT NULL,
    "STATUS" NUMBER (4),
    "IS_DELETED" NUMBER (11),
    "CREATE_USER" NUMBER (20),
    "CREATE_DEPT" NUMBER (20),
    "CREATE_TIME" DATE,
    "UPDATE_USER" NUMBER (20),
    "UPDATE_TIME" DATE,
    "TENANT_ID" NVARCHAR2(12),
    "RECORD_ID" NUMBER (20),
    "MATERIAL_ID" NUMBER (20),
    "MATERIAL_CODE" NVARCHAR2(128),
    "MATERIAL_NAME" NVARCHAR2(64),
    "RECORD_NUMBER" NUMBER (11),
    "BIZ_TYPE" NUMBER (11),
    "DEVICE_ID" NUMBER (20),
    "USER_ID" NUMBER (20),
    "USER_NAME" NVARCHAR2(64),
    "USAGE_TIME"  DATE
) TABLESPACE "USERS" LOGGING
    NOCOMPRESS
    PCTFREE 10
    INITRANS 1
    STORAGE
(
    BUFFER_POOL DEFAULT
)
    PARALLEL 1
    NOCACHE
    DISABLE ROW MOVEMENT
;
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."ID" IS '主键';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."STATUS" IS '状态';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."TENANT_ID" IS '所属租户';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."RECORD_ID" IS '保养记录Id/维修单Id';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."MATERIAL_ID" IS '备件Id';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."MATERIAL_CODE" IS '备件编码';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."MATERIAL_NAME" IS '备件名称';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."RECORD_NUMBER" IS '数量';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."BIZ_TYPE" IS '数据来源（1：维修单；2：保养记录）';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."DEVICE_ID" IS '设备Id';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."USER_ID" IS '使用人员id';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."USER_NAME" IS '使用人员姓名';
COMMENT
ON COLUMN "BLADE_DEVICE_MATERIAL_RECORD"."USAGE_TIME" IS '使用时间（维修单或保养记录的结束时间）';
COMMENT
ON TABLE "BLADE_DEVICE_MATERIAL_RECORD" IS '备品工况记录表';

-- ----------------------------
-- Primary Key structure for table BLADE_DEVICE_MATERIAL_RECORD
-- ----------------------------
ALTER TABLE "BLADE_DEVICE_MATERIAL_RECORD"
    ADD CONSTRAINT "1655780192PrimaryId" PRIMARY KEY ("ID");

INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1483604280849457153', '0', 'tpm', '维护保养', 'tpm', '/tpm', 'iconfont saber-weixiubaoyang', '3', '0', '0',
        '1',
        NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1491221708245405697', '1504059536042172417', 'check_record', '点检记录', 'check_record', '/tpm/check/record/index',
        'iconfont iconicon_savememo', '2', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1491282994091601922', '1504060956569051137', 'repair_apply', '维修申请', 'repair_apply', '/tpm/repair/apply/index',
        'iconfont iconicon_setting', '1', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1491309591410286594', '1504030750424768514', 'maintain_plan', '保养计划', 'maintain_plan',
        '/tpm/maintain/plan/index',
        'iconfont iconicon_work', '1', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1491940085082005505', '1504030750424768514', 'maintain_record', '保养记录', 'maintain_record',
        '/tpm/maintain/record/index',
        'iconfont icon-caidan', '2', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1491959985118347265', '1504060956569051137', 'repair_record', '维修记录', 'repair_record',
        '/tpm/repair/record/index',
        'iconfont iconicon_compile', '2', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1493780574536388609', '1483604280849457153', 'tpm_notice', '通知待办', 'menu', '/tpm/notice/index',
        'iconfont iconicon_notice', '9', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1504030750424768514', '1483604280849457153', 'maintenance', '保养', 'maintenance', '/tpm/maintenance',
        'iconfont iconicon_notice', '1', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1504059536042172417', '1483604280849457153', 'fixed_point_inspect', '点检', 'fixed_point_inspect',
        '/tpm/fixed-point-inspect', 'iconfont iconicon_sms', '2', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1504060956569051137', '1483604280849457153', 'repair', '维修', 'repair', '/tpm/service',
        'iconfont iconicon_setting', '3', '1', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1519861848982163458', '1483604280849457153', 'tpmMaintenance', '保养、维修待确认', 'card', NULL,
        'iconfont iconicon_send', '11', '3', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1519862507798269953', '1483604280849457153', 'tpmTheBeyond', '保养计划超期及预警', 'card', NULL,
        'iconfont iconicon_send', '12', '3', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES ('1519862661901193218', '1483604280849457153', 'tpmTodayMaintenance', '今日保养、点检及维修', 'card', NULL,
        'iconfont iconicon_send', '13', '3', '0', '1', NULL, '0', 'CPS', 1);
INSERT INTO "BLADE_MENU"(id, parent_id, code, name, alias, path, source, sort, category, action, is_open, remark,
                         is_deleted, belong_application, keep_alive)
VALUES (1595225500642377729, 0, 'hmi_tpm', '维护保养', 'hmi_tpm', '/tpm', '', 1, 1, 0, 1, '', 0, 'HMI', 1);
