Skip to content

Instantly share code, notes, and snippets.

@ricardokdz
Created January 16, 2017 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardokdz/94654ba983e61d6cae8f2c871cec7390 to your computer and use it in GitHub Desktop.
Save ricardokdz/94654ba983e61d6cae8f2c871cec7390 to your computer and use it in GitHub Desktop.
Card.create!([
{user_id: 1, card_brand: "mastercard", card_number: "1234-1234-1234-1234", card_expiration_date: "07/2018", card_cvv: "321"}
])
Bus.create!([
{company_id: 1, code: "D0001", plate: "KYH6182", carrying_capacity: 10, station_id: nil},
{company_id: 2, code: "P2017", plate: "KOA3006", carrying_capacity: 50, station_id: nil}
])
Company.create!([
{name: "Expresso Recreio"},
{name: "Ideal"}
])
Coupon.create!([
{code: "BRAVE", is_active: true, type_discount: "percentage", amount: "100.00", description: "Descontinho da Brave ;)"}
])
Driver.create!([
{company_id: 1, name: "Motorista de Teste", phone: "(21) 98531-2380"},
{company_id: 2, name: "Motorista da Ideal", phone: nil}
])
Route.create!([
{company_id: 1, line: "Genesis 2333SV", way: "Centro", price: "12.00"},
{company_id: 1, line: "Genesis 2333SV", way: "Recreio", price: "11.50"},
{company_id: 1, line: "DUDU", way: "Centro", price: "10.00"},
{company_id: 1, line: "DUDU", way: "Recreio", price: "20.00"},
{company_id: 1, line: "DUDU", way: "Barata Ribeiro", price: "5.00"}
])
Station.create!([
{name: "Alvorada - Sentido Centro", latitude: "20", longitude: "10"},
{name: "Barra Shopping - Sentido Recreio", latitude: "20.00", longitude: "10.00"}
])
Ticket.create!([
{user_id: 1, trip_id: 1, is_validated: true, price: "12.00", payment_method: "cash", coupon_id: 1},
{user_id: 1, trip_id: 1, is_validated: true, price: "10.00", payment_method: "credit_card", coupon_id: nil}
])
Trip.create!([
{route_id: 5, bus_id: 2, driver_id: 1, trip_type: "special", departure: "2000-01-01 17:30:00", status: "scheduled"},
{route_id: 3, bus_id: 1, driver_id: 1, trip_type: "regular", departure: "2000-01-01 19:00:00", status: "running"}
])
User.create!([
{name: "Ricardo Pedrosa", email: "ricardo@brave.com", password: "123456", cpf: "", cellphone: "(21)98531-2380", device_os: nil, device_token: nil, is_admin: true, is_active: true, sms_code: 368693, app_version: nil, is_phone_validated: true},
{name: "Rafael", email: "rafael@gmail.com", password: nil, cpf: "", cellphone: "", device_os: nil, device_token: nil, is_admin: true, is_active: true, sms_code: nil, app_version: nil, is_phone_validated: true}
])
Waypoint.create!([
{route_id: 1, position: 3, reference: "", is_active: true, station_id: nil},
{route_id: 1, position: 4, reference: "", is_active: true, station_id: nil},
{route_id: 1, position: 1, reference: "Alvorada né", is_active: true, station_id: nil},
{route_id: 1, position: 2, reference: "Chegou!", is_active: true, station_id: 1},
{route_id: 2, position: 1, reference: "", is_active: true, station_id: 1},
{route_id: 3, position: 1, reference: "Na alvorada", is_active: true, station_id: 1},
{route_id: 3, position: 2, reference: "Em frente", is_active: true, station_id: 2}
])
CardTransaction.create!([
{user_id: 1, status: "authorized", json: "teste"}
])
TicketLog.create!([
{ticket_id: 1, action: "scheduled"},
{ticket_id: 1, action: "refunded"}
])
Token.create!([
{access_token: nil, user_id: 1},
{access_token: nil, user_id: 1},
{access_token: nil, user_id: 1},
{access_token: "ac4ea7fd03ce52829f8a11900319e325", user_id: 1},
{access_token: "1f7e2b4c05b4d871863d433a42912938", user_id: 1}
])
TripLog.create!([
{trip_id: 1, action: "start_trip", meta: nil},
{trip_id: 1, action: "bus_stop", meta: "Onibus parou no ponto X"},
{trip_id: 1, action: "validated_ticket", meta: "Ticket #xx validado"}
])
UserTransaction.create!([
{user_id: 1, operation: "credit", code: "load", meta: "Carga via cartao, transaction XXXX", amount: "20"},
{user_id: 1, operation: "debit", code: "buy_ticket", meta: "Compra do ticket para trip x", amount: "-14"},
{user_id: 1, operation: "credit", code: "refund_ticket", meta: "Cancelemanto do ticket xx", amount: "14"}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment