/*
================================================================================
档案代号:alf_file
档案名称:赎单对应预购单明细单身档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table alf_file
(
alf01       varchar2(16) NOT NULL,   /*赎单单号                               */
alf02       varchar2(16) NOT NULL,   /*预购单号                               */
alf03       varchar2(1),             /*预购单分摊方式                         */
                                     /*1.按赎单到货金额比率分摊               */
                                     /*2.按指定比率分摊                       */
                                     /*3.将预购单剩余金额全部分摊至本次赎单   */
                                     /*4.按指定金额分摊                       */
alf05       number(20,6),            /*该预购单到货金额                       */
alf06       number(9,4),             /*该预购单应摊比率                       */
alf07       number(20,6)             /*该预购单应摊金额                       */
);

create        index alf_02 on alf_file (alf02);
create unique index alf_pk on alf_file (alf01,alf02);
alter table alf_file add  constraint alf_pk primary key  (alf01,alf02) enable validate;
grant select on alf_file to public;
grant index on alf_file to public;
grant update on alf_file to public;
grant delete on alf_file to public;
grant insert on alf_file to public;