FollowUser.php
637 字节
<?php
namespace addons\qyexternal\model;
use think\Model;
class FollowUser extends Model
{
//数据库
protected $connection = 'database';
// 表名
protected $name = 'qywx_follow_user';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
public function corp()
{
return $this->hasOne('Corp', "corp_id", "corp_id");
}
public function behavior()
{
return $this->hasMany('UserBehavior', 'fid');
}
}