AbstractModel.class.php
938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* AbstractModel.class.php
* Model 层基类
* @author : zhuxun37
* @version : $Id$
* @copyright: vchangyi.com
*/
namespace Common\Model;
abstract class AbstractModel extends \Com\Model
{
/**
* 维护表名,主要用处是连表查询的时候避免表名的硬编码。
*/
protected $_tb_attr = '';
protected $_tb_import_record = '';
protected $_tb_rightTable = '';
/**
* 消息状态:保密
*/
const IS_SECRET = 1;
/**
* 消息状态:不保密
*/
const NO_SECRET = 0;
// 构造方法
public function __construct()
{
$this->_table_prefix = cfg('DB_PREFIX') . 'contact_';
parent::__construct();
$this->_tb_attr = cfg('DB_PREFIX') . 'contact_attr';
$this->_tb_import_record = cfg('DB_PREFIX') . 'import_record';
$this->_tb_rightTable = cfg('DB_PREFIX') . 'contact_invite_user_right';
}
}