<?php
	class TerminalController extends TerminalModel {
		private $idUsuario;
		private $idArmazem;
		private $nome;
		private $endereco;
		private $nota;

		public function __construct($idUsuario, $idArmazem, $nome, $endereco, $nota){
			$this->idUsuario = $idUsuario;
			$this->idArmazem = $idArmazem;
			$this->nome = $nome;
			$this->endereco = $endereco;
			$this->nota = $nota;
		}

		public function createTerminal(){
			$result = $this->insertTerminal($this->idUsuario, $this->idArmazem, $this->nome, $this->endereco, $this->nota);
			return $result;
		}

		public function updateTerminal($idTerminal){
			$result = $this->editTerminal($idTerminal, $this->idUsuario, $this->idArmazem, $this->nome, $this->endereco, $this->nota);
			return $result;
		}

	}