<?php
//namespace application\models\hclinica\models;

use application\models\MainModel;
use application\models\hclinica\tables\Cita;
use application\models\MyModel;

class CitaModel extends MyModel
{
    public function __construct()
    {
        parent::__construct();
        $this->db_server=$this->conexion;
        $this->table="cita";
        $this->idTabla="idCita";
    }
    public function getCitaById($idCita)
    {
        return $this->getArrayById($this->idTabla, $idCita);
    }
    public function guardarCita(&$cita)
    {
        $this->guardarArray($cita, $this->idTabla);
    }
    public static function model(CitaModel $c){
        return $c;
    }
    /*public function guardar(Cita $cita)
    {
        $this->model->guardar($cita, "idCita");
    }
    public function getArrayById($idCita)
    {
        return $this->model->consultarPorId("idCita", $idCita);
    }*/
}

