/*
================================================================================
档案代号:apg_file
档案名称:付款单借方单身档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table apg_file
(
apg01       varchar2(16) NOT NULL,   /*付款单号                               */
                                     /*付款单号 apf01                         */
apg02       number(5) NOT NULL,      /*借方项次                               */
apg03       varchar2(10),            /*帐款营运中心                           */
                                     /*帐款营运中心 azp01                     */
apg04       varchar2(16),            /*帐款编号                               */
                                     /*帐款编号 apa01                         */
apg05f      number(20,6) NOT NULL,   /*原币冲帐金额                           */
apg05       number(20,6) NOT NULL,   /*本币冲帐金额                           */
apg06       number(5),               /*子帐期项次                             */
apgud01     varchar2(255),           /*自订栏位-Textedit                      */
apgud02     varchar2(40),            /*自订栏位-文字                          */
apgud03     varchar2(40),            /*自订栏位-文字                          */
apgud04     varchar2(40),            /*自订栏位-文字                          */
apgud05     varchar2(40),            /*自订栏位-文字                          */
apgud06     varchar2(40),            /*自订栏位-文字                          */
apgud07     number(15,3),            /*自订栏位-数值                          */
apgud08     number(15,3),            /*自订栏位-数值                          */
apgud09     number(15,3),            /*自订栏位-数值                          */
apgud10     number(10),              /*自订栏位-整数                          */
apgud11     number(10),              /*自订栏位-整数                          */
apgud12     number(10),              /*自订栏位-整数                          */
apgud13     date,                    /*自订栏位-日期                          */
apgud14     date,                    /*自订栏位-日期                          */
apgud15     date                     /*自订栏位-日期                          */
);

create        index apg_02 on apg_file (apg04);
create unique index apg_pk on apg_file (apg01,apg02);
alter table apg_file add  constraint apg_pk primary key  (apg01,apg02) enable validate;
grant select on apg_file to public;
grant index on apg_file to public;
grant update on apg_file to public;
grant delete on apg_file to public;
grant insert on apg_file to public;