mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-09 06:24:04 +08:00
init project
This commit is contained in:
19
app/models/project_package_apply.rb
Normal file
19
app/models/project_package_apply.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
Reference in New Issue
Block a user