summaryrefslogtreecommitdiff
path: root/lib/chessh/schema/player.ex
diff options
context:
space:
mode:
authorElizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz>2023-05-29 16:28:27 -0700
committerGitHub <noreply@github.com>2023-05-29 16:28:27 -0700
commiteec32aa38a8762eccc8575a37a628bd5ae2cc1d0 (patch)
tree27f656780f5d25325c9ac0ec3db3557d774bf414 /lib/chessh/schema/player.ex
parent8a5a2f358cb1f63a255b2daf6908536583986448 (diff)
downloadchessh-eec32aa38a8762eccc8575a37a628bd5ae2cc1d0.tar.gz
chessh-eec32aa38a8762eccc8575a37a628bd5ae2cc1d0.zip
Bots (#23)
* squash all the things for bots * fix warnings * change colors a bit and README updates * fix frontend warnings
Diffstat (limited to 'lib/chessh/schema/player.ex')
-rw-r--r--lib/chessh/schema/player.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chessh/schema/player.ex b/lib/chessh/schema/player.ex
index dcb3548..d5bcab2 100644
--- a/lib/chessh/schema/player.ex
+++ b/lib/chessh/schema/player.ex
@@ -1,7 +1,7 @@
defmodule Chessh.Player do
use Ecto.Schema
import Ecto.Changeset
- alias Chessh.{Key, Game}
+ alias Chessh.{Key, Game, Bot}
@derive {Inspect, except: [:password]}
schema "players" do
@@ -17,6 +17,7 @@ defmodule Chessh.Player do
has_many(:keys, Key)
has_many(:light_games, Game, foreign_key: :light_player_id, references: :id)
has_many(:dark_games, Game, foreign_key: :dark_player_id, references: :id)
+ has_many(:bots, Bot, foreign_key: :player_id, references: :id)
timestamps()
end