ProtocolAdded::dispatch($protocol);
}
+ public static function roundEdited(Tournament $tournament, Round $round, User $user) {
+ $protocol = static::create([
+ 'tournament_id' => $tournament->id,
+ 'user_id' => $user->id,
+ 'type' => 'round.edit',
+ 'details' => [
+ 'tournament' => static::tournamentMemo($tournament),
+ 'round' => static::roundMemo($round),
+ ],
+ ]);
+ ProtocolAdded::dispatch($protocol);
+ }
+
public static function roundLocked(Tournament $tournament, Round $round, User $user = null) {
$protocol = static::create([
'tournament_id' => $tournament->id,
ProtocolAdded::dispatch($protocol);
}
+ public static function tournamentDiscord(Tournament $tournament, User $user = null) {
+ $protocol = static::create([
+ 'tournament_id' => $tournament->id,
+ 'user_id' => $user ? $user->id : null,
+ 'type' => 'tournament.discord',
+ 'details' => [
+ 'tournament' => static::tournamentMemo($tournament),
+ ],
+ ]);
+ ProtocolAdded::dispatch($protocol);
+ }
+
+ public static function tournamentDiscordSettings(Tournament $tournament, User $user = null) {
+ $protocol = static::create([
+ 'tournament_id' => $tournament->id,
+ 'user_id' => $user ? $user->id : null,
+ 'type' => 'tournament.discordSettings',
+ 'details' => [
+ 'tournament' => static::tournamentMemo($tournament),
+ ],
+ ]);
+ ProtocolAdded::dispatch($protocol);
+ }
+
public static function tournamentLocked(Tournament $tournament, User $user = null) {
$protocol = static::create([
'tournament_id' => $tournament->id,
ProtocolAdded::dispatch($protocol);
}
- public static function tournamentOpenen(Tournament $tournament, User $user = null) {
+ public static function tournamentOpened(Tournament $tournament, User $user = null) {
$protocol = static::create([
'tournament_id' => $tournament->id,
'user_id' => $user ? $user->id : null,
ProtocolAdded::dispatch($protocol);
}
+ public static function tournamentSettings(Tournament $tournament, User $user = null) {
+ $protocol = static::create([
+ 'tournament_id' => $tournament->id,
+ 'user_id' => $user ? $user->id : null,
+ 'type' => 'tournament.settings',
+ 'details' => [
+ 'tournament' => static::tournamentMemo($tournament),
+ ],
+ ]);
+ ProtocolAdded::dispatch($protocol);
+ }
+
public static function tournamentUnlocked(Tournament $tournament, User $user = null) {
$protocol = static::create([
'tournament_id' => $tournament->id,
protected $casts = [
'details' => 'array',
+ 'user_id' => 'string',
];
protected $fillable = [