Files
redux-scraper/app/models/domain/user_post_creation.rb
2025-06-17 05:56:11 +00:00

16 lines
490 B
Ruby

class Domain::UserPostCreation < ReduxApplicationRecord
include AttrJsonRecordAliases
self.table_name = "domain_user_post_creations"
self.primary_key = %i[user_id post_id]
validates :user_id, uniqueness: { scope: :post_id }
belongs_to :post,
class_name: "::Domain::Post",
inverse_of: :user_post_creations
belongs_to :user,
class_name: "::Domain::User",
inverse_of: :user_post_creations,
counter_cache: true
end