forgeplus/app/models/project_package_apply.rb

19 lines
344 B
Ruby
Raw Normal View History

2020-03-09 00:40:16 +08:00
class ProjectPackageApply < ApplicationRecord
include AASM
belongs_to :project_package
aasm(:status) do
state :pending, initial: true
state :refused
state :agreed
event :refuse do
transitions from: :pending, to: :refused
end
event :agree do
transitions from: :pending, to: :agreed
end
end
end