summaryrefslogtreecommitdiff
path: root/lib/chessh/schema/game.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chessh/schema/game.ex')
-rw-r--r--lib/chessh/schema/game.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chessh/schema/game.ex b/lib/chessh/schema/game.ex
index 55b9ea4..868fec8 100644
--- a/lib/chessh/schema/game.ex
+++ b/lib/chessh/schema/game.ex
@@ -12,6 +12,8 @@ defmodule Chessh.Game do
field(:winner, Ecto.Enum, values: [:light, :dark, :none], default: :none)
field(:status, Ecto.Enum, values: [:continue, :draw, :winner], default: :continue)
+ field(:game_moves, :string)
+
belongs_to(:light_player, Player, foreign_key: :light_player_id)
belongs_to(:dark_player, Player, foreign_key: :dark_player_id)
@@ -31,7 +33,8 @@ defmodule Chessh.Game do
:last_move,
:light_player_id,
:dark_player_id,
- :discord_thread_id
+ :discord_thread_id,
+ :game_moves
])
end
end