--分析报表自定义筛选条件
create table UR_UARPT_FILTER  (
   USER_ID              VARCHAR2(36)                     not null,
   ARPT_ID              VARCHAR2(36)                     not null,
   ADATA_ID             VARCHAR2(36)                     not null,
   IS_VALID             VARCHAR2(1)                    default '1',
   IS_WHERE_SQL         VARCHAR2(1)                    default '0',
   WHERE_SQL            VARCHAR2(4000),
   constraint PK_UR_UARPT_FILTER primary key (USER_ID, ARPT_ID, ADATA_ID)
);

create table UR_UARPT_FILTER_DE  (
   USER_ID              VARCHAR2(36)                     not null,
   ARPT_ID              VARCHAR2(36)                     not null,
   ADATA_ID             VARCHAR2(36)                     not null,
   IDX_CODE             VARCHAR2(36)                     not null,
   SEQ_NO               INTEGER                        default 1  not null,
   COMPARE              VARCHAR2(60),
   REAL_VALUE           VARCHAR2(3700),
   DISPLAY_VALUE        VARCHAR2(3700),
   constraint PK_UR_UARPT_FILTER_DE primary key (USER_ID, ARPT_ID, ADATA_ID, IDX_CODE)
);
