<?php

    include("../../classes/database.class.php");
    include("../../classes/precoModel.class.php");
    include("../../classes/precoController.class.php");

    $idTipoMatricula = $_POST["idTipoMatricula"];
    $preco = $_POST["preco"];
    $nota = $_POST["nota"];

    if($preco == ""){
        $preco = null;
    }
    if($nota == ""){
        $nota = null;
    }

    $modelo = new PrecoController($idTipoMatricula, $preco, $nota);
    $id = $modelo->createPreco();
    echo $id;