--
--  お知らせ
--      t_news
--

CREATE TABLE t_news
(
    NewsCd serial NOT NULL,     -- PriKey
    Date date,
    Title character varying(256),
    Body character varying(1024),
    ReleaseDiv integer,

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

    PRIMARY KEY(NewsCd)
);

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


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