Sha256: 54045d42a31094d1b61286725bafd388303f473cf7caeea5412c9de8c781eab8
Contents?: true
Size: 745 Bytes
Versions: 17
Compression:
Stored size: 745 Bytes
Contents
require_dependency "renalware/feeds" module Renalware module Feeds class File < ApplicationRecord include Accountable extend Enumerize validates :location, presence: true validates :status, presence: true validates :created_by, presence: true validates :file_type, presence: true belongs_to :file_type enum status: { waiting: 0, processing: 1, success: 2, failure: 3 } scope :ordered, ->{ order(created_at: :desc) } def self.build(location:, file_type:, user: SystemUser.find) new( location: location, file_type: file_type, status: :waiting, updated_by: user, created_by: user ) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems