Class: LimitPointsAdjustment
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- LimitPointsAdjustment
- Defined in:
- app/models/limit_points_adjustment.rb
Overview
Schema Information
Table name: limit_points_adjustments
id :bigint not null, primary key
booking_limit_percent_spend :integer default(25)
booking_limit_points :integer default(1000)
deleted_at :datetime
ended_at :datetime
started_at :datetime
status :integer default("on_queue"), not null
user_limit_days :integer default(7)
user_limit_points :integer default(1000)
created_at :datetime not null
updated_at :datetime not null
Indexes
index_limit_points_adjustments_on_deleted_at (deleted_at)
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#started_at_cannot_be_in_the_past ⇒ Object
29 30 31 32 33 |
# File 'app/models/limit_points_adjustment.rb', line 29 def started_at_cannot_be_in_the_past if started_at.present? && started_at < Time.zone.now errors.add(:started_at, "can't be in the past") end end |