from postgreConnection import query, mutation
from pydantic import BaseModel

class Promocao(BaseModel):
    porcentagem: int
    secaoId: int

def get_all_promo():
    promos = query("SELECT * FROM PROMOCAO;")
    return promos

def insert_promo(promocao: Promocao):
    response = mutation(f'insert into PROMOCAO (porcentagem, secao_id) values ({promocao.porcentagem}, {promocao.secaoId});')
    return response

def delete_promo(promoId: int):
    response = mutation(f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response
300c41caf3c2fdef08c6367a2d0ce7c01baaa935
<mask token>


class Promocao(BaseModel):
    porcentagem: int
    secaoId: int


<mask token>


def delete_promo(promoId: int):
    response = mutation(
        f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response

<mask token>


class Promocao(BaseModel):
    porcentagem: int
    secaoId: int


<mask token>


def insert_promo(promocao: Promocao):
    response = mutation(
        f'insert into PROMOCAO (porcentagem, secao_id) values ({promocao.porcentagem}, {promocao.secaoId});'
        )
    return response


def delete_promo(promoId: int):
    response = mutation(
        f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response

<mask token>


class Promocao(BaseModel):
    porcentagem: int
    secaoId: int


def get_all_promo():
    promos = query('SELECT * FROM PROMOCAO;')
    return promos


def insert_promo(promocao: Promocao):
    response = mutation(
        f'insert into PROMOCAO (porcentagem, secao_id) values ({promocao.porcentagem}, {promocao.secaoId});'
        )
    return response


def delete_promo(promoId: int):
    response = mutation(
        f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response

from postgreConnection import query, mutation
from pydantic import BaseModel


class Promocao(BaseModel):
    porcentagem: int
    secaoId: int


def get_all_promo():
    promos = query('SELECT * FROM PROMOCAO;')
    return promos


def insert_promo(promocao: Promocao):
    response = mutation(
        f'insert into PROMOCAO (porcentagem, secao_id) values ({promocao.porcentagem}, {promocao.secaoId});'
        )
    return response


def delete_promo(promoId: int):
    response = mutation(
        f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response

from postgreConnection import query, mutation
from pydantic import BaseModel

class Promocao(BaseModel):
    porcentagem: int
    secaoId: int

def get_all_promo():
    promos = query("SELECT * FROM PROMOCAO;")
    return promos

def insert_promo(promocao: Promocao):
    response = mutation(f'insert into PROMOCAO (porcentagem, secao_id) values ({promocao.porcentagem}, {promocao.secaoId});')
    return response

def delete_promo(promoId: int):
    response = mutation(f'DELETE FROM PROMOCAO p WHERE p.promocao_id = {promoId};')
    return response