2020-07-01 06:39:02 +02:00
|
|
|
class TaskRequest < ApplicationRecord
|
|
|
|
|
belongs_to :project
|
|
|
|
|
has_many_attached :files
|
|
|
|
|
|
|
|
|
|
enum status: [:pending, :completed, :cancelled]
|
|
|
|
|
|
|
|
|
|
scope :order_by_recent, -> { order(created_at: :desc) }
|
|
|
|
|
|
2020-07-20 13:28:40 +00:00
|
|
|
validates :time_allowed, numericality: { only_integer: true, greater_than_or_equal_to: 2 }, allow_blank: true
|
2020-07-01 06:39:02 +02:00
|
|
|
end
|