-- Version:		2025.7.31  14:52:27
Drop Table T_RULE_RESULT@

Create Table T_RULE_RESULT(
RuleBTime		TIMESTAMP		NOT NULL,
RuleId		VARCHAR(50)		NOT NULL,
RuleGroup		VARCHAR(100)		NOT NULL,
RuleName		VARCHAR(100),
Result		VARCHAR(3000),
DealResult		DECIMAL(10),
RuleETime		TIMESTAMP,
CONSTRAINT pk_T_RULE_RESULT PRIMARY KEY (RuleBTime, RuleId, RuleGroup)
)
IN TB8KUSREMS INDEX IN TB8KIDXEMS@
Alter Table T_RULE_RESULT ALTER COLUMN DealResult SET WITH Default 0@

COMMENT ON Table T_RULE_RESULT IS '设备报警履历'@

COMMENT ON T_RULE_RESULT (RuleBTime IS '报警开始时间')@
COMMENT ON T_RULE_RESULT (RuleId IS '报警id')@
COMMENT ON T_RULE_RESULT (RuleGroup IS '报警分组')@
COMMENT ON T_RULE_RESULT (RuleName IS '报警名称')@
COMMENT ON T_RULE_RESULT (Result IS '报警结果')@
COMMENT ON T_RULE_RESULT (DealResult IS '是否处理 0:没处理 1:已经处理 -1:误报警')@
COMMENT ON T_RULE_RESULT (RuleETime IS '报警结束')@

