Added TicketScanning Model
This commit is contained in:
parent
93d5e360ca
commit
c066aadae2
4 changed files with 20 additions and 1 deletions
|
|
@ -3,4 +3,5 @@ class PhysicalTicket < ActiveRecord::Base
|
|||
has_one :ticket, through: :ticket_purchase
|
||||
has_one :conference, through: :ticket_purchase
|
||||
has_one :user, through: :ticket_purchase
|
||||
has_many :ticket_scannings
|
||||
end
|
||||
|
|
|
|||
3
app/models/ticket_scanning.rb
Normal file
3
app/models/ticket_scanning.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
class TicketScanning < ActiveRecord::Base
|
||||
belongs_to :physical_ticket
|
||||
end
|
||||
9
db/migrate/20170711102511_create_ticket_scannings.rb
Normal file
9
db/migrate/20170711102511_create_ticket_scannings.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class CreateTicketScannings < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ticket_scannings do |t|
|
||||
t.integer :physical_ticket_id, null: false
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170629232817) do
|
||||
ActiveRecord::Schema.define(version: 20170711102511) do
|
||||
|
||||
create_table "ahoy_events", force: :cascade do |t|
|
||||
t.uuid "visit_id", limit: 16
|
||||
|
|
@ -468,6 +468,12 @@ ActiveRecord::Schema.define(version: 20170629232817) do
|
|||
t.integer "week"
|
||||
end
|
||||
|
||||
create_table "ticket_scannings", force: :cascade do |t|
|
||||
t.integer "physical_ticket_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "tickets", force: :cascade do |t|
|
||||
t.integer "conference_id"
|
||||
t.string "title", null: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue