File indexing completed on 2025-02-02 05:43:40
0001 <?php 0002 /** 0003 * ocs-apiserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-apiserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 class Application_Model_DbTable_Comments extends Local_Model_Table 0023 { 0024 0025 const COMMENT_ACTIVE = 1; 0026 const COMMENT_INACTIVE = 0; 0027 0028 const COMMENT_TYPE_PLING = 10; 0029 const COMMENT_TYPE_DONATION = 20; 0030 const COMMENT_TYPE_PRODUCT = 0; 0031 0032 protected $_name = "comments"; 0033 0034 protected $_keyColumnsForRow = array('comment_id'); 0035 0036 protected $_key = 'comment_id'; 0037 0038 protected $_defaultValues = array( 0039 'comment_type' => 0, 0040 'comment_parent_id' => 0, 0041 'comment_target_id' => null, 0042 'comment_member_id' => null, 0043 'comment_text' => null, 0044 'comment_created_at' => null, 0045 'comment_active' => null, 0046 'source_id' => 0, 0047 'source_pk' => null 0048 ); 0049 0050 /** 0051 * @param int $identifier 0052 * @return int 0053 */ 0054 public function setDelete($identifier) 0055 { 0056 return $this->delete($this->getAdapter()->quoteInto("$this->_key = ?", $identifier, 'INTEGER')); 0057 } 0058 0059 }