You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
439 B
12 lines
439 B
class MirrorRepository < ApplicationRecord
|
|
has_many :shixun_mirror_repositories, :dependent => :destroy
|
|
has_many :shixun, :through => :shixun_mirror_repositories
|
|
has_many :mirror_scripts, :dependent => :destroy
|
|
|
|
|
|
|
|
scope :published_mirror, -> { where(status: 1) }
|
|
scope :published_main_mirror, -> { published_mirror.where(main_type: 1) }
|
|
scope :published_small_mirror, -> { published_mirror.where(main_type: 0) }
|
|
end
|