<?php
require_once (PATH_TABLES . "prospect/ProspectDocumentTable.php") ;
require_once (PATH_MODELS . "base/MasterBase.php") ;

class ProspectDocumentClass extends MasterBase {
    function __construct($db) {
        $this->db       = $db ;
        $this->tbl      = ProspectDocumentTable::C_TABLE ;
        $this->fldid    = ProspectDocumentTable::C_ID ;       
        $this->flddesc  = ProspectDocumentTable::C_NAME ;
    }
    function __destruct() {
    }   
    
    function deleteProspectContact($id){
            $sql = "DELETE FROM " . ProspectDocumentTable::C_TABLE .
                    " WHERE " . ProspectDocumentTable::C_ID . " = " . $id;
        return $this->db->executeSql($sql);
    }

    function getMeetingAttachments($prospect_id, $conversation_id) {
        $sql = "SELECT * FROM " . ProspectDocumentTable::C_TABLE .
                " WHERE " . ProspectDocumentTable::C_ID . " = " . $prospect_id .
                " AND " . ProspectDocumentTable::C_CONVERSATION_ID . " = " . $conversation_id;
        $rows = $this->db->getTable($sql);
        return $rows;
    }
}
