Merge pull request #1579 from siddhantbajaj/ticket-scanning
Added TicketScanning Model
This commit is contained in:
commit
036b590823
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 :ticket, through: :ticket_purchase
|
||||||
has_one :conference, through: :ticket_purchase
|
has_one :conference, through: :ticket_purchase
|
||||||
has_one :user, through: :ticket_purchase
|
has_one :user, through: :ticket_purchase
|
||||||
|
has_many :ticket_scannings
|
||||||
end
|
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.
|
# 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|
|
create_table "ahoy_events", force: :cascade do |t|
|
||||||
t.uuid "visit_id", limit: 16
|
t.uuid "visit_id", limit: 16
|
||||||
|
|
@ -468,6 +468,12 @@ ActiveRecord::Schema.define(version: 20170629232817) do
|
||||||
t.integer "week"
|
t.integer "week"
|
||||||
end
|
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|
|
create_table "tickets", force: :cascade do |t|
|
||||||
t.integer "conference_id"
|
t.integer "conference_id"
|
||||||
t.string "title", null: false
|
t.string "title", null: false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue