| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class AgentUserTaskCompletion extends Model
- {
- /**
- * 数据库连接名
- */
- protected $connection = 'mysql';
- /**
- * 与模型关联的表名
- */
- protected $table = 'webgame.agent_user_task_completion';
- /**
- * 可批量赋值的属性
- */
- protected $fillable = [
- 'UserID',
- 'task_id',
- 'taskid',
- 'completed',
- 'completed_at'
- ];
- /**
- * 获取用户
- */
- public function user()
- {
- // return $this->belongsTo(User::class, 'UserID', 'id');
- }
- /**
- * 获取任务
- */
- public function task()
- {
- // return $this->belongsTo(AgentTask::class, 'task_id', 'id');
- }
- }
|