'array', 'description' => 'array', 'is_mcr' => 'boolean', 'is_test' => 'boolean', 'is_sixhr' => 'boolean', 'is_active' => 'boolean', 'duration' => 'integer', 'logs_deadline_days' => 'integer', 'rule_set_id' => 'integer', // 'start_time' => 'string', // pokud chceš čistý string; pro fancy práci s časem můžeš dát vlastní cast ]; public function ruleSet(): BelongsTo { return $this->belongsTo(EvaluationRuleSet::class, 'rule_set_id'); } public function rounds(): HasMany { return $this->hasMany(Round::class, 'contest_id') ->orderByDesc('start_time') ->orderByDesc('end_time'); } public function parameters(): HasMany { return $this->hasMany(ContestParameter::class, 'contest_id'); } public function bands(): BelongsToMany { return $this->belongsToMany(Band::class, 'contests_bands', 'contest_id', 'band_id'); } public function categories(): BelongsToMany { return $this->belongsToMany(Category::class, 'contests_categories', 'contest_id', 'category_id'); } public function powerCategories(): BelongsToMany { return $this->belongsToMany(PowerCategory::class, 'contests_power_categories', 'contest_id', 'power_category_id'); } }