<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CourseUser extends Model
{
    use HasFactory, HasDateTimeFormatter;

    public function user()
    {
        return $this->belongsTo(User::class,'user_id','id');
    }

    //关联比赛场地
    public function course()
    {
        return $this->belongsTo(Course::class, 'course_id', 'id');
    }
}
