GameUserScore.php 573 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class GameUserScore extends Model
  6. {
  7. use HasFactory;
  8. const CREATED_AT = null;
  9. const UPDATED_AT = null;
  10. public function changeUser(){
  11. return $this->belongsTo(User::class, 'change_user_id', 'id');
  12. }
  13. public function holeData(){
  14. return $this->belongsTo(CourseHole::class, 'hole_id', 'id');
  15. }
  16. public function gameUser(){
  17. return $this->belongsTo(GameUser::class, 'game_user_id', 'id');
  18. }
  19. }