mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
Tiny refactor
This commit is contained in:
parent
3c4d5867a3
commit
5dff6a4156
@ -10,6 +10,7 @@ defmodule Chess.Store.Game do
|
||||
|
||||
alias Chess.Board
|
||||
alias Chess.Store.Game
|
||||
alias Chess.Store.User
|
||||
alias Chess.GameState
|
||||
|
||||
schema "games" do
|
||||
@ -17,8 +18,8 @@ defmodule Chess.Store.Game do
|
||||
field :turn, :string, default: "white"
|
||||
field :state, :string
|
||||
|
||||
belongs_to :user, Chess.Store.User
|
||||
belongs_to :opponent, Chess.Store.User, references: :id
|
||||
belongs_to :user, User
|
||||
belongs_to :opponent, User, references: :id
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
defmodule Chess.GameTest do
|
||||
@moduledoc false
|
||||
|
||||
use Chess.DataCase
|
||||
|
||||
describe "game" do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user