<?php
/**
 * ===========================================================================
 * Veitool 快捷开发框架系统
 * Author: Niaho 26843818@qq.com
 * Copyright (c)2019-2025 www.veitool.com All rights reserved.
 * Licensed: 这不是一个自由软件，不允许对程序代码以任何形式任何目的的再发行
 * ---------------------------------------------------------------------------
 */

namespace app\model;

use app\model\project\User;
use think\facade\Db;
use think\Model;

/**
 * 课程模型
 */
class UserExpLog extends Model
{
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';


    //用户信息
    public function getuserdata()
    {
        return $this->belongsTo(User::class, 'user_id')
            ->field('username,mobile,id');
    }

    //规则学习
    public function getruledata()
    {
        return $this->belongsTo(UserExpRule::class, 'rule_id')
            ->field('event,action,id');
    }
}