{"action":"opened","issue":{"url":"https://api.github.com/repos/viarocket/travelhalal/issues/7","repository_url":"https://api.github.com/repos/viarocket/travelhalal","labels_url":"https://api.github.com/repos/viarocket/travelhalal/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/viarocket/travelhalal/issues/7/comments","events_url":"https://api.github.com/repos/viarocket/travelhalal/issues/7/events","html_url":"https://github.com/viarocket/travelhalal/issues/7","id":327067912,"number":7,"title":"Travel Professional is able to Create Tours with Daily Itinerary","user":{"login":"viarocket","id":5539366,"avatar_url":"https://avatars3.githubusercontent.com/u/5539366?v=4","gravatar_id":"","url":"https://api.github.com/users/viarocket","html_url":"https://github.com/viarocket","followers_url":"https://api.github.com/users/viarocket/followers","following_url":"https://api.github.com/users/viarocket/following{/other_user}","gists_url":"https://api.github.com/users/viarocket/gists{/gist_id}","starred_url":"https://api.github.com/users/viarocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viarocket/subscriptions","organizations_url":"https://api.github.com/users/viarocket/orgs","repos_url":"https://api.github.com/users/viarocket/repos","events_url":"https://api.github.com/users/viarocket/events{/privacy}","received_events_url":"https://api.github.com/users/viarocket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-28T15:55:59Z","updated_at":"2018-05-28T15:55:59Z","closed_at":null,"author_association":"OWNER","body":"**belongs_to travel_pro**\r\n**has_many reviews**\r\n**has_many photos**\r\n**has_many reservations**\r\n**has_many conversations** (???)\r\n\r\n```\r\ncreate_table \"tours\", force: :cascade do |t|\r\n    t.string   \"tour_name\"\r\n    t.text     \"tour_description\"\r\n    t.integer  \"tour_pax_min\"\r\n    t.integer  \"tour_pax_max\"\r\n    t.integer  \"tour_duration\"\r\n    t.string   \"tour_duration_type\" (i.e. minutes, hours, days)\r\n    t.decimal  \"tour_price\"\r\n    t.boolean  \"tour_per_person\" (i.e. per_person or flat_rate)\r\n    t.boolean  \"active\" (show in marketplace or hidden)\r\n    t.boolean \"tour_availability\" (currently available for booking/currently not available for booking)\r\n    t.text     \"tour_special_instruction\"\r\n    t.string   \"tour_video_url\"\r\n    t.integer  \"user_id\"\r\n    t.datetime \"created_at\",               null: false\r\n    t.datetime \"updated_at\",               null: false\r\n    t.float    \"longitude\"\r\n    t.float    \"latitude\"\r\n  end\r\n```\r\n\r\nSeparate model or same model?\r\n\r\n```\r\n    t.text     “tour_cancellation_policy” \r\n=>listed in point form (javascript to add more points)\r\n=>has_many tour_cancellation_policy\r\n\r\n    t.text    \"tour_features \r\n=> listed in point form (javascript to add more points) \r\n=> has_many tour_features   \r\n\r\n    t.text     “tour_included” \r\n=> listed in point form (javascript to add more points) \r\n=> has_many tour_included\r\n\r\n    t.text     “tour_excluded” \r\n=> listed in point form (javascript to add more points) \r\n=> has_many tour_excluded\r\n\r\n    t.string or boolean? \"tour_add_ons\" \r\n=> Switch on/off switch button \r\n=> has_many tour_add_ons\r\n=> tour guide, airport transfer, bike rent, coffee break, dinner, welcome drink, insurance (each add_on has a price)\r\n\r\n    t.string   \"tour_tags\" \r\n=> use Select2 \r\n=> has_many tour_tags\r\n\r\n    t.string   \"tour_category\" \r\n=> use Select 2 \r\n=> has_many tour_category\r\n\r\n    t.string   \"tour_location\" \r\n=> Use google places API \r\n=> has_many tour_locations\r\n\r\n    t.string   \"tour_languages\"\r\n=> has_many tour_languages\r\n\r\n    t.string   \"tour_transportation_modes\"\r\n=> has_many tour_transportation_modes\r\n=> biking, kayaking, train, bus (multiple select)\r\n\r\n```\r\n**How to design the Tour database?**\r\n\r\nTour has_one TourItinerary\r\nTourItinerary has_many TourItineraryDays\r\nTourItineraryDays has_many TourItineraryActivities\r\nTourItineraryActivities has_many photos (add title, description, photos, address, opening hours etc - follow peek create a perfect day\r\n\r\n"}}
{"actor":{"display_login":"viarocket"}}