scinote-web/app/models/team_repository.rb

12 lines
296 B
Ruby
Raw Normal View History

2019-07-11 21:40:20 +08:00
# frozen_string_literal: true
class TeamRepository < ApplicationRecord
enum permission_level: Extends::SHARED_INVENTORIES_PERMISSION_LEVELS
belongs_to :team
belongs_to :repository
validates :permission_level, presence: true
validates :repository, uniqueness: { scope: :team_id }
2019-07-11 21:40:20 +08:00
end