X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FProtocol.php;fp=app%2FModels%2FProtocol.php;h=8adc5456474352562c4cbbb36503dacc2cf8e5ca;hb=a907ef7c6676fef11f42933b2d79bdd496b20122;hp=e182c0885ae6e07e2f8bb12698b8c51adda64424;hpb=06fd14404164904304a20e2280037e83299247fa;p=alttp.git diff --git a/app/Models/Protocol.php b/app/Models/Protocol.php index e182c08..8adc545 100644 --- a/app/Models/Protocol.php +++ b/app/Models/Protocol.php @@ -36,6 +36,19 @@ class Protocol extends Model ProtocolAdded::dispatch($protocol); } + public static function roundSeedSet(Tournament $tournament, Round $round, User $user) { + $protocol = static::create([ + 'tournament_id' => $tournament->id, + 'user_id' => $user->id, + 'type' => 'round.create', + 'details' => [ + 'tournament' => static::tournamentMemo($tournament), + 'round' => static::roundMemo($round), + ], + ]); + ProtocolAdded::dispatch($protocol); + } + public static function tournamentCreated(Tournament $tournament, User $user) { $protocol = static::create([ 'tournament_id' => $tournament->id,