/*
================================================================================
档案代号:bmv_file
档案名称:固定属性资料档
档案目的:单档多栏
上游档案:
下游档案:
============.========================.==========================================
*/
create table bmv_file
(
bmv01       varchar2(40) DEFAULT '' NOT NULL, /*bom主件款式料号*/
bmv02       varchar2(40) DEFAULT '' NOT NULL, /*bom元件款式料号*/
bmv03       varchar2(20) DEFAULT '' NOT NULL, /*bom特性代码*/
bmv04       varchar2(10) DEFAULT '' NOT NULL, /*属性代码,资料来源为元件款式*/
bmv05       date DEFAULT sysdate NOT NULL, /*生效日期*/
bmv06       date DEFAULT sysdate NOT NULL, /*失效日期*/
bmv07       varchar2(20) DEFAULT '' NOT NULL, /*属性值/主件属性代码,若固定  */
bmv08       varchar2(1) DEFAULT '' NOT NULL, /*固定属性类型:1-取主件值,2-自 */
bmv09       number(10) DEFAULT '0' NOT NULL /*项次*/
);

create unique index bmv_pk on bmv_file (bmv01,bmv02,bmv03,bmv04,bmv05);
alter table bmv_file add  constraint bmv_pk primary key  (bmv01,bmv02,bmv03,bmv04,bmv05) enable validate;
grant select on bmv_file to public;
grant index on bmv_file to public;
grant update on bmv_file to public;
grant delete on bmv_file to public;
grant insert on bmv_file to public;