Skip to content

Instantly share code, notes, and snippets.

@rafaell-lycan
Created July 11, 2013 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaell-lycan/5979808 to your computer and use it in GitHub Desktop.
Save rafaell-lycan/5979808 to your computer and use it in GitHub Desktop.
SQL Dexter - PHP 500 4Linux
create table clientes(
id int primary key auto_increment,
nome_razao varchar(255) not null,
cpf_cnpj varchar(20) not null,
email varchar(100) not null,
senha varchar(100) not null,
telefone varchar(20) not null,
celular varchar(20) not null,
cep varchar(8) not null,
endereco varchar(255) not null,
bairro varchar(100) not null,
cidade varchar(100) not null,
estado varchar(2) not null
);
create table encomendas(
id int primary key auto_increment,
fun_id int not null,
cli_id int not null,
l_pac int not null,
a_pac int not null,
p_pac int not null,
ori_cep varchar(8) default null,
ori_endereco varchar(255) not null,
ori_bairro varchar(100) not null,
ori_cidade varchar(100) not null,
ori_estado varchar(2) not null,
dst_nome varchar(255) not null,
dst_cep varchar(8) default null,
dst_endereco varchar(255) not null,
dst_bairro varchar(100) not null,
dst_cidade varchar(100) not null,
dst_estado varchar(2) not null,
distancia double precision not null,
tip_id int not null,
mot_id int,
data_coleta date,
data_prevista date,
data_entrega date,
transito int default 0,
entregue int default 0,
coleta int default 0,
seguro int default 0
);
create table faleconosco(
id int auto_increment primary key,
nome varchar(100) not null,
assunto varchar(255) not null,
email varchar(100) not null,
mensagem text not null
);
create table funcionarios(
id int primary key auto_increment,
prf_id int not null,
nome varchar(100) not null,
email varchar(100) not null,
senha varchar(100) not null
);
create table perfis(
id int(2) primary key auto_increment,
nome varchar(20) not null
);
create table tipo_encomenda(
id int auto_increment primary key,
nome varchar(100) not null,
valor_km double precision not null,
prazo_maximo int not null
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment