You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
390 B
20 lines
390 B
5 years ago
|
class BiddingUser < ActiveRecord::Base
|
||
|
include AASM
|
||
|
|
||
|
belongs_to :user
|
||
|
belongs_to :project_package, counter_cache: true
|
||
|
|
||
|
aasm(:status) do
|
||
|
state :pending, initiali: true
|
||
|
state :bidding_won
|
||
|
state :bidding_lost
|
||
|
|
||
|
event :win do
|
||
|
transitions from: [:pending], to: :bid_won
|
||
|
end
|
||
|
|
||
|
event :lose do
|
||
|
transitions from: [:pending], to: :bid_lost
|
||
|
end
|
||
|
end
|
||
|
end
|