作者 lyh

gx

... ... @@ -13,22 +13,20 @@ class Product extends Base
{
//设置关联表名
protected $table = 'gl_product';
//连接数据库
protected $connection = '';
const STATUS_DRAFT = 0;
const STATUS_ON = 1;
const STATUS_RECYCLE = 2;
protected $connection;
public function __construct($project_id)
{
// 设置数据信息
$project = ProjectServer::useProject($project_id);
if(empty($project)){
return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'数据库未配置']);
}
$this->connection = 'custom_mysql';
}
public static function statusMap(){
return [
self::STATUS_DRAFT => '草稿',
... ...