54 lines
856 B
PHP
54 lines
856 B
PHP
<?php
|
|
|
|
namespace app\admin\model\zy;
|
|
|
|
use think\Model;
|
|
|
|
|
|
class Activity extends Model
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
// 表名
|
|
protected $table = 'zy_activity';
|
|
|
|
// 自动写入时间戳字段
|
|
protected $autoWriteTimestamp = false;
|
|
|
|
// 定义时间戳字段名
|
|
protected $createTime = false;
|
|
protected $updateTime = false;
|
|
protected $deleteTime = false;
|
|
|
|
// 追加属性
|
|
protected $append = [
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function stadium()
|
|
{
|
|
return $this->belongsTo('Stadium', 'gym_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
|
|
|
|
public function club()
|
|
{
|
|
return $this->belongsTo('Club', 'club_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('app\admin\model\User', 'referee', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
}
|