mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 10:19:45 +02:00
16 lines
409 B
Ruby
16 lines
409 B
Ruby
module Legacy
|
|
class Contact < Db
|
|
IDENT_TYPE_MAP = {
|
|
2 => ::Contact::PRIV,
|
|
3 => ::Contact::PASSPORT,
|
|
4 => ::Contact::ORG,
|
|
6 => ::Contact::BIRTHDAY
|
|
}
|
|
|
|
self.table_name = :contact
|
|
belongs_to :object_registry, foreign_key: :id
|
|
belongs_to :object, foreign_key: :id
|
|
|
|
has_one :object_state, -> { where('valid_to IS NULL') }, foreign_key: :object_id
|
|
end
|
|
end
|