--
--  返金
--      t_refund
--

CREATE TABLE t_refund
(
    OrderNo         integer NOT NULL,   -- PriKey
    OrderRowNo      integer NOT NULL,
    RefundReqDate   date,
    RefundDate      date,
    RefundPrice     integer,
    RefundReason    character varying(1024),

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

    PRIMARY KEY(OrderNo,OrderRowNo)
);


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