/*
================================================================================
档案代号:cra_file
档案名称:成品/材料冲帐单头暂存档
档案目的:记录成品/材料之异动/报关冲帐之单头资料
上游档案:
下游档案:
============.========================.==========================================
*/
create table cra_file
(
cra00       varchar2(1) NOT NULL,    /*类别                                   */
cra01       varchar2(40) NOT NULL,   /*商品编号                               */
cra02       varchar2(10) NOT NULL,   /*海关代号                               */
cra03       varchar2(10) NOT NULL,   /*客户代号                               */
cra04       varchar2(1) NOT NULL,    /*异动方式                               */
cra05       varchar2(20),            /*HS code                                */
craconf     varchar2(1)              /*确认否                                 */
);

create unique index cra_pk on cra_file (cra00,cra01,cra02,cra03,cra04);
alter table cra_file add  constraint cra_pk primary key  (cra00,cra01,cra02,cra03,cra04) enable validate;
grant select on cra_file to public;
grant index on cra_file to public;
grant update on cra_file to public;
grant delete on cra_file to public;
grant insert on cra_file to public;