NAPPDesafio/api/helpers/database/queries.go
2024-07-21 00:15:14 -03:00

30 lines
675 B
Go

package database
var CreateUsersTableIfNotExists = `
CREATE TABLE IF NOT EXISTS users (
"user" UUID NOT NULL,
created_at BIGINT NOT NULL,
updated_at BIGINT,
username text NOT NULL,
"password" text NOT NULL,
PRIMARY KEY ("user")
)`
var CreateProductsTableIfNotExists = `
CREATE TABLE IF NOT EXISTS products (
created_by UUID NOT NULL,
created_at BIGINT NOT NULL,
updated_by UUID,
updated_at BIGINT,
nome text NOT NULL,
codigo text NOT NULL,
estoque_total BIGINT NOT NULL,
estoque_corte BIGINT NOT NULL,
estoque_disponivel BIGINT NOT NULL,
preco_de NUMERIC NOT NULL,
preco_por NUMERIC NOT NULL,
PRIMARY KEY (codigo)
)`