Sha256: 067d47947ff5bd4b480f0f3c709e021e23d2775074a92df60bff58262d40f941

Contents?: true

Size: 989 Bytes

Versions: 27

Compression:

Stored size: 989 Bytes

Contents

class ::Gameui::Marker
  include Mongoid::Document
  include Mongoid::Timestamps

  belongs_to :map, :class_name => '::Gameui::Map'

  field :slug
  validates :slug, uniqueness: true, presence: true

  field :w, type: Integer
  validates :w, presence: true
  field :h, type: Integer
  validates :h, presence: true
  field :x, type: Integer
  validates :x, presence: true
  field :y, type: Integer
  validates :y, presence: true

  field :img_path
  validates :img_path, presence: true
  field :title_img_path
  validates :title_img_path, presence: true

  field :description

  field :is_active, type: Boolean, default: true
  field :deleted_at, type: Time, default: nil

  field :name, type: String
  validates :name, presence: true

  field :ordering, type: String, default: 'jjj'

  ITEM_TYPE_LOCATION = 'gameui-location'
  ITEM_TYPE_MAP = 'gameui-map'
  ITEM_TYPES = [ ITEM_TYPE_LOCATION, ITEM_TYPE_MAP ]
  field :item_type, type: String
  validates :item_type, presence: true


end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ish_models-0.0.33.132 lib/gameui/marker.rb
ish_models-0.0.33.131 lib/gameui/marker.rb
ish_models-0.0.33.130 lib/gameui/marker.rb
ish_models-0.0.33.129 lib/gameui/marker.rb
ish_models-0.0.33.128 lib/gameui/marker.rb
ish_models-0.0.33.127 lib/gameui/marker.rb
ish_models-0.0.33.124 lib/gameui/marker.rb
ish_models-0.0.33.123 lib/gameui/marker.rb
ish_models-0.0.33.122 lib/gameui/marker.rb
ish_models-0.0.33.121 lib/gameui/marker.rb
ish_models-0.0.33.120 lib/gameui/marker.rb
ish_models-0.0.33.119 lib/gameui/marker.rb
ish_models-0.0.33.118 lib/gameui/marker.rb
ish_models-0.0.33.117 lib/gameui/marker.rb
ish_models-0.0.33.116 lib/gameui/marker.rb
ish_models-0.0.33.115 lib/gameui/marker.rb
ish_models-0.0.33.114 lib/gameui/marker.rb
ish_models-0.0.33.113 lib/gameui/marker.rb
ish_models-0.0.33.112 lib/gameui/marker.rb
ish_models-0.0.33.111 lib/gameui/marker.rb