Files

39 lines
796 B
PHP

<?php
namespace app\common\model\goods;
use think\Model;
use app\common\exception\Exception;
/**
* 商品-课程
*/
class Course extends Model
{
protected $model;
public function __construct($data = [])
{
$this->model = new \app\admin\model\course\Course();
$this->columnBindModel = new \app\admin\model\course\ColumnBind();
$this->groupBindModel = new \app\admin\model\course\GroupBind();
}
/**
* 获取课程详情
* @param $id
* @return mixed
*/
public function getDetail($id){
$row = $this->model->field(['id','name','cover','status','price','price_marking','pay_type','sales','type','sales_type'])->find($id);
if (!$row) {
return false;
}
return $row;
}
}