<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CourseField extends Model
{
    use HasFactory;

    const CREATED_AT = null;
    const UPDATED_AT = null;

    public static $baseHoleList = [
        ['sort' => 1, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 2, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 3, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 4, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 5, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 6, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 7, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 8, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0],
        ['sort' => 9, 'par' => 4, 'difficulty' => 10, 'gold_dis' => 0, 'blue_dis' => 0, 'white_dis' => 0, 'red_dis' => 0]
    ];

    public function __construct()
    {
        //$this->hole_list = self::$baseHoleList;
    }

    public function course()
    {
        return $this->belongsTo(Course::class, 'course_id', 'id');
    }
}
