Sha256: 424e175908ae0203fdfc8a0e465c46c72c2ffaa082a3c7218c093622aca2977b

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

module PUNK
  # @model
  # @property id(required) [string] a unique identifier for the tenant
  # @property name(required) [string] the name of the tenant
  # @property icon(required) [string] an image URL
  class Tenant < PUNK::Model
    alias_method :to_s, :name

    many_to_many :users
    one_to_many :groups

    def validate
      validates_presence :name
      validates_url :icon, allow_blank: true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
punk-0.4.1 lib/punk/models/tenant.rb