mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Adding transactions
-Need to create a customers table to store contact information of customers who are not a user. -Need to scope "User Transactions" for users, staff, and admin. Need to have a "All Shop Transactions" tab. -Need to add conditional UX to form.
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
class CreateTransactions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :transactions do |t|
|
||||
t.integer "user_id", :null => false
|
||||
t.integer "vendor_id", :null => false
|
||||
t.integer "customer_id"
|
||||
t.integer "customer_type"
|
||||
t.integer "bike_id"
|
||||
t.integer "amount", :null => false
|
||||
t.string "item", :null => false
|
||||
#Adding whether or not a user sold or purchased the bike
|
||||
#could be used to help keep track of external sales.
|
||||
#aka, a collective member (user) sold a bike to
|
||||
@@ -11,6 +14,7 @@ class CreateTransactions < ActiveRecord::Migration
|
||||
#Currently this model automatically assumes that the user is
|
||||
#purchasing a bike, or a part for a bike from the collective
|
||||
#t.boolean "user_sold_flag", :default => false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user