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

37 lines
706 B
PHP

<?php
namespace app\api\model\course;
use think\Model;
class ColumnBind extends Model
{
// 表名
protected $name = 'course_bind_column';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function course()
{
return $this->belongsTo('Course', 'course_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function column()
{
return $this->belongsTo('Course', 'column_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}