summaryrefslogtreecommitdiffhomepage
path: root/app/models
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-05-15 00:44:53 -0400
committerrealtradam <[email protected]>2024-05-15 00:44:53 -0400
commitd2ad5924bce17e3b07ee0af86a8739559dac3b35 (patch)
tree4d7e4384d15e0617a4b380149c29ffaccbca69fa /app/models
parenta97531e77e9e3f0e391b2504fcb278cabc2b901e (diff)
downloadgameHolster-d2ad5924bce17e3b07ee0af86a8739559dac3b35.tar.gz
gameHolster-d2ad5924bce17e3b07ee0af86a8739559dac3b35.zip
begin implementing game file upload and also styling
Diffstat (limited to 'app/models')
-rw-r--r--app/models/game.rb8
-rw-r--r--app/models/user.rb1
2 files changed, 9 insertions, 0 deletions
diff --git a/app/models/game.rb b/app/models/game.rb
new file mode 100644
index 0000000..fbdc561
--- /dev/null
+++ b/app/models/game.rb
@@ -0,0 +1,8 @@
+class Game < ApplicationRecord
+ #enum status: {
+ # draft: 0,
+ # published: 1
+ #}
+ #belongs_to :user
+ has_one_attached :game_file
+end
diff --git a/app/models/user.rb b/app/models/user.rb
index 39c7822..0317c47 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,4 +1,5 @@
class User < ApplicationRecord
validates :identifier, presence: true
+ has_many :games
end