AbstractModel.class.php
1 KB
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
<?php
/**
* AbstractModel.class.php
* Model 层基类
* @author: zhuxun37
* @version: $Id$
* @copyright: vchangyi.com
*/
namespace Common\Model;
abstract class AbstractModel extends \Com\Model
{
/**
* 维护表名,主要用处是连表查询的时候避免表名的硬编码。
*/
protected $_tb_article = '';
protected $_tb_attach = '';
protected $_tb_class = '';
protected $_tb_like = '';
protected $_tb_read = '';
protected $_tb_right = '';
protected $_tb_favorite = '';
// 构造方法
public function __construct()
{
parent::__construct();
/*$this->_tb_arctic = cfg('DB_PREFIX') . 'article';
$this->_tb_attach = cfg('DB_PREFIX') . 'attach';
$this->_tb_class = cfg('DB_PREFIX') . 'class';
$this->_tb_like = cfg('DB_PREFIX') . 'like';
$this->_tb_read = cfg('DB_PREFIX') . 'read';
$this->_tb_right = cfg('DB_PREFIX') . 'right';
$this->_tb_favorite = cfg('DB_PREFIX') . 'favorite';*/
}
}