2024-09-25 15:05:09 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ProcedureLabel < ApplicationRecord
|
|
|
|
belongs_to :procedure
|
2024-09-25 16:03:58 +02:00
|
|
|
has_many :dossier_labels, dependent: :destroy
|
2024-09-25 15:05:09 +02:00
|
|
|
|
2024-09-25 15:08:10 +02:00
|
|
|
GENERIC_LABELS = [
|
|
|
|
{ name: 'à relancer', color: 'brown-caramel' },
|
|
|
|
{ name: 'complet', color: 'green-bourgeon' },
|
|
|
|
{ name: 'prêt pour validation', color: 'green-archipel' }
|
|
|
|
]
|
|
|
|
|
2024-09-25 15:05:09 +02:00
|
|
|
validates :name, :color, presence: true
|
|
|
|
end
|