ALTER TABLE MES_EQUIPMENT
    ADD (ATTACH_LINK NVARCHAR2(255) );
COMMENT
ON COLUMN MES_EQUIPMENT.ATTACH_LINK IS '附件链接';


CREATE TABLE MES_MEASURING_USAGE
(
    "ID"                      NUMBER(20,0) NOT NULL ENABLE,
    "TENANT_ID"               NVARCHAR2(12),
    "CREATE_USER"             NUMBER(20,0),
    "CREATE_TIME"             DATE,
    "CREATE_DEPT"             NUMBER(20,0),
    "UPDATE_USER"             NUMBER(20,0),
    "UPDATE_TIME"             DATE,
    "STATUS"                  NUMBER(11,0) NOT NULL ENABLE,
    "IS_DELETED"              NUMBER(11,0),
    "MATERIAL_CODE"           NVARCHAR2(255),
    "MATERIAL_NAME"           NVARCHAR2(255),
    "STORAGE_ROOM_NUMBER1"    NVARCHAR2(255),
    "STORAGE_LOCATION_NUMBER" NVARCHAR2(255),
    "DEPT"                    NVARCHAR2(255),
    "ATTACH_LINK"             NVARCHAR2(255),
    "PLEASE_NOTE_THE_TIME"    DATE,
    "FLAG_STATE"              NUMBER(11,0),
    "TOOL_SPECIFICATIONS"     NVARCHAR2(255),
    "TYPE"                    NVARCHAR2(255),
    "TOOL_BARCODE"            NVARCHAR2(255),
    "DEVICE_CODE"             NVARCHAR2(255),
    "LIFE_SPAN"               DATE,
    "CUMULATIVE_NUMBER"       NUMBER(20,0),
    "MAINTENANCE_DAYS"        NUMBER(20,0),
    "WARNING_DAYS"            NUMBER(20,0),
    "BORROWING_TIME"          DATE,
    CONSTRAINT "MES_MEASURING_USAGE_PK" PRIMARY KEY ("ID")
) TABLESPACE JONHON_MES_DATA;

COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."ID" IS '主键';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."CREATE_USER" IS '创建人';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."CREATE_TIME" IS '创建时间';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."CREATE_DEPT" IS '创建部门';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."UPDATE_USER" IS '更新人';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."UPDATE_TIME" IS '更新时间';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."STATUS" IS '状态';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."IS_DELETED" IS '删除标记';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."MATERIAL_CODE" IS '物料编码';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."MATERIAL_NAME" IS '物料名称';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."STORAGE_ROOM_NUMBER1" IS '库房号';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."STORAGE_LOCATION_NUMBER" IS '库位号';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."DEPT" IS '部门';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."ATTACH_LINK" IS '工具图片';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."PLEASE_NOTE_THE_TIME" IS '提请时间';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."FLAG_STATE" IS '标记状态';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."TOOL_SPECIFICATIONS" IS '工具规格';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."TYPE" IS '类型';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."TOOL_BARCODE" IS '工具条码';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."DEVICE_CODE" IS '设备编号';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."LIFE_SPAN" IS '寿命';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."CUMULATIVE_NUMBER" IS '历史累计次数';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."MAINTENANCE_DAYS" IS '检修天数';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."WARNING_DAYS" IS '预警天数';
COMMENT
ON COLUMN "JONHON_MES"."MES_MEASURING_USAGE"."BORROWING_TIME" IS '借用时间';
COMMENT
ON TABLE "JONHON_MES"."MES_MEASURING_USAGE"  IS '量具使用记录';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (MATERIAL_NAME NVARCHAR2(255) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.MATERIAL_NAME IS '物料名称';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (MATERIAL_SPECIFICATIONS NVARCHAR2(255) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.MATERIAL_SPECIFICATIONS IS '物料规格';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (PRODUCTION_BATCH_NUMBER NVARCHAR2(255) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.PRODUCTION_BATCH_NUMBER IS '生产批次号';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (WAREHOUSE NVARCHAR2(255) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.WAREHOUSE IS '仓库';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (STORAGE_LOCATION_NUMBER NVARCHAR2(255) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.STORAGE_LOCATION_NUMBER IS '库位号';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (QUANTITY_IN_STOCK NUMBER(20, 0) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.QUANTITY_IN_STOCK IS '库存数量';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (GRADE NUMBER(20, 0) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.GRADE IS '等级';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (MONEY NUMBER(19, 4) );
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.MONEY IS '金额';

ALTER TABLE MES_MEASURING_UPKEEP
    ADD (USAGE_COUNT NUMBER(20, 0) NOT NULL);
COMMENT
ON COLUMN MES_MEASURING_UPKEEP.USAGE_COUNT IS '累计使用次数';