Sha256: 691ce4028605109f2da23777fe58d8f3f7514d39d013425b3920862e1961c9bc

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

require 'model'
require 'models/build'
require 'models/request'
require 'models/permission'
require 'models/star'

# Repository model
class Repository < Model
  belongs_to :owner, polymorphic: true
  belongs_to :current_build, foreign_key: :current_build_id, class_name: 'Build'
  belongs_to :last_build, foreign_key: :last_build_id, class_name: 'Build'
  has_many :builds, -> { order('id') }
  has_many :requests, -> { order('id') }, dependent: :destroy
  has_many :jobs
  has_many :branches
  has_many :ssl_keys
  has_many :commits
  has_many :permissions
  has_many :stars
  has_many :pull_requests
  has_many :tags

  self.table_name = 'repositories'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
travis-backup-0.3.0 lib/models/repository.rb