Class: ReviewsIoVideo
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ReviewsIoVideo
- Defined in:
- app/models/reviews_io_video.rb
Overview
Join model linking ReviewsIo records to imported Video records.
Tracks which external video URL was imported, enabling idempotent re-imports.
== Schema Information
Table name: reviews_io_videos
Database name: primary
id :bigint not null, primary key
source_url :string not null
created_at :datetime not null
updated_at :datetime not null
reviews_io_id :bigint not null
video_id :bigint not null
Indexes
index_reviews_io_videos_on_reviews_io_id_and_video_id (reviews_io_id,video_id) UNIQUE
index_reviews_io_videos_on_source_url (source_url)
index_reviews_io_videos_on_video_id (video_id)
Foreign Keys
fk_rails_... (reviews_io_id => reviews_io.id)
fk_rails_... (video_id => digital_assets.id)
Constant Summary
Constants included from Models::Schedulable
Models::Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
-
#source_url ⇒ String
External video URL.
-
#video_id ⇒ Integer
Foreign key to the imported video asset.
Belongs to collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#source_url ⇒ String
Returns External video URL.
36 |
# File 'app/models/reviews_io_video.rb', line 36 validates :source_url, presence: true |
#video_id ⇒ Integer
Returns Foreign key to the imported video asset.
39 |
# File 'app/models/reviews_io_video.rb', line 39 validates :video_id, uniqueness: { scope: :reviews_io_id } |