educoder/app/models/watch_video_history.rb

8 lines
207 B

class WatchVideoHistory < ApplicationRecord
belongs_to :user
belongs_to :video
belongs_to :watch_course_video, optional: true
validates :duration, numericality: { greater_than_or_equal_to: 0 }
end