educoder/app/models/shixun_mirror_repository.rb

7 lines
240 B

6 years ago
class ShixunMirrorRepository < ApplicationRecord
belongs_to :shixun
belongs_to :mirror_repository
validates_uniqueness_of :shixun_id, :scope => :mirror_repository_id
5 years ago
validates_presence_of :shixun_id, :mirror_repository_id
6 years ago
end