Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table produto (
- id_produto tinyint primary key identity,
- nome_produto nvarchar(255) not null,
- valor_unidade decimal(6,2) not null,
- descricao nvarchar(255) null
- )
- create table cliente (
- id_cliente smallint primary key identity,
- nome nvarchar(255) not null,
- email nvarchar(255) not null unique,
- cpf_cnpj varchar(18) not null unique,
- cep varchar(9) not null,
- num_residencia nvarchar(20) not null,
- id_cliente_asaas nvarchar(255) null
- )
- create table pedido (
- id_pedido smallint primary key identity,
- quantidade tinyint not null default 1,
- valor_total decimal(7,2) not null,
- status_pagamento nvarchar(50) not null default "pendente",
- data_compra date not null default current_date(),
- id_pagamento_asaas varchar(255) null unique,
- id_cliente smallint not null references cliente(id_cliente),
- id_produto tinyint not null references produto(id_produto)
- )
Advertisement
Add Comment
Please, Sign In to add comment