AgentUserTaskCompletion.php 777 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class AgentUserTaskCompletion extends Model
  5. {
  6. /**
  7. * 数据库连接名
  8. */
  9. protected $connection = 'mysql';
  10. /**
  11. * 与模型关联的表名
  12. */
  13. protected $table = 'webgame.agent_user_task_completion';
  14. /**
  15. * 可批量赋值的属性
  16. */
  17. protected $fillable = [
  18. 'UserID',
  19. 'task_id',
  20. 'taskid',
  21. 'completed',
  22. 'completed_at'
  23. ];
  24. /**
  25. * 获取用户
  26. */
  27. public function user()
  28. {
  29. // return $this->belongsTo(User::class, 'UserID', 'id');
  30. }
  31. /**
  32. * 获取任务
  33. */
  34. public function task()
  35. {
  36. // return $this->belongsTo(AgentTask::class, 'task_id', 'id');
  37. }
  38. }