initial data model implementation

This commit is contained in:
2026-01-22 13:47:01 +01:00
parent bf2f9e9af7
commit c2436fab13
101 changed files with 2667 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
class Entry < ApplicationRecord
belongs_to :created_by, class_name: "User", optional: true
belongs_to :updated_by, class_name: "User", optional: true
has_many :suggested_meanings, dependent: :destroy
has_many :comments, as: :commentable, dependent: :destroy
has_many :entry_versions, dependent: :destroy
enum category: {
word: 0,
phrase: 1,
name: 2,
title: 3,
reference: 4,
other: 5
}
validates :category, presence: true
end