Files

57 lines
904 B
PHP

<?php
namespace app\admin\model\app\exchange;
use think\Model;
class UseLog extends Model
{
// 表名
protected $name = 'app_exchange_use_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function batch()
{
return $this->belongsTo('Batch', 'batch_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function course()
{
return $this->belongsTo('app\admin\model\Course', 'goods_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}