dawarich/app/models/visit.rb

12 lines
282 B
Ruby
Raw Normal View History

2024-07-21 14:32:29 -04:00
# frozen_string_literal: true
class Visit < ApplicationRecord
belongs_to :area
belongs_to :user
has_many :points, dependent: :nullify
2024-07-24 14:25:16 -04:00
validates :started_at, :ended_at, :duration, :name, :status, presence: true
enum status: { pending: 0, confirmed: 1, declined: 2 }
2024-07-21 14:32:29 -04:00
end