|
|
|
@ -19,13 +19,13 @@ class Log < ApplicationRecord
|
|
|
|
|
"deleted" => 4, |
|
|
|
|
}.freeze |
|
|
|
|
enum :status, STATUS |
|
|
|
|
enum :status_cache, STATUS, _prefix: true |
|
|
|
|
enum :status_cache, STATUS, prefix: true |
|
|
|
|
|
|
|
|
|
CREATION_METHOD = { |
|
|
|
|
"single log" => 1, |
|
|
|
|
"bulk upload" => 2, |
|
|
|
|
}.freeze |
|
|
|
|
enum :creation_method, CREATION_METHOD, _prefix: true |
|
|
|
|
enum :creation_method, CREATION_METHOD, prefix: true |
|
|
|
|
|
|
|
|
|
scope :visible, -> { where(status: %w[not_started in_progress completed]) } |
|
|
|
|
scope :exportable, -> { where(status: %w[not_started in_progress completed deleted]) } |
|
|
|
|