Sha256: 9e4fafae5d7c4a9b95943b9e08da71862da287a7e788b56be4774628331edd66
Contents?: true
Size: 740 Bytes
Versions: 87
Compression:
Stored size: 740 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/transplants" module Renalware module Transplants class DonorStage < ApplicationRecord include Accountable include PatientScope belongs_to :patient, class_name: "Renalware::Patient", touch: true belongs_to :stage_position, class_name: "DonorStagePosition" belongs_to :stage_status, class_name: "DonorStageStatus" validates :patient, presence: true validates :stage_position, presence: true validates :stage_status, presence: true validates :started_on, presence: true scope :current, -> { where(terminated_on: nil) } scope :ordered, -> { order(terminated_on: :desc, started_on: :desc) } end end end
Version data entries
87 entries across 87 versions & 1 rubygems