implement players

This commit is contained in:
2024-09-12 19:06:02 -07:00
parent c7df3aacfe
commit 6040c7aaf2
10 changed files with 94 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
module EuchreCamp
module Persistence
module Relations
class Players < ROM::Relation[:sql]
schema(:players, infer: true)
end
end
end
end
@@ -0,0 +1,17 @@
module EuchreCamp
module Persistence
module Repositories
class Player < ROM::Repository[:players]
commands :create, update: :by_pk, delete: :by_pk
def all
players.to_a
end
def find(id)
players.by_pk(id).one!
end
end
end
end
end