This commit is contained in:
2026-01-21 03:10:48 +09:00
parent 86209dcc84
commit bbdcaa9ba3
5 changed files with 93 additions and 3 deletions
+2
View File
@@ -1,4 +1,6 @@
class PostSimilarity < ApplicationRecord
self.primary_key = :post_id, :target_post_id
belongs_to :post, class_name: 'Post', foreign_key: 'post_id'
belongs_to :target_post, class_name: 'Post', foreign_key: 'target_post_id'
end
+2
View File
@@ -1,4 +1,6 @@
class TagSimilarity < ApplicationRecord
self.primary_key = :tag_id, :target_tag_id
belongs_to :tag, class_name: 'Tag', foreign_key: 'tag_id'
belongs_to :target_tag, class_name: 'Tag', foreign_key: 'target_tag_id'
end