--
--  ウォッチリスト
--      t_watch_list
--

CREATE TABLE t_watch_list
(
    WatchListCd serial NOT NULL,        -- PriKey
    MemberCd integer,                   -- ForKey
    ItemCd integer,                     -- ForKey
    Comment character varying(1024),
    CreateDate timestamp without time zone,

    DelFlg boolean,
    AddDate timestamp without time zone,
    UpdDate timestamp without time zone,
    UpdUsrNm character varying(60),
    UpdPcNm character varying(60),
    UpdCnt integer,

    PRIMARY KEY(WatchListCd)
);

-- シリアル初期値
SELECT setval('t_watch_list_WatchListCd_seq', 10000);


-- トリガ
CREATE TRIGGER trigger_master_stamp
  BEFORE INSERT OR UPDATE
  ON t_watch_list
  FOR EACH ROW
  EXECUTE PROCEDURE g_master_stamp();
