--
--  仕入先
--      t_supplier
--

CREATE TABLE t_supplier
(
    SupplierCd serial NOT NULL,     -- PriKey
    SupplierNm 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(SupplierCd)
);

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


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