/*
================================================================================
档案代号:ogbs_file
档案名称:出库序号明细
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table ogbs_file
(
ogbs00      varchar2(10) NOT NULL,   /*类别                                   */
ogbs01      varchar2(16) NOT NULL,   /*出库单号                               */
ogbs02      number(5) NOT NULL,      /*项次                                   */
ogbs03      number(5),               /*序号                                   */
ogbs04      varchar2(24),            /*外部批号                               */
ogbs05      date,                    /*厂商制造日期                           */
ogbs06      number(15,3),            /*数量                                   */
ogbs07      varchar2(1),             /*归属类别                               */
ogbs08      varchar2(16),            /*归属单号                               */
ogbs021     varchar2(40),            /*料件编号                               */
ogbs022     number(5) DEFAULT '0' NOT NULL /*项次*/
);

create unique index ogbs_pk on ogbs_file (ogbs00,ogbs01,ogbs02,ogbs022);
alter table ogbs_file add  constraint ogbs_pk primary key  (ogbs00,ogbs01,ogbs02,ogbs022) enable validate;
grant select on ogbs_file to public;
grant index on ogbs_file to public;
grant update on ogbs_file to public;
grant delete on ogbs_file to public;
grant insert on ogbs_file to public;