22 lines
470 B
Ruby
22 lines
470 B
Ruby
# frozen_string_literal: true
|
|
|
|
class WowGeoPosition < ApplicationRecord
|
|
belongs_to :wow_geo_map
|
|
belongs_to :wow_geo_zone
|
|
|
|
has_one(
|
|
:last_position_character,
|
|
class_name: 'WowCharacter',
|
|
foreign_key: 'last_position_id',
|
|
inverse_of: :last_position,
|
|
dependent: :destroy
|
|
)
|
|
has_one(
|
|
:bind_position_character,
|
|
class_name: 'WowCharacter',
|
|
foreign_key: 'bind_position_id',
|
|
inverse_of: :bind_position,
|
|
dependent: :destroy
|
|
)
|
|
end
|