CREATE TABLE TR_GENERIC_CSV_ITEM
(
    ID                          NUMBER(10)    NOT NULL,
    USER_PATTERN_NO             NUMBER(10)    NOT NULL,
    DTL_NO                      NUMBER(5)     NOT NULL,
    ITEM_NAME                   VARCHAR2(100) NOT NULL,
    OUTPUT_FLG                  CHAR(1)       NOT NULL,
    AGGREGATION_KBN             CHAR(1),
    GROUP_FLG                   CHAR(1)       NOT NULL,
    BREAK_FLG                   CHAR(1)       NOT NULL,
    ORDER_SORT                  NUMBER(3)     NOT NULL,
    ORDER_KBN                   CHAR(1),
    INSERT_DATETIME             TIMESTAMP     NOT NULL,
    INSERT_ID                   VARCHAR2(32)  NOT NULL,
    UPDATE_DATETIME             TIMESTAMP     NOT NULL,
    UPDATE_ID                   VARCHAR2(32)  NOT NULL,
    VERSION                     NUMBER(6)     NOT NULL DEFAULT 1,
    CONSTRAINT TR_GENERIC_CSV_ITEM_PK PRIMARY KEY (ID),
    CONSTRAINT TR_GENERIC_CSV_ITEM_UIX01 UNIQUE (USER_PATTERN_NO, DTL_NO)
)
;

COMMENT ON TABLE TR_GENERIC_CSV_ITEM IS '汎用CSV選択項目登録';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.ID IS 'キー';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.USER_PATTERN_NO IS 'ユーザパターン番号';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.DTL_NO IS '詳細番号';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.ITEM_NAME IS '項目名';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.OUTPUT_FLG IS '出力フラグ';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.AGGREGATION_KBN IS '集計区分';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.GROUP_FLG IS 'グループフラグ';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.BREAK_FLG IS '改頁フラグ';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.ORDER_SORT IS '表示順序';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.ORDER_KBN IS '昇降区分';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.INSERT_DATETIME IS '作成日時';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.INSERT_ID IS '作成ID';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.UPDATE_DATETIME IS '更新日時';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.UPDATE_ID IS '更新ID';
COMMENT ON COLUMN TR_GENERIC_CSV_ITEM.VERSION IS 'バージョン';
