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

Create Table T_STA_PARAM(
tagName		VARCHAR(50)		NOT NULL,
tagNameChinese		VARCHAR(100),
useOnline		DECIMAL(1),
useOffline		DECIMAL(1),
count		DECIMAL(16),
dataFromDate		TIMESTAMP,
dataToDate		TIMESTAMP,
sectionLeft		DECIMAL(10,5),
sectionRight		DECIMAL(10,5),
precision		DECIMAL(3),
capacity		DECIMAL(3),
notUseHistory		DECIMAL(1),
isDone		DECIMAL(1),
useAutoconfigRule		DECIMAL(1),
algId		VARCHAR(36),
ruleId		VARCHAR(36),
ruleMin		DECIMAL(3),
ruleMax		DECIMAL(3),
CONSTRAINT pk_T_STA_PARAM PRIMARY KEY (tagName)
)
IN TB8KUSREMS INDEX IN TB8KIDXEMS@

COMMENT ON Table T_STA_PARAM IS '设备记录概率配置信息'@

COMMENT ON T_STA_PARAM (tagName IS 'TagName')@
COMMENT ON T_STA_PARAM (tagNameChinese IS 'Tag点中文')@
COMMENT ON T_STA_PARAM (useOnline IS '是否使用在线值做数据统计')@
COMMENT ON T_STA_PARAM (useOffline IS '是否使用在iHDB中的历史值做数据统计')@
COMMENT ON T_STA_PARAM (count IS '读取的iHDB记录数量，，0为不限制')@
COMMENT ON T_STA_PARAM (dataFromDate IS '读取iHDB记录的开始时间，默认值是1970-1-1')@
COMMENT ON T_STA_PARAM (dataToDate IS '读取iHDB记录的结束时间，默认值是time(NULL)')@
COMMENT ON T_STA_PARAM (sectionLeft IS '合理的数据最小值，如果不设定，则会被程序动态生成')@
COMMENT ON T_STA_PARAM (sectionRight IS '合理的数据最大值，同上')@
COMMENT ON T_STA_PARAM (precision IS '单个小区间宽度')@
COMMENT ON T_STA_PARAM (capacity IS '精确到小数点前多少位')@
COMMENT ON T_STA_PARAM (notUseHistory IS '是否在Web页面做历史图形展示（部分可能不需要记录历史，只需要获得一个当前值即可，设置该位会阻止记录历史，只进行更新）')@
COMMENT ON T_STA_PARAM (isDone IS '是否是已经完成的规则参数')@
COMMENT ON T_STA_PARAM (useAutoconfigRule IS '是否自动为相应的点配置统计检测算法')@
COMMENT ON T_STA_PARAM (algId IS '算法ID，暂时未启用')@
COMMENT ON T_STA_PARAM (ruleId IS '自动生成的规则ID，前台无需关心')@
COMMENT ON T_STA_PARAM (ruleMin IS '合法最小百分比，作为规则的参数')@
COMMENT ON T_STA_PARAM (ruleMax IS '合法最大百分比，作为规则的参数')@

