Files
amb_wechatapp/application/api/model/course/Group.php
T

38 lines
604 B
PHP

<?php
namespace app\api\model\course;
use think\Model;
class Group extends Model
{
// 表名
protected $name = 'course_group';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function getList(){
return self::where([
'status'=>1
])
->order('sort','asc')->order('createtime','desc')->select();
}
}