Class: ReviewsIoImage
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ReviewsIoImage
- Defined in:
- app/models/reviews_io_image.rb
Overview
Join model linking ReviewsIo records to imported Image records.
Tracks which external photo URL was imported, enabling idempotent re-imports.
== Schema Information
Table name: reviews_io_images
Database name: primary
id :bigint not null, primary key
source_url :string not null
created_at :datetime not null
updated_at :datetime not null
image_id :bigint not null
reviews_io_id :bigint not null
Indexes
index_reviews_io_images_on_image_id (image_id)
index_reviews_io_images_on_reviews_io_id_and_image_id (reviews_io_id,image_id) UNIQUE
index_reviews_io_images_on_source_url (source_url)
Foreign Keys
fk_rails_... (image_id => digital_assets.id)
fk_rails_... (reviews_io_id => reviews_io.id)
Instance Attribute Summary collapse
- #image_id ⇒ Object readonly
- #source_url ⇒ Object readonly
Belongs to collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Instance Attribute Details
#image_id ⇒ Object (readonly)
33 |
# File 'app/models/reviews_io_image.rb', line 33 validates :image_id, uniqueness: { scope: :reviews_io_id } |
#source_url ⇒ Object (readonly)
32 |
# File 'app/models/reviews_io_image.rb', line 32 validates :source_url, presence: true |