1515 - Subir o projeto de flash de venda da GF no repositório (Seguir o modelo padrão)
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
-- Create table
|
||||
create table BSC_FATURAMENTO
|
||||
(
|
||||
chave_faturamento NUMBER(15) not null,
|
||||
chave_empresa NUMBER(15) not null,
|
||||
categoria_pai VARCHAR2(200) not null,
|
||||
categoria VARCHAR2(300),
|
||||
chave_produto NUMBER(15),
|
||||
descricao_produto VARCHAR2(300),
|
||||
chave_familia NUMBER(15),
|
||||
quantidade NUMBER(15,2),
|
||||
valor_venda NUMBER(15,2),
|
||||
valor_bruto NUMBER(15,2),
|
||||
referencia DATE,
|
||||
chave_categoria_pai NUMBER(10),
|
||||
chave_categoria NUMBER(10)
|
||||
)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
-- Add comments to the columns
|
||||
comment on column BSC_FATURAMENTO.chave_faturamento
|
||||
is 'Chave da tabela';
|
||||
comment on column BSC_FATURAMENTO.chave_empresa
|
||||
is 'Código da loja';
|
||||
comment on column BSC_FATURAMENTO.categoria_pai
|
||||
is 'Descrição da categoria pai';
|
||||
comment on column BSC_FATURAMENTO.categoria
|
||||
is 'Descrição da categoria';
|
||||
comment on column BSC_FATURAMENTO.chave_produto
|
||||
is 'Código do produto';
|
||||
comment on column BSC_FATURAMENTO.descricao_produto
|
||||
is 'Descrição do Produto';
|
||||
comment on column BSC_FATURAMENTO.chave_familia
|
||||
is 'Código da família do produto';
|
||||
comment on column BSC_FATURAMENTO.quantidade
|
||||
is 'Quanitdade vendida';
|
||||
comment on column BSC_FATURAMENTO.valor_venda
|
||||
is 'Valor toral vendido';
|
||||
comment on column BSC_FATURAMENTO.valor_bruto
|
||||
is 'Valor bruto vendido';
|
||||
comment on column BSC_FATURAMENTO.referencia
|
||||
is 'Mês de referência do faturamento';
|
||||
comment on column BSC_FATURAMENTO.chave_categoria_pai
|
||||
is 'Código da categoria pai';
|
||||
comment on column BSC_FATURAMENTO.chave_categoria
|
||||
is 'Código da categoria';
|
||||
-- Create/Recreate indexes
|
||||
create index BSC_FATURAMENTO_IDX on BSC_FATURAMENTO (CHAVE_CATEGORIA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
create index BSC_FATURAMENTO_IDX1 on BSC_FATURAMENTO (REFERENCIA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
create index BSC_FATURAMENTO_IDX2 on BSC_FATURAMENTO (REFERENCIA, CHAVE_CATEGORIA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
create index BSC_FATURAMENTO_IDX3 on BSC_FATURAMENTO (REFERENCIA, CHAVE_EMPRESA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table BSC_FATURAMENTO
|
||||
add constraint BSC_FATURAMENTO_PK primary key (CHAVE_FATURAMENTO)
|
||||
using index
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
@@ -0,0 +1,96 @@
|
||||
-- Create table
|
||||
create table BSC_FATURAMENTO_PERDAS
|
||||
(
|
||||
chave_perda NUMBER not null,
|
||||
chave_empresa NUMBER not null,
|
||||
categoria_pai VARCHAR2(200),
|
||||
categoria VARCHAR2(300),
|
||||
chave_produto NUMBER(15),
|
||||
descricao_produto VARCHAR2(300),
|
||||
chave_familia NUMBER(15),
|
||||
quantidade NUMBER(15,2),
|
||||
valor_diferenca NUMBER(15,2),
|
||||
referencia DATE,
|
||||
chave_categoria_pai NUMBER(10),
|
||||
chave_categoria NUMBER(10)
|
||||
)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
-- Add comments to the columns
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_perda
|
||||
is 'Chave da tabela';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_empresa
|
||||
is 'Chave da loja';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.categoria_pai
|
||||
is 'Descrição da categoria pai';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.categoria
|
||||
is 'Descrição da categoria';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_produto
|
||||
is 'chave do produto';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.descricao_produto
|
||||
is 'Descrição do produto';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_familia
|
||||
is 'Chave da família do produto';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.quantidade
|
||||
is 'Quantidade perdida em unidade';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.valor_diferenca
|
||||
is 'Valor perdido em R$';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.referencia
|
||||
is 'Mês de referência da perda';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_categoria_pai
|
||||
is 'Chave da categoria pai';
|
||||
comment on column BSC_FATURAMENTO_PERDAS.chave_categoria
|
||||
is 'Chave da categoria';
|
||||
-- Create/Recreate indexes
|
||||
create index BSC_PERDAS_IDX1 on BSC_FATURAMENTO_PERDAS (REFERENCIA, CHAVE_EMPRESA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
create index BSC_PERDAS_IDX2 on BSC_FATURAMENTO_PERDAS (REFERENCIA, CHAVE_CATEGORIA)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table BSC_FATURAMENTO_PERDAS
|
||||
add constraint BSC_FATURAMENTO_PERDAS_PK primary key (CHAVE_PERDA)
|
||||
using index
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
@@ -0,0 +1,48 @@
|
||||
-- Create table
|
||||
create table BSC_USUARIO_CATEGORIA
|
||||
(
|
||||
chave_usuario_categoria NUMBER(15) not null,
|
||||
chave_usuario NUMBER(15),
|
||||
chave_empresa NUMBER(15),
|
||||
categoria_pai VARCHAR2(200),
|
||||
categoria VARCHAR2(300)
|
||||
)
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
-- Add comments to the columns
|
||||
comment on column BSC_USUARIO_CATEGORIA.chave_usuario_categoria
|
||||
is 'Código da tabela';
|
||||
comment on column BSC_USUARIO_CATEGORIA.chave_usuario
|
||||
is 'Código do usuário';
|
||||
comment on column BSC_USUARIO_CATEGORIA.chave_empresa
|
||||
is 'Código da Empresa';
|
||||
comment on column BSC_USUARIO_CATEGORIA.categoria_pai
|
||||
is 'Categoria pai vinculado';
|
||||
comment on column BSC_USUARIO_CATEGORIA.categoria
|
||||
is 'Categoria vinculado';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table BSC_USUARIO_CATEGORIA
|
||||
add constraint BSC_USUARIO_CATEGORIA_PK primary key (CHAVE_USUARIO_CATEGORIA)
|
||||
using index
|
||||
tablespace C5DADOS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 128K
|
||||
next 128K
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
pctincrease 0
|
||||
);
|
||||
Reference in New Issue
Block a user