6 changed files with 274 additions and 5 deletions
@ -0,0 +1,42 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | Niucloud-admin 企业快速开发的多应用管理平台 |
|||
// +---------------------------------------------------------------------- |
|||
// | 官方网址:https://www.niucloud.com |
|||
// +---------------------------------------------------------------------- |
|||
// | niucloud团队 版权所有 开源版本可自由商用 |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: Niucloud Team |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
namespace app\api\controller\apiController; |
|||
|
|||
use app\Request; |
|||
use app\service\api\apiService\CourseService; |
|||
use core\base\BaseApiService; |
|||
|
|||
|
|||
/** |
|||
* 客户资源相关接口 |
|||
* Class Personnel |
|||
* @package app\api\controller\apiController |
|||
*/ |
|||
class ClassSpi extends BaseApiService |
|||
{ |
|||
|
|||
//课程列表 |
|||
public function jlClassList(Request $request){ |
|||
$id = $this->member_id; |
|||
dd(111); |
|||
return success((new CourseService())->list($id,$data)); |
|||
} |
|||
|
|||
//获取课程详情 |
|||
public function courseInfo(Request $request){ |
|||
$data = $this->request->params([ |
|||
["id",0] |
|||
]); |
|||
return success('SUCCESS',(new CourseService())->info($data['id'])); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | Niucloud-admin 企业快速开发的多应用管理平台 |
|||
// +---------------------------------------------------------------------- |
|||
// | 官方网址:https://www.niucloud.com |
|||
// +---------------------------------------------------------------------- |
|||
// | niucloud团队 版权所有 开源版本可自由商用 |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: Niucloud Team |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
namespace app\model\Assignment; |
|||
|
|||
use core\base\BaseModel; |
|||
use think\model\concern\SoftDelete; |
|||
use think\model\relation\HasMany; |
|||
use think\model\relation\HasOne; |
|||
use app\model\student\Student; |
|||
use app\model\customer_resources\CustomerResources; |
|||
/** |
|||
* 校区模型 |
|||
* Class Campus |
|||
* @package app\model\campus |
|||
*/ |
|||
class Assignment extends BaseModel |
|||
{ |
|||
|
|||
use SoftDelete; |
|||
|
|||
/** |
|||
* 数据表主键 |
|||
* @var string |
|||
*/ |
|||
protected $pk = 'id'; |
|||
|
|||
/** |
|||
* 模型名称 |
|||
* @var string |
|||
*/ |
|||
protected $name = 'assignment'; |
|||
|
|||
/** |
|||
* 定义软删除标记字段. |
|||
* @var string |
|||
*/ |
|||
protected $deleteTime = 'deleted_at'; |
|||
|
|||
/** |
|||
* 定义软删除字段的默认值. |
|||
* @var int |
|||
*/ |
|||
protected $defaultSoftDelete = 0; |
|||
|
|||
|
|||
|
|||
public function student() |
|||
{ |
|||
return $this->hasOne(Student::class, 'id', 'student_id'); |
|||
} |
|||
|
|||
} |
|||
Loading…
Reference in new issue