car4s/application/common/model/user4s/Goodlog.php

51 lines
792 B
PHP

<?php
namespace app\common\model\user4s;
use think\Model;
use traits\model\SoftDelete;
class Goodlog extends Model
{
use SoftDelete;
// 表名
protected $name = 'user4s_goodlog';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
];
public function user()
{
return $this->belongsTo('User', 'user4s_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function admin()
{
return $this->belongsTo('app\common\model\Admin', 'admin_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}