#
class Lead < ApplicationRecord
  validates :name,         presence: true
  validates :whatsapp,     presence: true
  validates :region,       presence: true
  validates :interest_ids, presence: true
  validates :state_id,     presence: true, if: proc { |o| o.sv? }
  # validates :terms,        acceptance: { accept: true }

  belongs_to :state, optional: true
  has_and_belongs_to_many :interests

  enum gender: %i[female male]
  enum region: %i[sv us eu]
end
