|
|
|
@ -51,6 +51,10 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
end |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
scope :search_by_id, ->(id) { where(id: id) } |
|
|
|
|
scope :search_by_tenant_code, ->(code) { where(tenant_code: code) } |
|
|
|
|
scope :search_by, ->(param) { search_by_id(param.to_i).or(search_by_tenant_code(param)) } |
|
|
|
|
|
|
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
|
OPTIONAL_FIELDS = %w[first_time_property_let_as_social_housing tenant_code propcode].freeze |
|
|
|
|
RENT_TYPE_MAPPING = { 0 => 1, 1 => 2, 2 => 2, 3 => 3, 4 => 3, 5 => 3 }.freeze |
|
|
|
|