--
--  仮受注見出し
--      t_pre_order_title
--

CREATE TABLE t_pre_order_title
(
    PreOrderNo serial NOT NULL,     -- PriKey
    PreOrderMember integer,         -- ForKey
    PreOrderDate date,
    takkyubin 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(PreOrderNo)
);

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


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