ProtocolAdded::dispatch($protocol);
}
+ public static function roundLocked(Tournament $tournament, Round $round, User $user = null) {
+ $protocol = static::create([
+ 'tournament_id' => $tournament->id,
+ 'user_id' => $user ? $user->id : null,
+ 'type' => 'round.lock',
+ 'details' => [
+ 'tournament' => static::tournamentMemo($tournament),
+ 'round' => static::roundMemo($round),
+ ],
+ ]);
+ ProtocolAdded::dispatch($protocol);
+ }
+
public static function roundSeedSet(Tournament $tournament, Round $round, User $user) {
$protocol = static::create([
'tournament_id' => $tournament->id,
protected static function resultMemo(Result $result) {
return [
'id' => $result->id,
+ 'forfeit' => $result->forfeit,
'time' => $result->time,
];
}