about summary refs log tree commit diff
path: root/app/models/sharekey.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/sharekey.rb')
-rw-r--r--app/models/sharekey.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/sharekey.rb b/app/models/sharekey.rb
new file mode 100644
index 000000000..baa1c20a0
--- /dev/null
+++ b/app/models/sharekey.rb
@@ -0,0 +1,13 @@
+# == Schema Information
+#
+# Table name: sharekeys
+#
+#  id        :bigint(8)        not null, primary key
+#  status_id :bigint(8)
+#  key       :string
+#
+
+class Sharekey < ApplicationRecord
+  belongs_to :status, inverse_of: :sharekey
+  validates_uniqueness_of :status_id
+end