--
--  タイプ
--      t_type
--

CREATE TABLE t_type
(
    TypeCd serial NOT NULL,             -- PriKey
    TypeNm character varying(256),
    DispPriority 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(TypeCd)
);

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


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