-- Create table 系统配置参数
create table BD_SYSTEM_CONFIG
(
  pk_id         NUMBER(20) not null,
  label         VARCHAR2(100) not null,
  key           VARCHAR2(100) not null,
  value         VARCHAR2(50) not null,
  del_flag      NUMBER(1) default 0 not null,
  pkCreator       VARCHAR2(50) not null,
  creation_time DATE default sysdate not null,
  pkModified      VARCHAR2(50),
  modified_time DATE,
  pk_country    NUMBER(6) not null
)
tablespace CLOUD
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
-- Add comments to the table
comment on table BD_SYSTEM_CONFIG
  is '系统配置表';
-- Add comments to the columns
comment on column BD_SYSTEM_CONFIG.pk_id
  is '主键';
comment on column BD_SYSTEM_CONFIG.label
  is '标题';
comment on column BD_SYSTEM_CONFIG.key
  is '唯一键，redis的key';
comment on column BD_SYSTEM_CONFIG.value
  is '值';
comment on column BD_SYSTEM_CONFIG.del_flag
  is '逻辑删除 (0=未删除,1已删除)';
comment on column BD_SYSTEM_CONFIG.pkCreator
  is '创建人';
comment on column BD_SYSTEM_CONFIG.creation_time
  is '创建时间';
comment on column BD_SYSTEM_CONFIG.pkModified
  is '修改人';
comment on column BD_SYSTEM_CONFIG.modified_time
  is '修改时间';
comment on column BD_SYSTEM_CONFIG.pk_country
  is '国家';
-- Create/Recreate primary, unique and foreign key constraints
alter table BD_SYSTEM_CONFIG
  add constraint BD_SYSTEM_CONFIG_PK primary key (PK_ID)
  using index
  tablespace CLOUD
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
    pctincrease 0
  );

create sequence bd_system_config_SEQ
minvalue 1
maxvalue 999999999999999999999999
start with 1
increment by 1
cache 20;
