mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 07:01:58 +08:00
11 lines
296 B
Ruby
11 lines
296 B
Ruby
# 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 }
|
|
end
|